diff options
Diffstat (limited to 'vendor/modernc.org/libc')
574 files changed, 169308 insertions, 16985 deletions
diff --git a/vendor/modernc.org/libc/Makefile b/vendor/modernc.org/libc/Makefile index 1a362dfc..e9c5b256 100644 --- a/vendor/modernc.org/libc/Makefile +++ b/vendor/modernc.org/libc/Makefile @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -.PHONY: all bench clean cover cpu editor internalError later mem nuke todo edit devbench \ +.PHONY: all bench build_all_targets clean cover cpu editor internalError later mem nuke todo edit devbench \ darwin_amd64 \ darwin_arm64 \ linux_386 \ @@ -23,20 +23,6 @@ all: go install -v ./... go test go test 2>&1 -timeout 1h | tee -a $(log) - GOOS=darwin GOARCH=amd64 go build - GOOS=darwin GOARCH=arm64 go build - GOOS=freebsd GOARCH=386 go build - GOOS=freebsd GOARCH=amd64 go build - GOOS=linux GOARCH=386 go build - GOOS=linux GOARCH=amd64 go build - GOOS=linux GOARCH=arm go build - GOOS=linux GOARCH=arm64 go build - GOOS=linux GOARCH=s390x go build - GOOS=netbsd GOARCH=amd64 go build - GOOS=openbsd GOARCH=amd64 go build - GOOS=windows GOARCH=386 go build - GOOS=windows GOARCH=amd64 go build - GOOS=windows GOARCH=arm64 go build # go vet -unsafeptr=false 2>&1 | grep -v $(ngrep) || true # golint 2>&1 | grep -v $(ngrep) || true # make todo @@ -46,6 +32,10 @@ all: go version date 2>&1 | tee -a $(log) +build_all_targets: + ./build_all_targets.sh + echo done + darwin_amd64: @echo "Should be executed only on darwin/amd64." go generate 2>&1 | tee log-generate @@ -68,12 +58,28 @@ freebsd_386: go generate 2>&1 | tee log-generate go build -v ./... +# only on freebsd/arm +freebsd_arm: + @echo "Should be executed only on freebsd/arm." + go generate 2>&1 | tee log-generate + go build -v ./... + +freebsd_arm64: + go run addport.go freebsd_amd64 freebsd_arm64 + go build -v ./... + # only on netbsd/amd64 netbsd_amd64: @echo "Should be executed only on netbsd/amd64." go generate 2>&1 | tee log-generate go build -v ./... +# only on netbsd/arm +netbsd_arm: + @echo "Should be executed only on netbsd/arm." + go generate 2>&1 | tee log-generate + go build -v ./... + linux_amd64: @echo "Should be executed only on linux/amd64." go generate 2>&1 | tee log-generate @@ -104,6 +110,18 @@ openbsd_amd64: @echo "Should be executed only on openbsd/amd64." go generate 2>&1 | tee log-generate go build -v ./... + # +# only on openbsd/386 +openbsd_386: + @echo "Should be executed only on openbsd/386." + go generate 2>&1 | tee log-generate + go build -v ./... + +# only on openbsd/arm64 +openbsd_arm64: + @echo "Should be executed only on openbsd/arm64." + go generate 2>&1 | tee log-generate + go build -v ./... windows_amd64: @echo "Should be executed only on windows/amd64." @@ -123,41 +141,6 @@ windows_386: all_targets: linux_amd64 linux_386 linux_arm linux_arm64 linux_s390x # windows_amd64 windows_386 echo done -build_all_targets: - GOOS=darwin GOARCH=amd64 go build -v ./... - GOOS=darwin GOARCH=amd64 go test -c -o /dev/null - GOOS=darwin GOARCH=arm64 go build -v ./... - GOOS=darwin GOARCH=arm64 go test -c -o /dev/null - GOOS=freebsd GOARCH=386 go build -v ./... - GOOS=freebsd GOARCH=386 go test -c -o /dev/null - GOOS=freebsd GOARCH=amd64 go build -v ./... - GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null - GOOS=linux GOARCH=386 go build -v ./... - GOOS=linux GOARCH=386 go test -c -o /dev/null - GOOS=linux GOARCH=amd64 go build -v ./... - GOOS=linux GOARCH=amd64 go test -c -o /dev/null - GOOS=linux GOARCH=arm go build -v ./... - GOOS=linux GOARCH=arm go test -c -o /dev/null - GOOS=linux GOARCH=arm64 go build -v ./... - GOOS=linux GOARCH=arm64 go test -c -o /dev/null - GOOS=linux GOARCH=ppc64le go test -c -o /dev/null - GOOS=linux GOARCH=ppc64le go test -c -o /dev/null - GOOS=linux GOARCH=riscv64 go build -v ./... - GOOS=linux GOARCH=riscv64 go build -v ./... - GOOS=linux GOARCH=s390x go build -v ./... - GOOS=linux GOARCH=s390x go test -c -o /dev/null - GOOS=netbsd GOARCH=amd64 go build -v ./... - GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null - GOOS=openbsd GOARCH=amd64 go build -v ./... - GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null - GOOS=windows GOARCH=386 go build -v ./... - GOOS=windows GOARCH=386 go test -c -o /dev/null - GOOS=windows GOARCH=amd64 go build -v ./... - GOOS=windows GOARCH=amd64 go test -c -o /dev/null - GOOS=windows GOARCH=arm64 go build -v ./... - GOOS=windows GOARCH=arm64 go test -c -o /dev/null - echo done - devbench: date 2>&1 | tee log-devbench go test -timeout 24h -dev -run @ -bench . 2>&1 | tee -a log-devbench diff --git a/vendor/modernc.org/libc/build_all_targets.sh b/vendor/modernc.org/libc/build_all_targets.sh new file mode 100644 index 00000000..3fb79cf4 --- /dev/null +++ b/vendor/modernc.org/libc/build_all_targets.sh @@ -0,0 +1,43 @@ +set -e +for tag in none dmesg libc.membrk libc.memgrind +do + echo "-tags=$tag" + GOOS=darwin GOARCH=amd64 go build -tags=$tag -v ./... + GOOS=darwin GOARCH=amd64 go test -tags=$tag -c -o /dev/null + GOOS=darwin GOARCH=arm64 go build -tags=$tag -v ./... + GOOS=darwin GOARCH=arm64 go test -tags=$tag -c -o /dev/null + GOOS=freebsd GOARCH=386 go build -tags=$tag -v ./... + GOOS=freebsd GOARCH=386 go test -tags=$tag -c -o /dev/null + GOOS=freebsd GOARCH=amd64 go build -tags=$tag -v ./... + GOOS=freebsd GOARCH=amd64 go test -tags=$tag -c -o /dev/null + GOOS=freebsd GOARCH=arm go build -tags=$tag -v ./... + GOOS=freebsd GOARCH=arm go test -tags=$tag -c -o /dev/null + GOOS=linux GOARCH=386 go build -tags=$tag -v ./... + GOOS=linux GOARCH=386 go test -tags=$tag -c -o /dev/null + GOOS=linux GOARCH=amd64 go build -tags=$tag -v ./... + GOOS=linux GOARCH=amd64 go test -tags=$tag -c -o /dev/null + GOOS=linux GOARCH=arm go build -tags=$tag -v ./... + GOOS=linux GOARCH=arm go test -tags=$tag -c -o /dev/null + GOOS=linux GOARCH=arm64 go build -tags=$tag -v ./... + GOOS=linux GOARCH=arm64 go test -tags=$tag -c -o /dev/null + GOOS=linux GOARCH=ppc64le go test -tags=$tag -c -o /dev/null + GOOS=linux GOARCH=riscv64 go build -tags=$tag -v ./... + GOOS=linux GOARCH=s390x go build -tags=$tag -v ./... + GOOS=linux GOARCH=s390x go test -tags=$tag -c -o /dev/null + GOOS=netbsd GOARCH=amd64 go build -tags=$tag -v ./... + GOOS=netbsd GOARCH=amd64 go test -tags=$tag -c -o /dev/null + GOOS=netbsd GOARCH=arm go build -tags=$tag -v ./... + GOOS=netbsd GOARCH=arm go test -tags=$tag -c -o /dev/null + GOOS=openbsd GOARCH=386 go build -tags=$tag -v ./... + GOOS=openbsd GOARCH=386 go test -tags=$tag -c -o /dev/null + GOOS=openbsd GOARCH=amd64 go build -tags=$tag -v ./... + GOOS=openbsd GOARCH=amd64 go test -tags=$tag -c -o /dev/null + GOOS=openbsd GOARCH=arm64 go build -tags=$tag -v ./... + GOOS=openbsd GOARCH=arm64 go test -tags=$tag -c -o /dev/null + GOOS=windows GOARCH=386 go build -tags=$tag -v ./... + GOOS=windows GOARCH=386 go test -tags=$tag -c -o /dev/null + GOOS=windows GOARCH=amd64 go build -tags=$tag -v ./... + GOOS=windows GOARCH=amd64 go test -tags=$tag -c -o /dev/null + GOOS=windows GOARCH=arm64 go build -tags=$tag -v ./... + GOOS=windows GOARCH=arm64 go test -tags=$tag -c -o /dev/null +done diff --git a/vendor/modernc.org/libc/capi_darwin_amd64.go b/vendor/modernc.org/libc/capi_darwin_amd64.go index 43545c7d..ab794096 100644 --- a/vendor/modernc.org/libc/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/capi_darwin_amd64.go @@ -49,6 +49,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -312,6 +313,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_darwin_arm64.go b/vendor/modernc.org/libc/capi_darwin_arm64.go index 43545c7d..ab794096 100644 --- a/vendor/modernc.org/libc/capi_darwin_arm64.go +++ b/vendor/modernc.org/libc/capi_darwin_arm64.go @@ -49,6 +49,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -312,6 +313,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_freebsd_386.go b/vendor/modernc.org/libc/capi_freebsd_386.go index 3dc0e4e6..006e0c71 100644 --- a/vendor/modernc.org/libc/capi_freebsd_386.go +++ b/vendor/modernc.org/libc/capi_freebsd_386.go @@ -9,6 +9,8 @@ var CAPI = map[string]struct{}{ "_ThreadRuneLocale": {}, "___errno_location": {}, "___runetype": {}, + "___tolower": {}, + "___toupper": {}, "__assert": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, @@ -50,6 +52,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -149,6 +152,9 @@ var CAPI = map[string]struct{}{ "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, @@ -288,6 +294,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, diff --git a/vendor/modernc.org/libc/capi_freebsd_amd64.go b/vendor/modernc.org/libc/capi_freebsd_amd64.go index 3dc0e4e6..006e0c71 100644 --- a/vendor/modernc.org/libc/capi_freebsd_amd64.go +++ b/vendor/modernc.org/libc/capi_freebsd_amd64.go @@ -9,6 +9,8 @@ var CAPI = map[string]struct{}{ "_ThreadRuneLocale": {}, "___errno_location": {}, "___runetype": {}, + "___tolower": {}, + "___toupper": {}, "__assert": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, @@ -50,6 +52,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -149,6 +152,9 @@ var CAPI = map[string]struct{}{ "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, @@ -288,6 +294,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, diff --git a/vendor/modernc.org/libc/capi_freebsd_arm.go b/vendor/modernc.org/libc/capi_freebsd_arm.go new file mode 100644 index 00000000..006e0c71 --- /dev/null +++ b/vendor/modernc.org/libc/capi_freebsd_arm.go @@ -0,0 +1,504 @@ +// Code generated by 'go generate' - DO NOT EDIT. + +package libc // import "modernc.org/libc" + +var CAPI = map[string]struct{}{ + "_CurrentRuneLocale": {}, + "_DefaultRuneLocale": {}, + "_IO_putc": {}, + "_ThreadRuneLocale": {}, + "___errno_location": {}, + "___runetype": {}, + "___tolower": {}, + "___toupper": {}, + "__assert": {}, + "__assert_fail": {}, + "__builtin___memcpy_chk": {}, + "__builtin___memmove_chk": {}, + "__builtin___memset_chk": {}, + "__builtin___snprintf_chk": {}, + "__builtin___sprintf_chk": {}, + "__builtin___strcat_chk": {}, + "__builtin___strcpy_chk": {}, + "__builtin___strncpy_chk": {}, + "__builtin___vsnprintf_chk": {}, + "__builtin_abort": {}, + "__builtin_abs": {}, + "__builtin_add_overflowInt64": {}, + "__builtin_add_overflowUint32": {}, + "__builtin_add_overflowUint64": {}, + "__builtin_bswap16": {}, + "__builtin_bswap32": {}, + "__builtin_bswap64": {}, + "__builtin_bzero": {}, + "__builtin_clz": {}, + "__builtin_clzl": {}, + "__builtin_clzll": {}, + "__builtin_constant_p_impl": {}, + "__builtin_copysign": {}, + "__builtin_copysignf": {}, + "__builtin_copysignl": {}, + "__builtin_exit": {}, + "__builtin_expect": {}, + "__builtin_fabs": {}, + "__builtin_fabsf": {}, + "__builtin_fabsl": {}, + "__builtin_free": {}, + "__builtin_getentropy": {}, + "__builtin_huge_val": {}, + "__builtin_huge_valf": {}, + "__builtin_inf": {}, + "__builtin_inff": {}, + "__builtin_infl": {}, + "__builtin_isnan": {}, + "__builtin_isunordered": {}, + "__builtin_llabs": {}, + "__builtin_malloc": {}, + "__builtin_memcmp": {}, + "__builtin_memcpy": {}, + "__builtin_memset": {}, + "__builtin_mmap": {}, + "__builtin_mul_overflowInt64": {}, + "__builtin_mul_overflowUint128": {}, + "__builtin_mul_overflowUint64": {}, + "__builtin_nan": {}, + "__builtin_nanf": {}, + "__builtin_nanl": {}, + "__builtin_object_size": {}, + "__builtin_popcount": {}, + "__builtin_popcountl": {}, + "__builtin_prefetch": {}, + "__builtin_printf": {}, + "__builtin_snprintf": {}, + "__builtin_sprintf": {}, + "__builtin_strchr": {}, + "__builtin_strcmp": {}, + "__builtin_strcpy": {}, + "__builtin_strlen": {}, + "__builtin_sub_overflowInt64": {}, + "__builtin_trap": {}, + "__builtin_unreachable": {}, + "__ccgo_dmesg": {}, + "__ccgo_getMutexType": {}, + "__ccgo_in6addr_anyp": {}, + "__ccgo_pthreadAttrGetDetachState": {}, + "__ccgo_pthreadMutexattrGettype": {}, + "__ccgo_sqlite3_log": {}, + "__cmsg_nxthdr": {}, + "__ctype_get_mb_cur_max": {}, + "__errno_location": {}, + "__error": {}, + "__floatscan": {}, + "__h_errno_location": {}, + "__inet_aton": {}, + "__inet_ntoa": {}, + "__intscan": {}, + "__isalnum_l": {}, + "__isalpha_l": {}, + "__isdigit_l": {}, + "__islower_l": {}, + "__isnan": {}, + "__isnanf": {}, + "__isnanl": {}, + "__isoc99_sscanf": {}, + "__isprint_l": {}, + "__isspace_l": {}, + "__isthreaded": {}, + "__isupper_l": {}, + "__isxdigit_l": {}, + "__lookup_ipliteral": {}, + "__lookup_name": {}, + "__lookup_serv": {}, + "__mb_sb_limit": {}, + "__runes_for_locale": {}, + "__shgetc": {}, + "__shlim": {}, + "__srget": {}, + "__stderrp": {}, + "__stdinp": {}, + "__stdoutp": {}, + "__swbuf": {}, + "__sync_add_and_fetch_uint32": {}, + "__sync_sub_and_fetch_uint32": {}, + "__syscall1": {}, + "__syscall3": {}, + "__syscall4": {}, + "__toread": {}, + "__toread_needs_stdio_exit": {}, + "__uflow": {}, + "__xuname": {}, + "_exit": {}, + "_longjmp": {}, + "_obstack_begin": {}, + "_obstack_newchunk": {}, + "_setjmp": {}, + "abort": {}, + "abs": {}, + "accept": {}, + "access": {}, + "acos": {}, + "acosh": {}, + "alarm": {}, + "asin": {}, + "asinh": {}, + "atan": {}, + "atan2": {}, + "atanh": {}, + "atexit": {}, + "atof": {}, + "atoi": {}, + "atol": {}, + "backtrace": {}, + "backtrace_symbols_fd": {}, + "bind": {}, + "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, + "bzero": {}, + "calloc": {}, + "ceil": {}, + "ceilf": {}, + "cfgetospeed": {}, + "cfsetispeed": {}, + "cfsetospeed": {}, + "chdir": {}, + "chflags": {}, + "chmod": {}, + "chown": {}, + "clock_gettime": {}, + "close": {}, + "closedir": {}, + "confstr": {}, + "connect": {}, + "copysign": {}, + "copysignf": {}, + "copysignl": {}, + "cos": {}, + "cosf": {}, + "cosh": {}, + "ctime": {}, + "ctime_r": {}, + "dlclose": {}, + "dlerror": {}, + "dlopen": {}, + "dlsym": {}, + "dup2": {}, + "endpwent": {}, + "environ": {}, + "execvp": {}, + "exit": {}, + "exp": {}, + "fabs": {}, + "fabsf": {}, + "fabsl": {}, + "fchmod": {}, + "fchown": {}, + "fclose": {}, + "fcntl": {}, + "fcntl64": {}, + "fdopen": {}, + "ferror": {}, + "fflush": {}, + "fgetc": {}, + "fgets": {}, + "fileno": {}, + "floor": {}, + "fmod": {}, + "fmodl": {}, + "fopen": {}, + "fopen64": {}, + "fork": {}, + "fprintf": {}, + "fputc": {}, + "fputs": {}, + "fread": {}, + "free": {}, + "freeaddrinfo": {}, + "frexp": {}, + "fscanf": {}, + "fseek": {}, + "fstat": {}, + "fstat64": {}, + "fsync": {}, + "ftell": {}, + "ftruncate": {}, + "fts64_close": {}, + "fts64_open": {}, + "fts64_read": {}, + "fts_close": {}, + "fts_open": {}, + "fts_read": {}, + "fwrite": {}, + "gai_strerror": {}, + "getaddrinfo": {}, + "getc": {}, + "getcwd": {}, + "getegid": {}, + "getentropy": {}, + "getenv": {}, + "geteuid": {}, + "getgid": {}, + "getgrgid": {}, + "getgrgid_r": {}, + "getgrnam": {}, + "getgrnam_r": {}, + "gethostbyaddr": {}, + "gethostbyaddr_r": {}, + "gethostbyname": {}, + "gethostbyname2": {}, + "gethostbyname2_r": {}, + "gethostname": {}, + "getnameinfo": {}, + "getpeername": {}, + "getpid": {}, + "getpwnam": {}, + "getpwnam_r": {}, + "getpwuid": {}, + "getpwuid_r": {}, + "getresgid": {}, + "getresuid": {}, + "getrlimit": {}, + "getrlimit64": {}, + "getrusage": {}, + "getservbyname": {}, + "getsockname": {}, + "getsockopt": {}, + "gettimeofday": {}, + "getuid": {}, + "gmtime_r": {}, + "h_errno": {}, + "htonl": {}, + "htons": {}, + "hypot": {}, + "inet_ntoa": {}, + "inet_ntop": {}, + "inet_pton": {}, + "initstate": {}, + "initstate_r": {}, + "ioctl": {}, + "isalnum": {}, + "isalpha": {}, + "isascii": {}, + "isatty": {}, + "isdigit": {}, + "islower": {}, + "isnan": {}, + "isnanf": {}, + "isnanl": {}, + "isprint": {}, + "isspace": {}, + "isupper": {}, + "isxdigit": {}, + "kill": {}, + "ldexp": {}, + "link": {}, + "listen": {}, + "llabs": {}, + "localtime": {}, + "localtime_r": {}, + "log": {}, + "log10": {}, + "longjmp": {}, + "lrand48": {}, + "lseek": {}, + "lseek64": {}, + "lstat": {}, + "lstat64": {}, + "malloc": {}, + "mblen": {}, + "mbstowcs": {}, + "mbtowc": {}, + "memchr": {}, + "memcmp": {}, + "memcpy": {}, + "memmove": {}, + "memset": {}, + "mkdir": {}, + "mkfifo": {}, + "mknod": {}, + "mkostemp": {}, + "mkstemp": {}, + "mkstemp64": {}, + "mkstemps": {}, + "mkstemps64": {}, + "mktime": {}, + "mmap": {}, + "modf": {}, + "munmap": {}, + "nl_langinfo": {}, + "ntohs": {}, + "obstack_free": {}, + "obstack_vprintf": {}, + "open": {}, + "open64": {}, + "opendir": {}, + "openpty": {}, + "pathconf": {}, + "pause": {}, + "pclose": {}, + "perror": {}, + "pipe": {}, + "poll": {}, + "popen": {}, + "pow": {}, + "printf": {}, + "pselect": {}, + "pthread_attr_destroy": {}, + "pthread_attr_getdetachstate": {}, + "pthread_attr_init": {}, + "pthread_attr_setdetachstate": {}, + "pthread_attr_setscope": {}, + "pthread_attr_setstacksize": {}, + "pthread_cond_broadcast": {}, + "pthread_cond_destroy": {}, + "pthread_cond_init": {}, + "pthread_cond_signal": {}, + "pthread_cond_timedwait": {}, + "pthread_cond_wait": {}, + "pthread_create": {}, + "pthread_detach": {}, + "pthread_equal": {}, + "pthread_exit": {}, + "pthread_getspecific": {}, + "pthread_join": {}, + "pthread_key_create": {}, + "pthread_key_delete": {}, + "pthread_mutex_destroy": {}, + "pthread_mutex_init": {}, + "pthread_mutex_lock": {}, + "pthread_mutex_trylock": {}, + "pthread_mutex_unlock": {}, + "pthread_mutexattr_destroy": {}, + "pthread_mutexattr_init": {}, + "pthread_mutexattr_settype": {}, + "pthread_self": {}, + "pthread_setspecific": {}, + "putc": {}, + "putchar": {}, + "puts": {}, + "qsort": {}, + "raise": {}, + "rand": {}, + "random": {}, + "random_r": {}, + "read": {}, + "readdir": {}, + "readdir64": {}, + "readlink": {}, + "readv": {}, + "realloc": {}, + "reallocarray": {}, + "realpath": {}, + "recv": {}, + "recvfrom": {}, + "recvmsg": {}, + "remove": {}, + "rename": {}, + "rewind": {}, + "rindex": {}, + "rint": {}, + "rmdir": {}, + "round": {}, + "scalbn": {}, + "scalbnl": {}, + "sched_yield": {}, + "select": {}, + "send": {}, + "sendmsg": {}, + "sendto": {}, + "setbuf": {}, + "setenv": {}, + "setjmp": {}, + "setlocale": {}, + "setrlimit": {}, + "setrlimit64": {}, + "setsid": {}, + "setsockopt": {}, + "setstate": {}, + "setvbuf": {}, + "shmat": {}, + "shmctl": {}, + "shmdt": {}, + "shutdown": {}, + "sigaction": {}, + "signal": {}, + "sin": {}, + "sinf": {}, + "sinh": {}, + "sleep": {}, + "snprintf": {}, + "socket": {}, + "sprintf": {}, + "sqrt": {}, + "srand48": {}, + "sscanf": {}, + "stat": {}, + "stat64": {}, + "stderr": {}, + "stdin": {}, + "stdout": {}, + "strcasecmp": {}, + "strcat": {}, + "strchr": {}, + "strcmp": {}, + "strcpy": {}, + "strcspn": {}, + "strdup": {}, + "strerror": {}, + "strerror_r": {}, + "strlen": {}, + "strncmp": {}, + "strncpy": {}, + "strnlen": {}, + "strpbrk": {}, + "strrchr": {}, + "strspn": {}, + "strstr": {}, + "strtod": {}, + "strtof": {}, + "strtoimax": {}, + "strtol": {}, + "strtold": {}, + "strtoll": {}, + "strtoul": {}, + "strtoull": {}, + "strtoumax": {}, + "symlink": {}, + "sysconf": {}, + "system": {}, + "tan": {}, + "tanh": {}, + "tcgetattr": {}, + "tcsendbreak": {}, + "tcsetattr": {}, + "time": {}, + "tmpfile": {}, + "tolower": {}, + "toupper": {}, + "trunc": {}, + "tzset": {}, + "umask": {}, + "uname": {}, + "ungetc": {}, + "unlink": {}, + "unsetenv": {}, + "usleep": {}, + "utime": {}, + "utimes": {}, + "uuid_generate_random": {}, + "uuid_parse": {}, + "uuid_unparse": {}, + "vasprintf": {}, + "vfprintf": {}, + "vprintf": {}, + "vsnprintf": {}, + "vsprintf": {}, + "waitpid": {}, + "wcschr": {}, + "wctomb": {}, + "wcwidth": {}, + "write": {}, + "writev": {}, + "zero_struct_address": {}, +} diff --git a/vendor/modernc.org/libc/capi_freebsd_arm64.go b/vendor/modernc.org/libc/capi_freebsd_arm64.go new file mode 100644 index 00000000..006e0c71 --- /dev/null +++ b/vendor/modernc.org/libc/capi_freebsd_arm64.go @@ -0,0 +1,504 @@ +// Code generated by 'go generate' - DO NOT EDIT. + +package libc // import "modernc.org/libc" + +var CAPI = map[string]struct{}{ + "_CurrentRuneLocale": {}, + "_DefaultRuneLocale": {}, + "_IO_putc": {}, + "_ThreadRuneLocale": {}, + "___errno_location": {}, + "___runetype": {}, + "___tolower": {}, + "___toupper": {}, + "__assert": {}, + "__assert_fail": {}, + "__builtin___memcpy_chk": {}, + "__builtin___memmove_chk": {}, + "__builtin___memset_chk": {}, + "__builtin___snprintf_chk": {}, + "__builtin___sprintf_chk": {}, + "__builtin___strcat_chk": {}, + "__builtin___strcpy_chk": {}, + "__builtin___strncpy_chk": {}, + "__builtin___vsnprintf_chk": {}, + "__builtin_abort": {}, + "__builtin_abs": {}, + "__builtin_add_overflowInt64": {}, + "__builtin_add_overflowUint32": {}, + "__builtin_add_overflowUint64": {}, + "__builtin_bswap16": {}, + "__builtin_bswap32": {}, + "__builtin_bswap64": {}, + "__builtin_bzero": {}, + "__builtin_clz": {}, + "__builtin_clzl": {}, + "__builtin_clzll": {}, + "__builtin_constant_p_impl": {}, + "__builtin_copysign": {}, + "__builtin_copysignf": {}, + "__builtin_copysignl": {}, + "__builtin_exit": {}, + "__builtin_expect": {}, + "__builtin_fabs": {}, + "__builtin_fabsf": {}, + "__builtin_fabsl": {}, + "__builtin_free": {}, + "__builtin_getentropy": {}, + "__builtin_huge_val": {}, + "__builtin_huge_valf": {}, + "__builtin_inf": {}, + "__builtin_inff": {}, + "__builtin_infl": {}, + "__builtin_isnan": {}, + "__builtin_isunordered": {}, + "__builtin_llabs": {}, + "__builtin_malloc": {}, + "__builtin_memcmp": {}, + "__builtin_memcpy": {}, + "__builtin_memset": {}, + "__builtin_mmap": {}, + "__builtin_mul_overflowInt64": {}, + "__builtin_mul_overflowUint128": {}, + "__builtin_mul_overflowUint64": {}, + "__builtin_nan": {}, + "__builtin_nanf": {}, + "__builtin_nanl": {}, + "__builtin_object_size": {}, + "__builtin_popcount": {}, + "__builtin_popcountl": {}, + "__builtin_prefetch": {}, + "__builtin_printf": {}, + "__builtin_snprintf": {}, + "__builtin_sprintf": {}, + "__builtin_strchr": {}, + "__builtin_strcmp": {}, + "__builtin_strcpy": {}, + "__builtin_strlen": {}, + "__builtin_sub_overflowInt64": {}, + "__builtin_trap": {}, + "__builtin_unreachable": {}, + "__ccgo_dmesg": {}, + "__ccgo_getMutexType": {}, + "__ccgo_in6addr_anyp": {}, + "__ccgo_pthreadAttrGetDetachState": {}, + "__ccgo_pthreadMutexattrGettype": {}, + "__ccgo_sqlite3_log": {}, + "__cmsg_nxthdr": {}, + "__ctype_get_mb_cur_max": {}, + "__errno_location": {}, + "__error": {}, + "__floatscan": {}, + "__h_errno_location": {}, + "__inet_aton": {}, + "__inet_ntoa": {}, + "__intscan": {}, + "__isalnum_l": {}, + "__isalpha_l": {}, + "__isdigit_l": {}, + "__islower_l": {}, + "__isnan": {}, + "__isnanf": {}, + "__isnanl": {}, + "__isoc99_sscanf": {}, + "__isprint_l": {}, + "__isspace_l": {}, + "__isthreaded": {}, + "__isupper_l": {}, + "__isxdigit_l": {}, + "__lookup_ipliteral": {}, + "__lookup_name": {}, + "__lookup_serv": {}, + "__mb_sb_limit": {}, + "__runes_for_locale": {}, + "__shgetc": {}, + "__shlim": {}, + "__srget": {}, + "__stderrp": {}, + "__stdinp": {}, + "__stdoutp": {}, + "__swbuf": {}, + "__sync_add_and_fetch_uint32": {}, + "__sync_sub_and_fetch_uint32": {}, + "__syscall1": {}, + "__syscall3": {}, + "__syscall4": {}, + "__toread": {}, + "__toread_needs_stdio_exit": {}, + "__uflow": {}, + "__xuname": {}, + "_exit": {}, + "_longjmp": {}, + "_obstack_begin": {}, + "_obstack_newchunk": {}, + "_setjmp": {}, + "abort": {}, + "abs": {}, + "accept": {}, + "access": {}, + "acos": {}, + "acosh": {}, + "alarm": {}, + "asin": {}, + "asinh": {}, + "atan": {}, + "atan2": {}, + "atanh": {}, + "atexit": {}, + "atof": {}, + "atoi": {}, + "atol": {}, + "backtrace": {}, + "backtrace_symbols_fd": {}, + "bind": {}, + "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, + "bzero": {}, + "calloc": {}, + "ceil": {}, + "ceilf": {}, + "cfgetospeed": {}, + "cfsetispeed": {}, + "cfsetospeed": {}, + "chdir": {}, + "chflags": {}, + "chmod": {}, + "chown": {}, + "clock_gettime": {}, + "close": {}, + "closedir": {}, + "confstr": {}, + "connect": {}, + "copysign": {}, + "copysignf": {}, + "copysignl": {}, + "cos": {}, + "cosf": {}, + "cosh": {}, + "ctime": {}, + "ctime_r": {}, + "dlclose": {}, + "dlerror": {}, + "dlopen": {}, + "dlsym": {}, + "dup2": {}, + "endpwent": {}, + "environ": {}, + "execvp": {}, + "exit": {}, + "exp": {}, + "fabs": {}, + "fabsf": {}, + "fabsl": {}, + "fchmod": {}, + "fchown": {}, + "fclose": {}, + "fcntl": {}, + "fcntl64": {}, + "fdopen": {}, + "ferror": {}, + "fflush": {}, + "fgetc": {}, + "fgets": {}, + "fileno": {}, + "floor": {}, + "fmod": {}, + "fmodl": {}, + "fopen": {}, + "fopen64": {}, + "fork": {}, + "fprintf": {}, + "fputc": {}, + "fputs": {}, + "fread": {}, + "free": {}, + "freeaddrinfo": {}, + "frexp": {}, + "fscanf": {}, + "fseek": {}, + "fstat": {}, + "fstat64": {}, + "fsync": {}, + "ftell": {}, + "ftruncate": {}, + "fts64_close": {}, + "fts64_open": {}, + "fts64_read": {}, + "fts_close": {}, + "fts_open": {}, + "fts_read": {}, + "fwrite": {}, + "gai_strerror": {}, + "getaddrinfo": {}, + "getc": {}, + "getcwd": {}, + "getegid": {}, + "getentropy": {}, + "getenv": {}, + "geteuid": {}, + "getgid": {}, + "getgrgid": {}, + "getgrgid_r": {}, + "getgrnam": {}, + "getgrnam_r": {}, + "gethostbyaddr": {}, + "gethostbyaddr_r": {}, + "gethostbyname": {}, + "gethostbyname2": {}, + "gethostbyname2_r": {}, + "gethostname": {}, + "getnameinfo": {}, + "getpeername": {}, + "getpid": {}, + "getpwnam": {}, + "getpwnam_r": {}, + "getpwuid": {}, + "getpwuid_r": {}, + "getresgid": {}, + "getresuid": {}, + "getrlimit": {}, + "getrlimit64": {}, + "getrusage": {}, + "getservbyname": {}, + "getsockname": {}, + "getsockopt": {}, + "gettimeofday": {}, + "getuid": {}, + "gmtime_r": {}, + "h_errno": {}, + "htonl": {}, + "htons": {}, + "hypot": {}, + "inet_ntoa": {}, + "inet_ntop": {}, + "inet_pton": {}, + "initstate": {}, + "initstate_r": {}, + "ioctl": {}, + "isalnum": {}, + "isalpha": {}, + "isascii": {}, + "isatty": {}, + "isdigit": {}, + "islower": {}, + "isnan": {}, + "isnanf": {}, + "isnanl": {}, + "isprint": {}, + "isspace": {}, + "isupper": {}, + "isxdigit": {}, + "kill": {}, + "ldexp": {}, + "link": {}, + "listen": {}, + "llabs": {}, + "localtime": {}, + "localtime_r": {}, + "log": {}, + "log10": {}, + "longjmp": {}, + "lrand48": {}, + "lseek": {}, + "lseek64": {}, + "lstat": {}, + "lstat64": {}, + "malloc": {}, + "mblen": {}, + "mbstowcs": {}, + "mbtowc": {}, + "memchr": {}, + "memcmp": {}, + "memcpy": {}, + "memmove": {}, + "memset": {}, + "mkdir": {}, + "mkfifo": {}, + "mknod": {}, + "mkostemp": {}, + "mkstemp": {}, + "mkstemp64": {}, + "mkstemps": {}, + "mkstemps64": {}, + "mktime": {}, + "mmap": {}, + "modf": {}, + "munmap": {}, + "nl_langinfo": {}, + "ntohs": {}, + "obstack_free": {}, + "obstack_vprintf": {}, + "open": {}, + "open64": {}, + "opendir": {}, + "openpty": {}, + "pathconf": {}, + "pause": {}, + "pclose": {}, + "perror": {}, + "pipe": {}, + "poll": {}, + "popen": {}, + "pow": {}, + "printf": {}, + "pselect": {}, + "pthread_attr_destroy": {}, + "pthread_attr_getdetachstate": {}, + "pthread_attr_init": {}, + "pthread_attr_setdetachstate": {}, + "pthread_attr_setscope": {}, + "pthread_attr_setstacksize": {}, + "pthread_cond_broadcast": {}, + "pthread_cond_destroy": {}, + "pthread_cond_init": {}, + "pthread_cond_signal": {}, + "pthread_cond_timedwait": {}, + "pthread_cond_wait": {}, + "pthread_create": {}, + "pthread_detach": {}, + "pthread_equal": {}, + "pthread_exit": {}, + "pthread_getspecific": {}, + "pthread_join": {}, + "pthread_key_create": {}, + "pthread_key_delete": {}, + "pthread_mutex_destroy": {}, + "pthread_mutex_init": {}, + "pthread_mutex_lock": {}, + "pthread_mutex_trylock": {}, + "pthread_mutex_unlock": {}, + "pthread_mutexattr_destroy": {}, + "pthread_mutexattr_init": {}, + "pthread_mutexattr_settype": {}, + "pthread_self": {}, + "pthread_setspecific": {}, + "putc": {}, + "putchar": {}, + "puts": {}, + "qsort": {}, + "raise": {}, + "rand": {}, + "random": {}, + "random_r": {}, + "read": {}, + "readdir": {}, + "readdir64": {}, + "readlink": {}, + "readv": {}, + "realloc": {}, + "reallocarray": {}, + "realpath": {}, + "recv": {}, + "recvfrom": {}, + "recvmsg": {}, + "remove": {}, + "rename": {}, + "rewind": {}, + "rindex": {}, + "rint": {}, + "rmdir": {}, + "round": {}, + "scalbn": {}, + "scalbnl": {}, + "sched_yield": {}, + "select": {}, + "send": {}, + "sendmsg": {}, + "sendto": {}, + "setbuf": {}, + "setenv": {}, + "setjmp": {}, + "setlocale": {}, + "setrlimit": {}, + "setrlimit64": {}, + "setsid": {}, + "setsockopt": {}, + "setstate": {}, + "setvbuf": {}, + "shmat": {}, + "shmctl": {}, + "shmdt": {}, + "shutdown": {}, + "sigaction": {}, + "signal": {}, + "sin": {}, + "sinf": {}, + "sinh": {}, + "sleep": {}, + "snprintf": {}, + "socket": {}, + "sprintf": {}, + "sqrt": {}, + "srand48": {}, + "sscanf": {}, + "stat": {}, + "stat64": {}, + "stderr": {}, + "stdin": {}, + "stdout": {}, + "strcasecmp": {}, + "strcat": {}, + "strchr": {}, + "strcmp": {}, + "strcpy": {}, + "strcspn": {}, + "strdup": {}, + "strerror": {}, + "strerror_r": {}, + "strlen": {}, + "strncmp": {}, + "strncpy": {}, + "strnlen": {}, + "strpbrk": {}, + "strrchr": {}, + "strspn": {}, + "strstr": {}, + "strtod": {}, + "strtof": {}, + "strtoimax": {}, + "strtol": {}, + "strtold": {}, + "strtoll": {}, + "strtoul": {}, + "strtoull": {}, + "strtoumax": {}, + "symlink": {}, + "sysconf": {}, + "system": {}, + "tan": {}, + "tanh": {}, + "tcgetattr": {}, + "tcsendbreak": {}, + "tcsetattr": {}, + "time": {}, + "tmpfile": {}, + "tolower": {}, + "toupper": {}, + "trunc": {}, + "tzset": {}, + "umask": {}, + "uname": {}, + "ungetc": {}, + "unlink": {}, + "unsetenv": {}, + "usleep": {}, + "utime": {}, + "utimes": {}, + "uuid_generate_random": {}, + "uuid_parse": {}, + "uuid_unparse": {}, + "vasprintf": {}, + "vfprintf": {}, + "vprintf": {}, + "vsnprintf": {}, + "vsprintf": {}, + "waitpid": {}, + "wcschr": {}, + "wctomb": {}, + "wcwidth": {}, + "write": {}, + "writev": {}, + "zero_struct_address": {}, +} diff --git a/vendor/modernc.org/libc/capi_linux_386.go b/vendor/modernc.org/libc/capi_linux_386.go index 79a194dd..7ec37f1d 100644 --- a/vendor/modernc.org/libc/capi_linux_386.go +++ b/vendor/modernc.org/libc/capi_linux_386.go @@ -45,6 +45,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -281,6 +282,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_linux_amd64.go b/vendor/modernc.org/libc/capi_linux_amd64.go index 350a0f25..b5b36631 100644 --- a/vendor/modernc.org/libc/capi_linux_amd64.go +++ b/vendor/modernc.org/libc/capi_linux_amd64.go @@ -45,6 +45,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -288,6 +289,7 @@ var CAPI = map[string]struct{}{ "link": {}, "linkat": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_linux_arm.go b/vendor/modernc.org/libc/capi_linux_arm.go index 79a194dd..7ec37f1d 100644 --- a/vendor/modernc.org/libc/capi_linux_arm.go +++ b/vendor/modernc.org/libc/capi_linux_arm.go @@ -45,6 +45,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -281,6 +282,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_linux_arm64.go b/vendor/modernc.org/libc/capi_linux_arm64.go index 79a194dd..7ec37f1d 100644 --- a/vendor/modernc.org/libc/capi_linux_arm64.go +++ b/vendor/modernc.org/libc/capi_linux_arm64.go @@ -45,6 +45,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -281,6 +282,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_linux_ppc64le.go b/vendor/modernc.org/libc/capi_linux_ppc64le.go index 350a0f25..b5b36631 100644 --- a/vendor/modernc.org/libc/capi_linux_ppc64le.go +++ b/vendor/modernc.org/libc/capi_linux_ppc64le.go @@ -45,6 +45,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -288,6 +289,7 @@ var CAPI = map[string]struct{}{ "link": {}, "linkat": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_linux_riscv64.go b/vendor/modernc.org/libc/capi_linux_riscv64.go index b6f3b2a0..29fb7d4e 100644 --- a/vendor/modernc.org/libc/capi_linux_riscv64.go +++ b/vendor/modernc.org/libc/capi_linux_riscv64.go @@ -45,6 +45,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -283,6 +284,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_linux_s390x.go b/vendor/modernc.org/libc/capi_linux_s390x.go index 79a194dd..7ec37f1d 100644 --- a/vendor/modernc.org/libc/capi_linux_s390x.go +++ b/vendor/modernc.org/libc/capi_linux_s390x.go @@ -45,6 +45,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -281,6 +282,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, diff --git a/vendor/modernc.org/libc/capi_netbsd_amd64.go b/vendor/modernc.org/libc/capi_netbsd_amd64.go index b78bda37..8876e9b4 100644 --- a/vendor/modernc.org/libc/capi_netbsd_amd64.go +++ b/vendor/modernc.org/libc/capi_netbsd_amd64.go @@ -50,6 +50,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -150,6 +151,9 @@ var CAPI = map[string]struct{}{ "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, @@ -285,6 +289,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, diff --git a/vendor/modernc.org/libc/capi_netbsd_arm.go b/vendor/modernc.org/libc/capi_netbsd_arm.go new file mode 100644 index 00000000..8876e9b4 --- /dev/null +++ b/vendor/modernc.org/libc/capi_netbsd_arm.go @@ -0,0 +1,499 @@ +// Code generated by 'go generate' - DO NOT EDIT. + +package libc // import "modernc.org/libc" + +var CAPI = map[string]struct{}{ + "_C_ctype_tab_": {}, + "_IO_putc": {}, + "_ThreadRuneLocale": {}, + "___errno_location": {}, + "___runetype": {}, + "__assert": {}, + "__assert13": {}, + "__assert_fail": {}, + "__builtin___memcpy_chk": {}, + "__builtin___memmove_chk": {}, + "__builtin___memset_chk": {}, + "__builtin___snprintf_chk": {}, + "__builtin___sprintf_chk": {}, + "__builtin___strcat_chk": {}, + "__builtin___strcpy_chk": {}, + "__builtin___strncpy_chk": {}, + "__builtin___vsnprintf_chk": {}, + "__builtin_abort": {}, + "__builtin_abs": {}, + "__builtin_add_overflowInt64": {}, + "__builtin_add_overflowUint32": {}, + "__builtin_add_overflowUint64": {}, + "__builtin_bswap16": {}, + "__builtin_bswap32": {}, + "__builtin_bswap64": {}, + "__builtin_bzero": {}, + "__builtin_clz": {}, + "__builtin_clzl": {}, + "__builtin_clzll": {}, + "__builtin_constant_p_impl": {}, + "__builtin_copysign": {}, + "__builtin_copysignf": {}, + "__builtin_copysignl": {}, + "__builtin_exit": {}, + "__builtin_expect": {}, + "__builtin_fabs": {}, + "__builtin_fabsf": {}, + "__builtin_fabsl": {}, + "__builtin_free": {}, + "__builtin_getentropy": {}, + "__builtin_huge_val": {}, + "__builtin_huge_valf": {}, + "__builtin_inf": {}, + "__builtin_inff": {}, + "__builtin_infl": {}, + "__builtin_isnan": {}, + "__builtin_isunordered": {}, + "__builtin_llabs": {}, + "__builtin_malloc": {}, + "__builtin_memcmp": {}, + "__builtin_memcpy": {}, + "__builtin_memset": {}, + "__builtin_mmap": {}, + "__builtin_mul_overflowInt64": {}, + "__builtin_mul_overflowUint128": {}, + "__builtin_mul_overflowUint64": {}, + "__builtin_nan": {}, + "__builtin_nanf": {}, + "__builtin_nanl": {}, + "__builtin_object_size": {}, + "__builtin_popcount": {}, + "__builtin_popcountl": {}, + "__builtin_prefetch": {}, + "__builtin_printf": {}, + "__builtin_snprintf": {}, + "__builtin_sprintf": {}, + "__builtin_strchr": {}, + "__builtin_strcmp": {}, + "__builtin_strcpy": {}, + "__builtin_strlen": {}, + "__builtin_sub_overflowInt64": {}, + "__builtin_trap": {}, + "__builtin_unreachable": {}, + "__ccgo_dmesg": {}, + "__ccgo_getMutexType": {}, + "__ccgo_in6addr_anyp": {}, + "__ccgo_pthreadAttrGetDetachState": {}, + "__ccgo_pthreadMutexattrGettype": {}, + "__ccgo_sqlite3_log": {}, + "__cmsg_nxthdr": {}, + "__ctype_get_mb_cur_max": {}, + "__errno": {}, + "__errno_location": {}, + "__error": {}, + "__floatscan": {}, + "__h_errno_location": {}, + "__inet_aton": {}, + "__inet_ntoa": {}, + "__intscan": {}, + "__isalnum_l": {}, + "__isalpha_l": {}, + "__isdigit_l": {}, + "__isnan": {}, + "__isnanf": {}, + "__isnanl": {}, + "__isoc99_sscanf": {}, + "__isprint_l": {}, + "__isthreaded": {}, + "__lookup_ipliteral": {}, + "__lookup_name": {}, + "__lookup_serv": {}, + "__mb_sb_limit": {}, + "__runes_for_locale": {}, + "__sF": {}, + "__shgetc": {}, + "__shlim": {}, + "__srget": {}, + "__stderrp": {}, + "__stdinp": {}, + "__stdoutp": {}, + "__swbuf": {}, + "__sync_add_and_fetch_uint32": {}, + "__sync_sub_and_fetch_uint32": {}, + "__syscall1": {}, + "__syscall3": {}, + "__syscall4": {}, + "__toread": {}, + "__toread_needs_stdio_exit": {}, + "__uflow": {}, + "__xuname": {}, + "_ctype_tab_": {}, + "_exit": {}, + "_longjmp": {}, + "_obstack_begin": {}, + "_obstack_newchunk": {}, + "_setjmp": {}, + "_tolower_tab_": {}, + "_toupper_tab_": {}, + "abort": {}, + "abs": {}, + "accept": {}, + "access": {}, + "acos": {}, + "acosh": {}, + "alarm": {}, + "asin": {}, + "asinh": {}, + "atan": {}, + "atan2": {}, + "atanh": {}, + "atexit": {}, + "atof": {}, + "atoi": {}, + "atol": {}, + "backtrace": {}, + "backtrace_symbols_fd": {}, + "bind": {}, + "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, + "bzero": {}, + "calloc": {}, + "ceil": {}, + "ceilf": {}, + "cfgetospeed": {}, + "cfsetispeed": {}, + "cfsetospeed": {}, + "chdir": {}, + "chflags": {}, + "chmod": {}, + "chown": {}, + "clock_gettime": {}, + "close": {}, + "closedir": {}, + "confstr": {}, + "connect": {}, + "copysign": {}, + "copysignf": {}, + "copysignl": {}, + "cos": {}, + "cosf": {}, + "cosh": {}, + "ctime": {}, + "ctime_r": {}, + "dlclose": {}, + "dlerror": {}, + "dlopen": {}, + "dlsym": {}, + "dup2": {}, + "endpwent": {}, + "environ": {}, + "execvp": {}, + "exit": {}, + "exp": {}, + "fabs": {}, + "fabsf": {}, + "fabsl": {}, + "fchmod": {}, + "fchown": {}, + "fclose": {}, + "fcntl": {}, + "fcntl64": {}, + "fdopen": {}, + "ferror": {}, + "fflush": {}, + "fgetc": {}, + "fgets": {}, + "fileno": {}, + "floor": {}, + "fmod": {}, + "fmodl": {}, + "fopen": {}, + "fopen64": {}, + "fork": {}, + "fprintf": {}, + "fputc": {}, + "fputs": {}, + "fread": {}, + "free": {}, + "freeaddrinfo": {}, + "frexp": {}, + "fscanf": {}, + "fseek": {}, + "fstat": {}, + "fstat64": {}, + "fsync": {}, + "ftell": {}, + "ftruncate": {}, + "fts64_close": {}, + "fts64_open": {}, + "fts64_read": {}, + "fts_close": {}, + "fts_open": {}, + "fts_read": {}, + "fwrite": {}, + "gai_strerror": {}, + "getaddrinfo": {}, + "getc": {}, + "getcwd": {}, + "getegid": {}, + "getentropy": {}, + "getenv": {}, + "geteuid": {}, + "getgid": {}, + "getgrgid": {}, + "getgrgid_r": {}, + "getgrnam": {}, + "getgrnam_r": {}, + "gethostbyaddr": {}, + "gethostbyaddr_r": {}, + "gethostbyname": {}, + "gethostbyname2": {}, + "gethostbyname2_r": {}, + "gethostname": {}, + "getnameinfo": {}, + "getpeername": {}, + "getpid": {}, + "getpwnam": {}, + "getpwnam_r": {}, + "getpwuid": {}, + "getpwuid_r": {}, + "getresgid": {}, + "getresuid": {}, + "getrlimit": {}, + "getrlimit64": {}, + "getrusage": {}, + "getservbyname": {}, + "getsockname": {}, + "getsockopt": {}, + "gettimeofday": {}, + "getuid": {}, + "gmtime_r": {}, + "h_errno": {}, + "htonl": {}, + "htons": {}, + "hypot": {}, + "inet_ntoa": {}, + "inet_ntop": {}, + "inet_pton": {}, + "initstate": {}, + "initstate_r": {}, + "ioctl": {}, + "isalnum": {}, + "isalpha": {}, + "isascii": {}, + "isatty": {}, + "isdigit": {}, + "isnan": {}, + "isnanf": {}, + "isnanl": {}, + "isprint": {}, + "kill": {}, + "ldexp": {}, + "link": {}, + "listen": {}, + "llabs": {}, + "localtime": {}, + "localtime_r": {}, + "log": {}, + "log10": {}, + "longjmp": {}, + "lrand48": {}, + "lseek": {}, + "lseek64": {}, + "lstat": {}, + "lstat64": {}, + "malloc": {}, + "mblen": {}, + "mbstowcs": {}, + "mbtowc": {}, + "memchr": {}, + "memcmp": {}, + "memcpy": {}, + "memmove": {}, + "memset": {}, + "mkdir": {}, + "mkfifo": {}, + "mknod": {}, + "mkostemp": {}, + "mkstemp": {}, + "mkstemp64": {}, + "mkstemps": {}, + "mkstemps64": {}, + "mktime": {}, + "mmap": {}, + "modf": {}, + "munmap": {}, + "nl_langinfo": {}, + "ntohs": {}, + "obstack_free": {}, + "obstack_vprintf": {}, + "open": {}, + "open64": {}, + "opendir": {}, + "openpty": {}, + "pathconf": {}, + "pause": {}, + "pclose": {}, + "perror": {}, + "pipe": {}, + "poll": {}, + "popen": {}, + "pow": {}, + "printf": {}, + "pselect": {}, + "pthread_attr_destroy": {}, + "pthread_attr_getdetachstate": {}, + "pthread_attr_init": {}, + "pthread_attr_setdetachstate": {}, + "pthread_attr_setscope": {}, + "pthread_attr_setstacksize": {}, + "pthread_cond_broadcast": {}, + "pthread_cond_destroy": {}, + "pthread_cond_init": {}, + "pthread_cond_signal": {}, + "pthread_cond_timedwait": {}, + "pthread_cond_wait": {}, + "pthread_create": {}, + "pthread_detach": {}, + "pthread_equal": {}, + "pthread_exit": {}, + "pthread_getspecific": {}, + "pthread_join": {}, + "pthread_key_create": {}, + "pthread_key_delete": {}, + "pthread_mutex_destroy": {}, + "pthread_mutex_init": {}, + "pthread_mutex_lock": {}, + "pthread_mutex_trylock": {}, + "pthread_mutex_unlock": {}, + "pthread_mutexattr_destroy": {}, + "pthread_mutexattr_init": {}, + "pthread_mutexattr_settype": {}, + "pthread_self": {}, + "pthread_setspecific": {}, + "putc": {}, + "putchar": {}, + "puts": {}, + "qsort": {}, + "raise": {}, + "rand": {}, + "random": {}, + "random_r": {}, + "read": {}, + "readdir": {}, + "readdir64": {}, + "readlink": {}, + "readv": {}, + "realloc": {}, + "reallocarray": {}, + "realpath": {}, + "recv": {}, + "recvfrom": {}, + "recvmsg": {}, + "remove": {}, + "rename": {}, + "rewind": {}, + "rindex": {}, + "rint": {}, + "rmdir": {}, + "round": {}, + "scalbn": {}, + "scalbnl": {}, + "sched_yield": {}, + "select": {}, + "send": {}, + "sendmsg": {}, + "sendto": {}, + "setbuf": {}, + "setenv": {}, + "setjmp": {}, + "setlocale": {}, + "setrlimit": {}, + "setrlimit64": {}, + "setsid": {}, + "setsockopt": {}, + "setstate": {}, + "setvbuf": {}, + "shmat": {}, + "shmctl": {}, + "shmdt": {}, + "shutdown": {}, + "sigaction": {}, + "signal": {}, + "sin": {}, + "sinf": {}, + "sinh": {}, + "sleep": {}, + "snprintf": {}, + "socket": {}, + "sprintf": {}, + "sqrt": {}, + "srand48": {}, + "sscanf": {}, + "stat": {}, + "stat64": {}, + "stderr": {}, + "stdin": {}, + "stdout": {}, + "strcasecmp": {}, + "strcat": {}, + "strchr": {}, + "strcmp": {}, + "strcpy": {}, + "strcspn": {}, + "strdup": {}, + "strerror": {}, + "strerror_r": {}, + "strlen": {}, + "strncmp": {}, + "strncpy": {}, + "strnlen": {}, + "strpbrk": {}, + "strrchr": {}, + "strspn": {}, + "strstr": {}, + "strtod": {}, + "strtof": {}, + "strtoimax": {}, + "strtol": {}, + "strtold": {}, + "strtoll": {}, + "strtoul": {}, + "strtoull": {}, + "strtoumax": {}, + "symlink": {}, + "sysconf": {}, + "system": {}, + "tan": {}, + "tanh": {}, + "tcgetattr": {}, + "tcsendbreak": {}, + "tcsetattr": {}, + "time": {}, + "tmpfile": {}, + "tolower": {}, + "toupper": {}, + "trunc": {}, + "tzset": {}, + "umask": {}, + "uname": {}, + "ungetc": {}, + "unlink": {}, + "unsetenv": {}, + "usleep": {}, + "utime": {}, + "utimes": {}, + "uuid_generate_random": {}, + "uuid_parse": {}, + "uuid_unparse": {}, + "vasprintf": {}, + "vfprintf": {}, + "vprintf": {}, + "vsnprintf": {}, + "vsprintf": {}, + "waitpid": {}, + "wcschr": {}, + "wctomb": {}, + "wcwidth": {}, + "write": {}, + "writev": {}, + "zero_struct_address": {}, +} diff --git a/vendor/modernc.org/libc/capi_openbsd_386.go b/vendor/modernc.org/libc/capi_openbsd_386.go new file mode 100644 index 00000000..dbcc423b --- /dev/null +++ b/vendor/modernc.org/libc/capi_openbsd_386.go @@ -0,0 +1,510 @@ +// Code generated by 'go generate' - DO NOT EDIT. + +package libc // import "modernc.org/libc" + +var CAPI = map[string]struct{}{ + "_C_ctype_": {}, + "_IO_putc": {}, + "_ThreadRuneLocale": {}, + "___errno_location": {}, + "___runetype": {}, + "__assert": {}, + "__assert13": {}, + "__assert2": {}, + "__assert_fail": {}, + "__builtin___memcpy_chk": {}, + "__builtin___memmove_chk": {}, + "__builtin___memset_chk": {}, + "__builtin___snprintf_chk": {}, + "__builtin___sprintf_chk": {}, + "__builtin___strcat_chk": {}, + "__builtin___strcpy_chk": {}, + "__builtin___strncpy_chk": {}, + "__builtin___vsnprintf_chk": {}, + "__builtin_abort": {}, + "__builtin_abs": {}, + "__builtin_add_overflowInt64": {}, + "__builtin_add_overflowUint32": {}, + "__builtin_add_overflowUint64": {}, + "__builtin_bswap16": {}, + "__builtin_bswap32": {}, + "__builtin_bswap64": {}, + "__builtin_bzero": {}, + "__builtin_clz": {}, + "__builtin_clzl": {}, + "__builtin_clzll": {}, + "__builtin_constant_p_impl": {}, + "__builtin_copysign": {}, + "__builtin_copysignf": {}, + "__builtin_copysignl": {}, + "__builtin_exit": {}, + "__builtin_expect": {}, + "__builtin_fabs": {}, + "__builtin_fabsf": {}, + "__builtin_fabsl": {}, + "__builtin_free": {}, + "__builtin_getentropy": {}, + "__builtin_huge_val": {}, + "__builtin_huge_valf": {}, + "__builtin_inf": {}, + "__builtin_inff": {}, + "__builtin_infl": {}, + "__builtin_isnan": {}, + "__builtin_isunordered": {}, + "__builtin_llabs": {}, + "__builtin_malloc": {}, + "__builtin_memcmp": {}, + "__builtin_memcpy": {}, + "__builtin_memset": {}, + "__builtin_mmap": {}, + "__builtin_mul_overflowInt64": {}, + "__builtin_mul_overflowUint128": {}, + "__builtin_mul_overflowUint64": {}, + "__builtin_nan": {}, + "__builtin_nanf": {}, + "__builtin_nanl": {}, + "__builtin_object_size": {}, + "__builtin_popcount": {}, + "__builtin_popcountl": {}, + "__builtin_prefetch": {}, + "__builtin_printf": {}, + "__builtin_snprintf": {}, + "__builtin_sprintf": {}, + "__builtin_strchr": {}, + "__builtin_strcmp": {}, + "__builtin_strcpy": {}, + "__builtin_strlen": {}, + "__builtin_sub_overflowInt64": {}, + "__builtin_trap": {}, + "__builtin_unreachable": {}, + "__ccgo_dmesg": {}, + "__ccgo_getMutexType": {}, + "__ccgo_in6addr_anyp": {}, + "__ccgo_pthreadAttrGetDetachState": {}, + "__ccgo_pthreadMutexattrGettype": {}, + "__ccgo_sqlite3_log": {}, + "__cmsg_nxthdr": {}, + "__ctype_get_mb_cur_max": {}, + "__errno": {}, + "__errno_location": {}, + "__error": {}, + "__floatscan": {}, + "__h_errno_location": {}, + "__inet_aton": {}, + "__inet_ntoa": {}, + "__intscan": {}, + "__isalnum_l": {}, + "__isalpha_l": {}, + "__isdigit_l": {}, + "__islower_l": {}, + "__isnan": {}, + "__isnanf": {}, + "__isnanl": {}, + "__isoc99_sscanf": {}, + "__isprint_l": {}, + "__isspace_l": {}, + "__isthreaded": {}, + "__isupper_l": {}, + "__isxdigit_l": {}, + "__lookup_ipliteral": {}, + "__lookup_name": {}, + "__lookup_serv": {}, + "__mb_sb_limit": {}, + "__runes_for_locale": {}, + "__sF": {}, + "__shgetc": {}, + "__shlim": {}, + "__srget": {}, + "__stderrp": {}, + "__stdinp": {}, + "__stdoutp": {}, + "__swbuf": {}, + "__sync_add_and_fetch_uint32": {}, + "__sync_sub_and_fetch_uint32": {}, + "__syscall1": {}, + "__syscall3": {}, + "__syscall4": {}, + "__toread": {}, + "__toread_needs_stdio_exit": {}, + "__uflow": {}, + "__xuname": {}, + "_ctype_": {}, + "_exit": {}, + "_longjmp": {}, + "_obstack_begin": {}, + "_obstack_newchunk": {}, + "_setjmp": {}, + "_tolower_tab_": {}, + "_toupper_tab_": {}, + "abort": {}, + "abs": {}, + "accept": {}, + "access": {}, + "acos": {}, + "acosh": {}, + "alarm": {}, + "asin": {}, + "asinh": {}, + "atan": {}, + "atan2": {}, + "atanh": {}, + "atexit": {}, + "atof": {}, + "atoi": {}, + "atol": {}, + "backtrace": {}, + "backtrace_symbols_fd": {}, + "bind": {}, + "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, + "bzero": {}, + "calloc": {}, + "ceil": {}, + "ceilf": {}, + "cfgetospeed": {}, + "cfsetispeed": {}, + "cfsetospeed": {}, + "chdir": {}, + "chflags": {}, + "chmod": {}, + "chown": {}, + "clock_gettime": {}, + "close": {}, + "closedir": {}, + "confstr": {}, + "connect": {}, + "copysign": {}, + "copysignf": {}, + "copysignl": {}, + "cos": {}, + "cosf": {}, + "cosh": {}, + "ctime": {}, + "ctime_r": {}, + "dlclose": {}, + "dlerror": {}, + "dlopen": {}, + "dlsym": {}, + "dup2": {}, + "endpwent": {}, + "environ": {}, + "execvp": {}, + "exit": {}, + "exp": {}, + "fabs": {}, + "fabsf": {}, + "fabsl": {}, + "fchmod": {}, + "fchown": {}, + "fclose": {}, + "fcntl": {}, + "fcntl64": {}, + "fdopen": {}, + "ferror": {}, + "fflush": {}, + "fgetc": {}, + "fgets": {}, + "fileno": {}, + "floor": {}, + "fmod": {}, + "fmodl": {}, + "fopen": {}, + "fopen64": {}, + "fork": {}, + "fprintf": {}, + "fputc": {}, + "fputs": {}, + "fread": {}, + "free": {}, + "freeaddrinfo": {}, + "frexp": {}, + "fscanf": {}, + "fseek": {}, + "fstat": {}, + "fstat64": {}, + "fsync": {}, + "ftell": {}, + "ftruncate": {}, + "fts64_close": {}, + "fts64_open": {}, + "fts64_read": {}, + "fts_close": {}, + "fts_open": {}, + "fts_read": {}, + "fwrite": {}, + "gai_strerror": {}, + "getaddrinfo": {}, + "getc": {}, + "getcwd": {}, + "getegid": {}, + "getentropy": {}, + "getenv": {}, + "geteuid": {}, + "getgid": {}, + "getgrgid": {}, + "getgrgid_r": {}, + "getgrnam": {}, + "getgrnam_r": {}, + "gethostbyaddr": {}, + "gethostbyaddr_r": {}, + "gethostbyname": {}, + "gethostbyname2": {}, + "gethostbyname2_r": {}, + "gethostname": {}, + "getnameinfo": {}, + "getpagesize": {}, + "getpeername": {}, + "getpid": {}, + "getpwnam": {}, + "getpwnam_r": {}, + "getpwuid": {}, + "getpwuid_r": {}, + "getresgid": {}, + "getresuid": {}, + "getrlimit": {}, + "getrlimit64": {}, + "getrusage": {}, + "getservbyname": {}, + "getsockname": {}, + "getsockopt": {}, + "gettimeofday": {}, + "getuid": {}, + "gmtime_r": {}, + "h_errno": {}, + "htonl": {}, + "htons": {}, + "hypot": {}, + "inet_ntoa": {}, + "inet_ntop": {}, + "inet_pton": {}, + "initstate": {}, + "initstate_r": {}, + "ioctl": {}, + "isalnum": {}, + "isalpha": {}, + "isascii": {}, + "isatty": {}, + "isblank": {}, + "isdigit": {}, + "islower": {}, + "isnan": {}, + "isnanf": {}, + "isnanl": {}, + "isprint": {}, + "isspace": {}, + "isupper": {}, + "isxdigit": {}, + "kill": {}, + "ldexp": {}, + "link": {}, + "listen": {}, + "llabs": {}, + "localtime": {}, + "localtime_r": {}, + "log": {}, + "log10": {}, + "longjmp": {}, + "lrand48": {}, + "lseek": {}, + "lseek64": {}, + "lstat": {}, + "lstat64": {}, + "malloc": {}, + "mblen": {}, + "mbstowcs": {}, + "mbtowc": {}, + "memchr": {}, + "memcmp": {}, + "memcpy": {}, + "memmove": {}, + "memset": {}, + "mkdir": {}, + "mkfifo": {}, + "mknod": {}, + "mkostemp": {}, + "mkstemp": {}, + "mkstemp64": {}, + "mkstemps": {}, + "mkstemps64": {}, + "mktime": {}, + "mmap": {}, + "modf": {}, + "munmap": {}, + "nl_langinfo": {}, + "ntohs": {}, + "obstack_free": {}, + "obstack_vprintf": {}, + "open": {}, + "open64": {}, + "opendir": {}, + "openpty": {}, + "pathconf": {}, + "pause": {}, + "pclose": {}, + "perror": {}, + "pipe": {}, + "poll": {}, + "popen": {}, + "pow": {}, + "printf": {}, + "pselect": {}, + "pthread_attr_destroy": {}, + "pthread_attr_getdetachstate": {}, + "pthread_attr_init": {}, + "pthread_attr_setdetachstate": {}, + "pthread_attr_setscope": {}, + "pthread_attr_setstacksize": {}, + "pthread_cond_broadcast": {}, + "pthread_cond_destroy": {}, + "pthread_cond_init": {}, + "pthread_cond_signal": {}, + "pthread_cond_timedwait": {}, + "pthread_cond_wait": {}, + "pthread_create": {}, + "pthread_detach": {}, + "pthread_equal": {}, + "pthread_exit": {}, + "pthread_getspecific": {}, + "pthread_join": {}, + "pthread_key_create": {}, + "pthread_key_delete": {}, + "pthread_mutex_destroy": {}, + "pthread_mutex_init": {}, + "pthread_mutex_lock": {}, + "pthread_mutex_trylock": {}, + "pthread_mutex_unlock": {}, + "pthread_mutexattr_destroy": {}, + "pthread_mutexattr_init": {}, + "pthread_mutexattr_settype": {}, + "pthread_self": {}, + "pthread_setspecific": {}, + "putc": {}, + "putchar": {}, + "puts": {}, + "qsort": {}, + "raise": {}, + "rand": {}, + "random": {}, + "random_r": {}, + "read": {}, + "readdir": {}, + "readdir64": {}, + "readlink": {}, + "readv": {}, + "realloc": {}, + "reallocarray": {}, + "realpath": {}, + "recv": {}, + "recvfrom": {}, + "recvmsg": {}, + "remove": {}, + "rename": {}, + "rewind": {}, + "rindex": {}, + "rint": {}, + "rmdir": {}, + "round": {}, + "scalbn": {}, + "scalbnl": {}, + "sched_yield": {}, + "select": {}, + "send": {}, + "sendmsg": {}, + "sendto": {}, + "setbuf": {}, + "setenv": {}, + "setjmp": {}, + "setlocale": {}, + "setrlimit": {}, + "setrlimit64": {}, + "setsid": {}, + "setsockopt": {}, + "setstate": {}, + "setvbuf": {}, + "shmat": {}, + "shmctl": {}, + "shmdt": {}, + "shutdown": {}, + "sigaction": {}, + "signal": {}, + "sin": {}, + "sinf": {}, + "sinh": {}, + "sleep": {}, + "snprintf": {}, + "socket": {}, + "sprintf": {}, + "sqrt": {}, + "srand48": {}, + "sscanf": {}, + "stat": {}, + "stat64": {}, + "stderr": {}, + "stdin": {}, + "stdout": {}, + "strcasecmp": {}, + "strcat": {}, + "strchr": {}, + "strcmp": {}, + "strcpy": {}, + "strcspn": {}, + "strdup": {}, + "strerror": {}, + "strerror_r": {}, + "strlen": {}, + "strncmp": {}, + "strncpy": {}, + "strnlen": {}, + "strpbrk": {}, + "strrchr": {}, + "strspn": {}, + "strstr": {}, + "strtod": {}, + "strtof": {}, + "strtoimax": {}, + "strtol": {}, + "strtold": {}, + "strtoll": {}, + "strtoul": {}, + "strtoull": {}, + "strtoumax": {}, + "symlink": {}, + "sysconf": {}, + "system": {}, + "tan": {}, + "tanh": {}, + "tcgetattr": {}, + "tcsendbreak": {}, + "tcsetattr": {}, + "time": {}, + "tmpfile": {}, + "tolower": {}, + "toupper": {}, + "trunc": {}, + "tzset": {}, + "umask": {}, + "uname": {}, + "ungetc": {}, + "unlink": {}, + "unsetenv": {}, + "usleep": {}, + "utime": {}, + "utimes": {}, + "uuid_generate_random": {}, + "uuid_parse": {}, + "uuid_unparse": {}, + "vasprintf": {}, + "vfprintf": {}, + "vprintf": {}, + "vsnprintf": {}, + "vsprintf": {}, + "waitpid": {}, + "wcschr": {}, + "wctomb": {}, + "wcwidth": {}, + "write": {}, + "writev": {}, + "zero_struct_address": {}, +} diff --git a/vendor/modernc.org/libc/capi_openbsd_amd64.go b/vendor/modernc.org/libc/capi_openbsd_amd64.go index 00e93a20..7ba9c55d 100644 --- a/vendor/modernc.org/libc/capi_openbsd_amd64.go +++ b/vendor/modernc.org/libc/capi_openbsd_amd64.go @@ -3,8 +3,7 @@ package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ - "_CurrentRuneLocale": {}, - "_DefaultRuneLocale": {}, + "_C_ctype_": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, @@ -50,8 +49,10 @@ var CAPI = map[string]struct{}{ "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, + "__builtin_isblank": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -128,6 +129,7 @@ var CAPI = map[string]struct{}{ "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, + "_ctype_": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, @@ -155,6 +157,9 @@ var CAPI = map[string]struct{}{ "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, @@ -282,6 +287,7 @@ var CAPI = map[string]struct{}{ "isalpha": {}, "isascii": {}, "isatty": {}, + "isblank": {}, "isdigit": {}, "islower": {}, "isnan": {}, @@ -295,6 +301,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, diff --git a/vendor/modernc.org/libc/capi_openbsd_arm64.go b/vendor/modernc.org/libc/capi_openbsd_arm64.go new file mode 100644 index 00000000..7ba9c55d --- /dev/null +++ b/vendor/modernc.org/libc/capi_openbsd_arm64.go @@ -0,0 +1,511 @@ +// Code generated by 'go generate' - DO NOT EDIT. + +package libc // import "modernc.org/libc" + +var CAPI = map[string]struct{}{ + "_C_ctype_": {}, + "_IO_putc": {}, + "_ThreadRuneLocale": {}, + "___errno_location": {}, + "___runetype": {}, + "__assert": {}, + "__assert13": {}, + "__assert2": {}, + "__assert_fail": {}, + "__builtin___memcpy_chk": {}, + "__builtin___memmove_chk": {}, + "__builtin___memset_chk": {}, + "__builtin___snprintf_chk": {}, + "__builtin___sprintf_chk": {}, + "__builtin___strcat_chk": {}, + "__builtin___strcpy_chk": {}, + "__builtin___strncpy_chk": {}, + "__builtin___vsnprintf_chk": {}, + "__builtin_abort": {}, + "__builtin_abs": {}, + "__builtin_add_overflowInt64": {}, + "__builtin_add_overflowUint32": {}, + "__builtin_add_overflowUint64": {}, + "__builtin_bswap16": {}, + "__builtin_bswap32": {}, + "__builtin_bswap64": {}, + "__builtin_bzero": {}, + "__builtin_clz": {}, + "__builtin_clzl": {}, + "__builtin_clzll": {}, + "__builtin_constant_p_impl": {}, + "__builtin_copysign": {}, + "__builtin_copysignf": {}, + "__builtin_copysignl": {}, + "__builtin_exit": {}, + "__builtin_expect": {}, + "__builtin_fabs": {}, + "__builtin_fabsf": {}, + "__builtin_fabsl": {}, + "__builtin_free": {}, + "__builtin_getentropy": {}, + "__builtin_huge_val": {}, + "__builtin_huge_valf": {}, + "__builtin_inf": {}, + "__builtin_inff": {}, + "__builtin_infl": {}, + "__builtin_isblank": {}, + "__builtin_isnan": {}, + "__builtin_isunordered": {}, + "__builtin_llabs": {}, + "__builtin_malloc": {}, + "__builtin_memcmp": {}, + "__builtin_memcpy": {}, + "__builtin_memset": {}, + "__builtin_mmap": {}, + "__builtin_mul_overflowInt64": {}, + "__builtin_mul_overflowUint128": {}, + "__builtin_mul_overflowUint64": {}, + "__builtin_nan": {}, + "__builtin_nanf": {}, + "__builtin_nanl": {}, + "__builtin_object_size": {}, + "__builtin_popcount": {}, + "__builtin_popcountl": {}, + "__builtin_prefetch": {}, + "__builtin_printf": {}, + "__builtin_snprintf": {}, + "__builtin_sprintf": {}, + "__builtin_strchr": {}, + "__builtin_strcmp": {}, + "__builtin_strcpy": {}, + "__builtin_strlen": {}, + "__builtin_sub_overflowInt64": {}, + "__builtin_trap": {}, + "__builtin_unreachable": {}, + "__ccgo_dmesg": {}, + "__ccgo_getMutexType": {}, + "__ccgo_in6addr_anyp": {}, + "__ccgo_pthreadAttrGetDetachState": {}, + "__ccgo_pthreadMutexattrGettype": {}, + "__ccgo_sqlite3_log": {}, + "__cmsg_nxthdr": {}, + "__ctype_get_mb_cur_max": {}, + "__errno": {}, + "__errno_location": {}, + "__error": {}, + "__floatscan": {}, + "__h_errno_location": {}, + "__inet_aton": {}, + "__inet_ntoa": {}, + "__intscan": {}, + "__isalnum_l": {}, + "__isalpha_l": {}, + "__isdigit_l": {}, + "__islower_l": {}, + "__isnan": {}, + "__isnanf": {}, + "__isnanl": {}, + "__isoc99_sscanf": {}, + "__isprint_l": {}, + "__isspace_l": {}, + "__isthreaded": {}, + "__isupper_l": {}, + "__isxdigit_l": {}, + "__lookup_ipliteral": {}, + "__lookup_name": {}, + "__lookup_serv": {}, + "__mb_sb_limit": {}, + "__runes_for_locale": {}, + "__sF": {}, + "__shgetc": {}, + "__shlim": {}, + "__srget": {}, + "__stderrp": {}, + "__stdinp": {}, + "__stdoutp": {}, + "__swbuf": {}, + "__sync_add_and_fetch_uint32": {}, + "__sync_sub_and_fetch_uint32": {}, + "__syscall1": {}, + "__syscall3": {}, + "__syscall4": {}, + "__toread": {}, + "__toread_needs_stdio_exit": {}, + "__uflow": {}, + "__xuname": {}, + "_ctype_": {}, + "_exit": {}, + "_longjmp": {}, + "_obstack_begin": {}, + "_obstack_newchunk": {}, + "_setjmp": {}, + "_tolower_tab_": {}, + "_toupper_tab_": {}, + "abort": {}, + "abs": {}, + "accept": {}, + "access": {}, + "acos": {}, + "acosh": {}, + "alarm": {}, + "asin": {}, + "asinh": {}, + "atan": {}, + "atan2": {}, + "atanh": {}, + "atexit": {}, + "atof": {}, + "atoi": {}, + "atol": {}, + "backtrace": {}, + "backtrace_symbols_fd": {}, + "bind": {}, + "bsearch": {}, + "bswap16": {}, + "bswap32": {}, + "bswap64": {}, + "bzero": {}, + "calloc": {}, + "ceil": {}, + "ceilf": {}, + "cfgetospeed": {}, + "cfsetispeed": {}, + "cfsetospeed": {}, + "chdir": {}, + "chflags": {}, + "chmod": {}, + "chown": {}, + "clock_gettime": {}, + "close": {}, + "closedir": {}, + "confstr": {}, + "connect": {}, + "copysign": {}, + "copysignf": {}, + "copysignl": {}, + "cos": {}, + "cosf": {}, + "cosh": {}, + "ctime": {}, + "ctime_r": {}, + "dlclose": {}, + "dlerror": {}, + "dlopen": {}, + "dlsym": {}, + "dup2": {}, + "endpwent": {}, + "environ": {}, + "execvp": {}, + "exit": {}, + "exp": {}, + "fabs": {}, + "fabsf": {}, + "fabsl": {}, + "fchmod": {}, + "fchown": {}, + "fclose": {}, + "fcntl": {}, + "fcntl64": {}, + "fdopen": {}, + "ferror": {}, + "fflush": {}, + "fgetc": {}, + "fgets": {}, + "fileno": {}, + "floor": {}, + "fmod": {}, + "fmodl": {}, + "fopen": {}, + "fopen64": {}, + "fork": {}, + "fprintf": {}, + "fputc": {}, + "fputs": {}, + "fread": {}, + "free": {}, + "freeaddrinfo": {}, + "frexp": {}, + "fscanf": {}, + "fseek": {}, + "fstat": {}, + "fstat64": {}, + "fsync": {}, + "ftell": {}, + "ftruncate": {}, + "fts64_close": {}, + "fts64_open": {}, + "fts64_read": {}, + "fts_close": {}, + "fts_open": {}, + "fts_read": {}, + "fwrite": {}, + "gai_strerror": {}, + "getaddrinfo": {}, + "getc": {}, + "getcwd": {}, + "getegid": {}, + "getentropy": {}, + "getenv": {}, + "geteuid": {}, + "getgid": {}, + "getgrgid": {}, + "getgrgid_r": {}, + "getgrnam": {}, + "getgrnam_r": {}, + "gethostbyaddr": {}, + "gethostbyaddr_r": {}, + "gethostbyname": {}, + "gethostbyname2": {}, + "gethostbyname2_r": {}, + "gethostname": {}, + "getnameinfo": {}, + "getpagesize": {}, + "getpeername": {}, + "getpid": {}, + "getpwnam": {}, + "getpwnam_r": {}, + "getpwuid": {}, + "getpwuid_r": {}, + "getresgid": {}, + "getresuid": {}, + "getrlimit": {}, + "getrlimit64": {}, + "getrusage": {}, + "getservbyname": {}, + "getsockname": {}, + "getsockopt": {}, + "gettimeofday": {}, + "getuid": {}, + "gmtime_r": {}, + "h_errno": {}, + "htonl": {}, + "htons": {}, + "hypot": {}, + "inet_ntoa": {}, + "inet_ntop": {}, + "inet_pton": {}, + "initstate": {}, + "initstate_r": {}, + "ioctl": {}, + "isalnum": {}, + "isalpha": {}, + "isascii": {}, + "isatty": {}, + "isblank": {}, + "isdigit": {}, + "islower": {}, + "isnan": {}, + "isnanf": {}, + "isnanl": {}, + "isprint": {}, + "isspace": {}, + "isupper": {}, + "isxdigit": {}, + "kill": {}, + "ldexp": {}, + "link": {}, + "listen": {}, + "llabs": {}, + "localtime": {}, + "localtime_r": {}, + "log": {}, + "log10": {}, + "longjmp": {}, + "lrand48": {}, + "lseek": {}, + "lseek64": {}, + "lstat": {}, + "lstat64": {}, + "malloc": {}, + "mblen": {}, + "mbstowcs": {}, + "mbtowc": {}, + "memchr": {}, + "memcmp": {}, + "memcpy": {}, + "memmove": {}, + "memset": {}, + "mkdir": {}, + "mkfifo": {}, + "mknod": {}, + "mkostemp": {}, + "mkstemp": {}, + "mkstemp64": {}, + "mkstemps": {}, + "mkstemps64": {}, + "mktime": {}, + "mmap": {}, + "modf": {}, + "munmap": {}, + "nl_langinfo": {}, + "ntohs": {}, + "obstack_free": {}, + "obstack_vprintf": {}, + "open": {}, + "open64": {}, + "opendir": {}, + "openpty": {}, + "pathconf": {}, + "pause": {}, + "pclose": {}, + "perror": {}, + "pipe": {}, + "poll": {}, + "popen": {}, + "pow": {}, + "printf": {}, + "pselect": {}, + "pthread_attr_destroy": {}, + "pthread_attr_getdetachstate": {}, + "pthread_attr_init": {}, + "pthread_attr_setdetachstate": {}, + "pthread_attr_setscope": {}, + "pthread_attr_setstacksize": {}, + "pthread_cond_broadcast": {}, + "pthread_cond_destroy": {}, + "pthread_cond_init": {}, + "pthread_cond_signal": {}, + "pthread_cond_timedwait": {}, + "pthread_cond_wait": {}, + "pthread_create": {}, + "pthread_detach": {}, + "pthread_equal": {}, + "pthread_exit": {}, + "pthread_getspecific": {}, + "pthread_join": {}, + "pthread_key_create": {}, + "pthread_key_delete": {}, + "pthread_mutex_destroy": {}, + "pthread_mutex_init": {}, + "pthread_mutex_lock": {}, + "pthread_mutex_trylock": {}, + "pthread_mutex_unlock": {}, + "pthread_mutexattr_destroy": {}, + "pthread_mutexattr_init": {}, + "pthread_mutexattr_settype": {}, + "pthread_self": {}, + "pthread_setspecific": {}, + "putc": {}, + "putchar": {}, + "puts": {}, + "qsort": {}, + "raise": {}, + "rand": {}, + "random": {}, + "random_r": {}, + "read": {}, + "readdir": {}, + "readdir64": {}, + "readlink": {}, + "readv": {}, + "realloc": {}, + "reallocarray": {}, + "realpath": {}, + "recv": {}, + "recvfrom": {}, + "recvmsg": {}, + "remove": {}, + "rename": {}, + "rewind": {}, + "rindex": {}, + "rint": {}, + "rmdir": {}, + "round": {}, + "scalbn": {}, + "scalbnl": {}, + "sched_yield": {}, + "select": {}, + "send": {}, + "sendmsg": {}, + "sendto": {}, + "setbuf": {}, + "setenv": {}, + "setjmp": {}, + "setlocale": {}, + "setrlimit": {}, + "setrlimit64": {}, + "setsid": {}, + "setsockopt": {}, + "setstate": {}, + "setvbuf": {}, + "shmat": {}, + "shmctl": {}, + "shmdt": {}, + "shutdown": {}, + "sigaction": {}, + "signal": {}, + "sin": {}, + "sinf": {}, + "sinh": {}, + "sleep": {}, + "snprintf": {}, + "socket": {}, + "sprintf": {}, + "sqrt": {}, + "srand48": {}, + "sscanf": {}, + "stat": {}, + "stat64": {}, + "stderr": {}, + "stdin": {}, + "stdout": {}, + "strcasecmp": {}, + "strcat": {}, + "strchr": {}, + "strcmp": {}, + "strcpy": {}, + "strcspn": {}, + "strdup": {}, + "strerror": {}, + "strerror_r": {}, + "strlen": {}, + "strncmp": {}, + "strncpy": {}, + "strnlen": {}, + "strpbrk": {}, + "strrchr": {}, + "strspn": {}, + "strstr": {}, + "strtod": {}, + "strtof": {}, + "strtoimax": {}, + "strtol": {}, + "strtold": {}, + "strtoll": {}, + "strtoul": {}, + "strtoull": {}, + "strtoumax": {}, + "symlink": {}, + "sysconf": {}, + "system": {}, + "tan": {}, + "tanh": {}, + "tcgetattr": {}, + "tcsendbreak": {}, + "tcsetattr": {}, + "time": {}, + "tmpfile": {}, + "tolower": {}, + "toupper": {}, + "trunc": {}, + "tzset": {}, + "umask": {}, + "uname": {}, + "ungetc": {}, + "unlink": {}, + "unsetenv": {}, + "usleep": {}, + "utime": {}, + "utimes": {}, + "uuid_generate_random": {}, + "uuid_parse": {}, + "uuid_unparse": {}, + "vasprintf": {}, + "vfprintf": {}, + "vprintf": {}, + "vsnprintf": {}, + "vsprintf": {}, + "waitpid": {}, + "wcschr": {}, + "wctomb": {}, + "wcwidth": {}, + "write": {}, + "writev": {}, + "zero_struct_address": {}, +} diff --git a/vendor/modernc.org/libc/capi_windows_386.go b/vendor/modernc.org/libc/capi_windows_386.go index 34da9668..fc04042f 100644 --- a/vendor/modernc.org/libc/capi_windows_386.go +++ b/vendor/modernc.org/libc/capi_windows_386.go @@ -295,6 +295,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -362,6 +363,21 @@ var CAPI = map[string]struct{}{ "__ms_vswscanf": {}, "__ms_vwscanf": {}, "__putenv": {}, + "__stdio_common_vfprintf": {}, + "__stdio_common_vfprintf_p": {}, + "__stdio_common_vfprintf_s": {}, + "__stdio_common_vfscanf": {}, + "__stdio_common_vfwprintf_s": {}, + "__stdio_common_vfwscanf": {}, + "__stdio_common_vsnprintf_s": {}, + "__stdio_common_vsnwprintf_s": {}, + "__stdio_common_vsprintf": {}, + "__stdio_common_vsprintf_p": {}, + "__stdio_common_vsprintf_s": {}, + "__stdio_common_vsscanf": {}, + "__stdio_common_vswprintf": {}, + "__stdio_common_vswprintf_s": {}, + "__stdio_common_vswscanf": {}, "__strchrnul": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, @@ -385,6 +401,7 @@ var CAPI = map[string]struct{}{ "_findfirst64i32": {}, "_findnext32": {}, "_findnext64i32": {}, + "_fstat": {}, "_fstat64": {}, "_fstati64": {}, "_ftime": {}, @@ -552,6 +569,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, diff --git a/vendor/modernc.org/libc/capi_windows_amd64.go b/vendor/modernc.org/libc/capi_windows_amd64.go index e8906789..7fa708d6 100644 --- a/vendor/modernc.org/libc/capi_windows_amd64.go +++ b/vendor/modernc.org/libc/capi_windows_amd64.go @@ -293,6 +293,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -548,6 +549,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, diff --git a/vendor/modernc.org/libc/capi_windows_arm64.go b/vendor/modernc.org/libc/capi_windows_arm64.go index b5c7e1c4..f26fc8c5 100644 --- a/vendor/modernc.org/libc/capi_windows_arm64.go +++ b/vendor/modernc.org/libc/capi_windows_arm64.go @@ -293,6 +293,7 @@ var CAPI = map[string]struct{}{ "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, + "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, @@ -563,6 +564,7 @@ var CAPI = map[string]struct{}{ "ldexp": {}, "link": {}, "listen": {}, + "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, diff --git a/vendor/modernc.org/libc/ccgo.go b/vendor/modernc.org/libc/ccgo.go index ab1a78e6..2dad0cbb 100644 --- a/vendor/modernc.org/libc/ccgo.go +++ b/vendor/modernc.org/libc/ccgo.go @@ -1082,6 +1082,13 @@ func BoolUint64(b bool) uint64 { return 0 } +func BoolUintptr(b bool) uintptr { + if b { + return 1 + } + return 0 +} + func SetBitFieldPtr8Int8(p uintptr, v int8, off int, mask uint8) { *(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask } diff --git a/vendor/modernc.org/libc/errno/capi_darwin_amd64.go b/vendor/modernc.org/libc/errno/capi_darwin_amd64.go index fbe477aa..68fbc75f 100644 --- a/vendor/modernc.org/libc/errno/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/errno/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT. +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT. package errno diff --git a/vendor/modernc.org/libc/errno/capi_freebsd_arm.go b/vendor/modernc.org/libc/errno/capi_freebsd_arm.go new file mode 100644 index 00000000..01fe67e9 --- /dev/null +++ b/vendor/modernc.org/libc/errno/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_freebsd_arm.go -pkgname errno', DO NOT EDIT. + +package errno + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/errno/capi_freebsd_arm64.go b/vendor/modernc.org/libc/errno/capi_freebsd_arm64.go new file mode 100644 index 00000000..59d20adf --- /dev/null +++ b/vendor/modernc.org/libc/errno/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_freebsd_amd64.go -pkgname errno', DO NOT EDIT. + +package errno + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/errno/capi_netbsd_arm.go b/vendor/modernc.org/libc/errno/capi_netbsd_arm.go new file mode 100644 index 00000000..a8813943 --- /dev/null +++ b/vendor/modernc.org/libc/errno/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_netbsd_arm.go -pkgname errno', DO NOT EDIT. + +package errno + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/errno/capi_openbsd_386.go b/vendor/modernc.org/libc/errno/capi_openbsd_386.go new file mode 100644 index 00000000..46d0ab05 --- /dev/null +++ b/vendor/modernc.org/libc/errno/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_openbsd_386.go -pkgname errno', DO NOT EDIT. + +package errno + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/errno/capi_openbsd_arm64.go b/vendor/modernc.org/libc/errno/capi_openbsd_arm64.go new file mode 100644 index 00000000..fd86138a --- /dev/null +++ b/vendor/modernc.org/libc/errno/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_openbsd_arm64.go -pkgname errno', DO NOT EDIT. + +package errno + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/errno/capi_windows_386.go b/vendor/modernc.org/libc/errno/capi_windows_386.go index bf235022..ccd54b76 100644 --- a/vendor/modernc.org/libc/errno/capi_windows_386.go +++ b/vendor/modernc.org/libc/errno/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo errno\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno\errno_windows_386.go -pkgname errno', DO NOT EDIT. +// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT. package errno diff --git a/vendor/modernc.org/libc/errno/errno_darwin_amd64.go b/vendor/modernc.org/libc/errno/errno_darwin_amd64.go index 5b6df9d9..6b369d2f 100644 --- a/vendor/modernc.org/libc/errno/errno_darwin_amd64.go +++ b/vendor/modernc.org/libc/errno/errno_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT. +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT. package errno @@ -15,125 +15,125 @@ var _ atomic.Value var _ unsafe.Pointer const ( - E2BIG = 7 - EACCES = 13 - EADDRINUSE = 48 - EADDRNOTAVAIL = 49 - EAFNOSUPPORT = 47 - EAGAIN = 35 - EALREADY = 37 - EAUTH = 80 - EBADARCH = 86 - EBADEXEC = 85 - EBADF = 9 - EBADMACHO = 88 - EBADMSG = 94 - EBADRPC = 72 - EBUSY = 16 - ECANCELED = 89 - ECHILD = 10 - ECONNABORTED = 53 - ECONNREFUSED = 61 - ECONNRESET = 54 - EDEADLK = 11 - EDESTADDRREQ = 39 - EDEVERR = 83 - EDOM = 33 - EDQUOT = 69 - EEXIST = 17 - EFAULT = 14 - EFBIG = 27 - EFTYPE = 79 - EHOSTDOWN = 64 - EHOSTUNREACH = 65 - EIDRM = 90 - EILSEQ = 92 - EINPROGRESS = 36 - EINTR = 4 - EINVAL = 22 - EIO = 5 - EISCONN = 56 - EISDIR = 21 - ELAST = 106 - ELOOP = 62 - EMFILE = 24 - EMLINK = 31 - EMSGSIZE = 40 - EMULTIHOP = 95 - ENAMETOOLONG = 63 - ENEEDAUTH = 81 - ENETDOWN = 50 - ENETRESET = 52 - ENETUNREACH = 51 - ENFILE = 23 - ENOATTR = 93 - ENOBUFS = 55 - ENODATA = 96 - ENODEV = 19 - ENOENT = 2 - ENOEXEC = 8 - ENOLCK = 77 - ENOLINK = 97 - ENOMEM = 12 - ENOMSG = 91 - ENOPOLICY = 103 - ENOPROTOOPT = 42 - ENOSPC = 28 - ENOSR = 98 - ENOSTR = 99 - ENOSYS = 78 - ENOTBLK = 15 - ENOTCONN = 57 - ENOTDIR = 20 - ENOTEMPTY = 66 - ENOTRECOVERABLE = 104 - ENOTSOCK = 38 - ENOTSUP = 45 - ENOTTY = 25 - ENXIO = 6 - EOPNOTSUPP = 102 - EOVERFLOW = 84 - EOWNERDEAD = 105 - EPERM = 1 - EPFNOSUPPORT = 46 - EPIPE = 32 - EPROCLIM = 67 - EPROCUNAVAIL = 76 - EPROGMISMATCH = 75 - EPROGUNAVAIL = 74 - EPROTO = 100 - EPROTONOSUPPORT = 43 - EPROTOTYPE = 41 - EPWROFF = 82 - EQFULL = 106 - ERANGE = 34 - EREMOTE = 71 - EROFS = 30 - ERPCMISMATCH = 73 - ESHLIBVERS = 87 - ESHUTDOWN = 58 - ESOCKTNOSUPPORT = 44 - ESPIPE = 29 - ESRCH = 3 - ESTALE = 70 - ETIME = 101 - ETIMEDOUT = 60 - ETOOMANYREFS = 59 - ETXTBSY = 26 - EUSERS = 68 - EWOULDBLOCK = 35 - EXDEV = 18 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_ERRNO_T = 0 - X_FILE_OFFSET_BITS = 64 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS_ERRNO_H_ = 0 + E2BIG = 7 // errno.h:94:1: + EACCES = 13 // errno.h:101:1: + EADDRINUSE = 48 // errno.h:161:1: + EADDRNOTAVAIL = 49 // errno.h:162:1: + EAFNOSUPPORT = 47 // errno.h:160:1: + EAGAIN = 35 // errno.h:129:1: + EALREADY = 37 // errno.h:132:1: + EAUTH = 80 // errno.h:213:1: + EBADARCH = 86 // errno.h:226:1: + EBADEXEC = 85 // errno.h:225:1: + EBADF = 9 // errno.h:96:1: + EBADMACHO = 88 // errno.h:228:1: + EBADMSG = 94 // errno.h:240:1: + EBADRPC = 72 // errno.h:201:1: + EBUSY = 16 // errno.h:106:1: + ECANCELED = 89 // errno.h:231:1: + ECHILD = 10 // errno.h:97:1: + ECONNABORTED = 53 // errno.h:168:1: + ECONNREFUSED = 61 // errno.h:178:1: + ECONNRESET = 54 // errno.h:169:1: + EDEADLK = 11 // errno.h:98:1: + EDESTADDRREQ = 39 // errno.h:136:1: + EDEVERR = 83 // errno.h:218:1: + EDOM = 33 // errno.h:125:1: + EDQUOT = 69 // errno.h:195:1: + EEXIST = 17 // errno.h:107:1: + EFAULT = 14 // errno.h:102:1: + EFBIG = 27 // errno.h:117:1: + EFTYPE = 79 // errno.h:212:1: + EHOSTDOWN = 64 // errno.h:185:1: + EHOSTUNREACH = 65 // errno.h:187:1: + EIDRM = 90 // errno.h:233:1: + EILSEQ = 92 // errno.h:235:1: + EINPROGRESS = 36 // errno.h:131:1: + EINTR = 4 // errno.h:91:1: + EINVAL = 22 // errno.h:112:1: + EIO = 5 // errno.h:92:1: + EISCONN = 56 // errno.h:171:1: + EISDIR = 21 // errno.h:111:1: + ELAST = 106 // errno.h:263:1: + ELOOP = 62 // errno.h:180:1: + EMFILE = 24 // errno.h:114:1: + EMLINK = 31 // errno.h:121:1: + EMSGSIZE = 40 // errno.h:137:1: + EMULTIHOP = 95 // errno.h:241:1: + ENAMETOOLONG = 63 // errno.h:181:1: + ENEEDAUTH = 81 // errno.h:214:1: + ENETDOWN = 50 // errno.h:165:1: + ENETRESET = 52 // errno.h:167:1: + ENETUNREACH = 51 // errno.h:166:1: + ENFILE = 23 // errno.h:113:1: + ENOATTR = 93 // errno.h:237:1: + ENOBUFS = 55 // errno.h:170:1: + ENODATA = 96 // errno.h:242:1: + ENODEV = 19 // errno.h:109:1: + ENOENT = 2 // errno.h:89:1: + ENOEXEC = 8 // errno.h:95:1: + ENOLCK = 77 // errno.h:208:1: + ENOLINK = 97 // errno.h:243:1: + ENOMEM = 12 // errno.h:100:1: + ENOMSG = 91 // errno.h:234:1: + ENOPOLICY = 103 // errno.h:254:1: + ENOPROTOOPT = 42 // errno.h:139:1: + ENOSPC = 28 // errno.h:118:1: + ENOSR = 98 // errno.h:244:1: + ENOSTR = 99 // errno.h:245:1: + ENOSYS = 78 // errno.h:209:1: + ENOTBLK = 15 // errno.h:104:1: + ENOTCONN = 57 // errno.h:172:1: + ENOTDIR = 20 // errno.h:110:1: + ENOTEMPTY = 66 // errno.h:188:1: + ENOTRECOVERABLE = 104 // errno.h:257:1: + ENOTSOCK = 38 // errno.h:135:1: + ENOTSUP = 45 // errno.h:144:1: + ENOTTY = 25 // errno.h:115:1: + ENXIO = 6 // errno.h:93:1: + EOPNOTSUPP = 102 // errno.h:251:1: + EOVERFLOW = 84 // errno.h:221:1: + EOWNERDEAD = 105 // errno.h:258:1: + EPERM = 1 // errno.h:88:1: + EPFNOSUPPORT = 46 // errno.h:158:1: + EPIPE = 32 // errno.h:122:1: + EPROCLIM = 67 // errno.h:192:1: + EPROCUNAVAIL = 76 // errno.h:205:1: + EPROGMISMATCH = 75 // errno.h:204:1: + EPROGUNAVAIL = 74 // errno.h:203:1: + EPROTO = 100 // errno.h:246:1: + EPROTONOSUPPORT = 43 // errno.h:140:1: + EPROTOTYPE = 41 // errno.h:138:1: + EPWROFF = 82 // errno.h:217:1: + EQFULL = 106 // errno.h:262:1: + ERANGE = 34 // errno.h:126:1: + EREMOTE = 71 // errno.h:200:1: + EROFS = 30 // errno.h:120:1: + ERPCMISMATCH = 73 // errno.h:202:1: + ESHLIBVERS = 87 // errno.h:227:1: + ESHUTDOWN = 58 // errno.h:174:1: + ESOCKTNOSUPPORT = 44 // errno.h:142:1: + ESPIPE = 29 // errno.h:119:1: + ESRCH = 3 // errno.h:90:1: + ESTALE = 70 // errno.h:198:1: + ETIME = 101 // errno.h:247:1: + ETIMEDOUT = 60 // errno.h:177:1: + ETOOMANYREFS = 59 // errno.h:175:1: + ETXTBSY = 26 // errno.h:116:1: + EUSERS = 68 // errno.h:193:1: + EWOULDBLOCK = 35 // errno.h:130:1: + EXDEV = 18 // errno.h:108:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS_ERRNO_H_ = 0 // errno.h:70:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/errno/errno_freebsd_amd64.go b/vendor/modernc.org/libc/errno/errno_freebsd_amd64.go index 1d23a013..9a38a2d7 100644 --- a/vendor/modernc.org/libc/errno/errno_freebsd_amd64.go +++ b/vendor/modernc.org/libc/errno/errno_freebsd_amd64.go @@ -118,12 +118,12 @@ const ( X_ERRNO_T_DEFINED = 0 // errno.h:203:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_LP64 = 1 // <predefined>:1:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ERRNO_H_ = 0 // errno.h:41:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/errno/errno_freebsd_arm.go b/vendor/modernc.org/libc/errno/errno_freebsd_arm.go new file mode 100644 index 00000000..6e7b898b --- /dev/null +++ b/vendor/modernc.org/libc/errno/errno_freebsd_arm.go @@ -0,0 +1,157 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_freebsd_arm.go -pkgname errno', DO NOT EDIT. + +package errno + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + E2BIG = 7 // errno.h:57:1: + EACCES = 13 // errno.h:64:1: + EADDRINUSE = 48 // errno.h:112:1: + EADDRNOTAVAIL = 49 // errno.h:113:1: + EAFNOSUPPORT = 47 // errno.h:111:1: + EAGAIN = 35 // errno.h:94:1: + EALREADY = 37 // errno.h:98:1: + EAUTH = 80 // errno.h:161:1: + EBADF = 9 // errno.h:59:1: + EBADMSG = 89 // errno.h:173:1: + EBADRPC = 72 // errno.h:149:1: + EBUSY = 16 // errno.h:69:1: + ECANCELED = 85 // errno.h:166:1: + ECAPMODE = 94 // errno.h:180:1: + ECHILD = 10 // errno.h:60:1: + ECONNABORTED = 53 // errno.h:119:1: + ECONNREFUSED = 61 // errno.h:127:1: + ECONNRESET = 54 // errno.h:120:1: + EDEADLK = 11 // errno.h:61:1: + EDESTADDRREQ = 39 // errno.h:102:1: + EDOM = 33 // errno.h:90:1: + EDOOFUS = 88 // errno.h:170:1: + EDQUOT = 69 // errno.h:144:1: + EEXIST = 17 // errno.h:70:1: + EFAULT = 14 // errno.h:65:1: + EFBIG = 27 // errno.h:82:1: + EFTYPE = 79 // errno.h:160:1: + EHOSTDOWN = 64 // errno.h:135:1: + EHOSTUNREACH = 65 // errno.h:136:1: + EIDRM = 82 // errno.h:163:1: + EILSEQ = 86 // errno.h:167:1: + EINPROGRESS = 36 // errno.h:97:1: + EINTEGRITY = 97 // errno.h:183:1: + EINTR = 4 // errno.h:54:1: + EINVAL = 22 // errno.h:75:1: + EIO = 5 // errno.h:55:1: + EISCONN = 56 // errno.h:122:1: + EISDIR = 21 // errno.h:74:1: + ELAST = 97 // errno.h:187:1: + ELOOP = 62 // errno.h:129:1: + EMFILE = 24 // errno.h:77:1: + EMLINK = 31 // errno.h:86:1: + EMSGSIZE = 40 // errno.h:103:1: + EMULTIHOP = 90 // errno.h:174:1: + ENAMETOOLONG = 63 // errno.h:131:1: + ENEEDAUTH = 81 // errno.h:162:1: + ENETDOWN = 50 // errno.h:116:1: + ENETRESET = 52 // errno.h:118:1: + ENETUNREACH = 51 // errno.h:117:1: + ENFILE = 23 // errno.h:76:1: + ENOATTR = 87 // errno.h:168:1: + ENOBUFS = 55 // errno.h:121:1: + ENODEV = 19 // errno.h:72:1: + ENOENT = 2 // errno.h:52:1: + ENOEXEC = 8 // errno.h:58:1: + ENOLCK = 77 // errno.h:156:1: + ENOLINK = 91 // errno.h:175:1: + ENOMEM = 12 // errno.h:63:1: + ENOMSG = 83 // errno.h:164:1: + ENOPROTOOPT = 42 // errno.h:105:1: + ENOSPC = 28 // errno.h:83:1: + ENOSYS = 78 // errno.h:157:1: + ENOTBLK = 15 // errno.h:67:1: + ENOTCAPABLE = 93 // errno.h:179:1: + ENOTCONN = 57 // errno.h:123:1: + ENOTDIR = 20 // errno.h:73:1: + ENOTEMPTY = 66 // errno.h:138:1: + ENOTRECOVERABLE = 95 // errno.h:181:1: + ENOTSOCK = 38 // errno.h:101:1: + ENOTSUP = 45 // errno.h:109:1: + ENOTTY = 25 // errno.h:78:1: + ENXIO = 6 // errno.h:56:1: + EOPNOTSUPP = 45 // errno.h:108:1: + EOVERFLOW = 84 // errno.h:165:1: + EOWNERDEAD = 96 // errno.h:182:1: + EPERM = 1 // errno.h:51:1: + EPFNOSUPPORT = 46 // errno.h:110:1: + EPIPE = 32 // errno.h:87:1: + EPROCLIM = 67 // errno.h:142:1: + EPROCUNAVAIL = 76 // errno.h:153:1: + EPROGMISMATCH = 75 // errno.h:152:1: + EPROGUNAVAIL = 74 // errno.h:151:1: + EPROTO = 92 // errno.h:176:1: + EPROTONOSUPPORT = 43 // errno.h:106:1: + EPROTOTYPE = 41 // errno.h:104:1: + ERANGE = 34 // errno.h:91:1: + EREMOTE = 71 // errno.h:148:1: + EROFS = 30 // errno.h:85:1: + ERPCMISMATCH = 73 // errno.h:150:1: + ESHUTDOWN = 58 // errno.h:124:1: + ESOCKTNOSUPPORT = 44 // errno.h:107:1: + ESPIPE = 29 // errno.h:84:1: + ESRCH = 3 // errno.h:53:1: + ESTALE = 70 // errno.h:147:1: + ETIMEDOUT = 60 // errno.h:126:1: + ETOOMANYREFS = 59 // errno.h:125:1: + ETXTBSY = 26 // errno.h:80:1: + EUSERS = 68 // errno.h:143:1: + EWOULDBLOCK = 35 // errno.h:96:1: + EXDEV = 18 // errno.h:71:1: + X_ERRNO_T_DEFINED = 0 // errno.h:203:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ERRNO_H_ = 0 // errno.h:41:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// 11 was EAGAIN + +// math software + +// non-blocking and interrupt i/o + +// ipc/network software -- argument errors + +// ipc/network software -- operational errors + +// should be rearranged + +// quotas & mush + +// Network File System + +// ISO/IEC 9899:2011 K.3.2.2 +type Errno_t = int32 /* errno.h:204:13 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/errno/errno_freebsd_arm64.go b/vendor/modernc.org/libc/errno/errno_freebsd_arm64.go new file mode 100644 index 00000000..9a38a2d7 --- /dev/null +++ b/vendor/modernc.org/libc/errno/errno_freebsd_arm64.go @@ -0,0 +1,166 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_freebsd_amd64.go -pkgname errno', DO NOT EDIT. + +package errno + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + E2BIG = 7 // errno.h:57:1: + EACCES = 13 // errno.h:64:1: + EADDRINUSE = 48 // errno.h:112:1: + EADDRNOTAVAIL = 49 // errno.h:113:1: + EAFNOSUPPORT = 47 // errno.h:111:1: + EAGAIN = 35 // errno.h:94:1: + EALREADY = 37 // errno.h:98:1: + EAUTH = 80 // errno.h:161:1: + EBADF = 9 // errno.h:59:1: + EBADMSG = 89 // errno.h:173:1: + EBADRPC = 72 // errno.h:149:1: + EBUSY = 16 // errno.h:69:1: + ECANCELED = 85 // errno.h:166:1: + ECAPMODE = 94 // errno.h:180:1: + ECHILD = 10 // errno.h:60:1: + ECONNABORTED = 53 // errno.h:119:1: + ECONNREFUSED = 61 // errno.h:127:1: + ECONNRESET = 54 // errno.h:120:1: + EDEADLK = 11 // errno.h:61:1: + EDESTADDRREQ = 39 // errno.h:102:1: + EDOM = 33 // errno.h:90:1: + EDOOFUS = 88 // errno.h:170:1: + EDQUOT = 69 // errno.h:144:1: + EEXIST = 17 // errno.h:70:1: + EFAULT = 14 // errno.h:65:1: + EFBIG = 27 // errno.h:82:1: + EFTYPE = 79 // errno.h:160:1: + EHOSTDOWN = 64 // errno.h:135:1: + EHOSTUNREACH = 65 // errno.h:136:1: + EIDRM = 82 // errno.h:163:1: + EILSEQ = 86 // errno.h:167:1: + EINPROGRESS = 36 // errno.h:97:1: + EINTEGRITY = 97 // errno.h:183:1: + EINTR = 4 // errno.h:54:1: + EINVAL = 22 // errno.h:75:1: + EIO = 5 // errno.h:55:1: + EISCONN = 56 // errno.h:122:1: + EISDIR = 21 // errno.h:74:1: + ELAST = 97 // errno.h:187:1: + ELOOP = 62 // errno.h:129:1: + EMFILE = 24 // errno.h:77:1: + EMLINK = 31 // errno.h:86:1: + EMSGSIZE = 40 // errno.h:103:1: + EMULTIHOP = 90 // errno.h:174:1: + ENAMETOOLONG = 63 // errno.h:131:1: + ENEEDAUTH = 81 // errno.h:162:1: + ENETDOWN = 50 // errno.h:116:1: + ENETRESET = 52 // errno.h:118:1: + ENETUNREACH = 51 // errno.h:117:1: + ENFILE = 23 // errno.h:76:1: + ENOATTR = 87 // errno.h:168:1: + ENOBUFS = 55 // errno.h:121:1: + ENODEV = 19 // errno.h:72:1: + ENOENT = 2 // errno.h:52:1: + ENOEXEC = 8 // errno.h:58:1: + ENOLCK = 77 // errno.h:156:1: + ENOLINK = 91 // errno.h:175:1: + ENOMEM = 12 // errno.h:63:1: + ENOMSG = 83 // errno.h:164:1: + ENOPROTOOPT = 42 // errno.h:105:1: + ENOSPC = 28 // errno.h:83:1: + ENOSYS = 78 // errno.h:157:1: + ENOTBLK = 15 // errno.h:67:1: + ENOTCAPABLE = 93 // errno.h:179:1: + ENOTCONN = 57 // errno.h:123:1: + ENOTDIR = 20 // errno.h:73:1: + ENOTEMPTY = 66 // errno.h:138:1: + ENOTRECOVERABLE = 95 // errno.h:181:1: + ENOTSOCK = 38 // errno.h:101:1: + ENOTSUP = 45 // errno.h:109:1: + ENOTTY = 25 // errno.h:78:1: + ENXIO = 6 // errno.h:56:1: + EOPNOTSUPP = 45 // errno.h:108:1: + EOVERFLOW = 84 // errno.h:165:1: + EOWNERDEAD = 96 // errno.h:182:1: + EPERM = 1 // errno.h:51:1: + EPFNOSUPPORT = 46 // errno.h:110:1: + EPIPE = 32 // errno.h:87:1: + EPROCLIM = 67 // errno.h:142:1: + EPROCUNAVAIL = 76 // errno.h:153:1: + EPROGMISMATCH = 75 // errno.h:152:1: + EPROGUNAVAIL = 74 // errno.h:151:1: + EPROTO = 92 // errno.h:176:1: + EPROTONOSUPPORT = 43 // errno.h:106:1: + EPROTOTYPE = 41 // errno.h:104:1: + ERANGE = 34 // errno.h:91:1: + EREMOTE = 71 // errno.h:148:1: + EROFS = 30 // errno.h:85:1: + ERPCMISMATCH = 73 // errno.h:150:1: + ESHUTDOWN = 58 // errno.h:124:1: + ESOCKTNOSUPPORT = 44 // errno.h:107:1: + ESPIPE = 29 // errno.h:84:1: + ESRCH = 3 // errno.h:53:1: + ESTALE = 70 // errno.h:147:1: + ETIMEDOUT = 60 // errno.h:126:1: + ETOOMANYREFS = 59 // errno.h:125:1: + ETXTBSY = 26 // errno.h:80:1: + EUSERS = 68 // errno.h:143:1: + EWOULDBLOCK = 35 // errno.h:96:1: + EXDEV = 18 // errno.h:71:1: + X_ERRNO_T_DEFINED = 0 // errno.h:203:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ERRNO_H_ = 0 // errno.h:41:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// 11 was EAGAIN + +// math software + +// non-blocking and interrupt i/o + +// ipc/network software -- argument errors + +// ipc/network software -- operational errors + +// should be rearranged + +// quotas & mush + +// Network File System + +// ISO/IEC 9899:2011 K.3.2.2 +type Errno_t = int32 /* errno.h:204:13 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/errno/errno_netbsd_arm.go b/vendor/modernc.org/libc/errno/errno_netbsd_arm.go new file mode 100644 index 00000000..ee10ffe1 --- /dev/null +++ b/vendor/modernc.org/libc/errno/errno_netbsd_arm.go @@ -0,0 +1,141 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_netbsd_arm.go -pkgname errno', DO NOT EDIT. + +package errno + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + E2BIG = 7 // errno.h:48:1: + EACCES = 13 // errno.h:55:1: + EADDRINUSE = 48 // errno.h:97:1: + EADDRNOTAVAIL = 49 // errno.h:98:1: + EAFNOSUPPORT = 47 // errno.h:96:1: + EAGAIN = 35 // errno.h:81:1: + EALREADY = 37 // errno.h:84:1: + EAUTH = 80 // errno.h:140:1: + EBADF = 9 // errno.h:50:1: + EBADMSG = 88 // errno.h:159:1: + EBADRPC = 72 // errno.h:130:1: + EBUSY = 16 // errno.h:58:1: + ECANCELED = 87 // errno.h:156:1: + ECHILD = 10 // errno.h:51:1: + ECONNABORTED = 53 // errno.h:104:1: + ECONNREFUSED = 61 // errno.h:112:1: + ECONNRESET = 54 // errno.h:105:1: + EDEADLK = 11 // errno.h:52:1: + EDESTADDRREQ = 39 // errno.h:88:1: + EDOM = 33 // errno.h:77:1: + EDQUOT = 69 // errno.h:125:1: + EEXIST = 17 // errno.h:59:1: + EFAULT = 14 // errno.h:56:1: + EFBIG = 27 // errno.h:69:1: + EFTYPE = 79 // errno.h:139:1: + EHOSTDOWN = 64 // errno.h:118:1: + EHOSTUNREACH = 65 // errno.h:119:1: + EIDRM = 82 // errno.h:144:1: + EILSEQ = 85 // errno.h:149:1: + EINPROGRESS = 36 // errno.h:83:1: + EINTR = 4 // errno.h:45:1: + EINVAL = 22 // errno.h:64:1: + EIO = 5 // errno.h:46:1: + EISCONN = 56 // errno.h:107:1: + EISDIR = 21 // errno.h:63:1: + ELAST = 96 // errno.h:175:1: + ELOOP = 62 // errno.h:114:1: + EMFILE = 24 // errno.h:66:1: + EMLINK = 31 // errno.h:73:1: + EMSGSIZE = 40 // errno.h:89:1: + EMULTIHOP = 94 // errno.h:171:1: + ENAMETOOLONG = 63 // errno.h:115:1: + ENEEDAUTH = 81 // errno.h:141:1: + ENETDOWN = 50 // errno.h:101:1: + ENETRESET = 52 // errno.h:103:1: + ENETUNREACH = 51 // errno.h:102:1: + ENFILE = 23 // errno.h:65:1: + ENOATTR = 93 // errno.h:168:1: + ENOBUFS = 55 // errno.h:106:1: + ENODATA = 89 // errno.h:162:1: + ENODEV = 19 // errno.h:61:1: + ENOENT = 2 // errno.h:43:1: + ENOEXEC = 8 // errno.h:49:1: + ENOLCK = 77 // errno.h:136:1: + ENOLINK = 95 // errno.h:172:1: + ENOMEM = 12 // errno.h:54:1: + ENOMSG = 83 // errno.h:145:1: + ENOPROTOOPT = 42 // errno.h:91:1: + ENOSPC = 28 // errno.h:70:1: + ENOSR = 90 // errno.h:163:1: + ENOSTR = 91 // errno.h:164:1: + ENOSYS = 78 // errno.h:137:1: + ENOTBLK = 15 // errno.h:57:1: + ENOTCONN = 57 // errno.h:108:1: + ENOTDIR = 20 // errno.h:62:1: + ENOTEMPTY = 66 // errno.h:120:1: + ENOTSOCK = 38 // errno.h:87:1: + ENOTSUP = 86 // errno.h:153:1: + ENOTTY = 25 // errno.h:67:1: + ENXIO = 6 // errno.h:47:1: + EOPNOTSUPP = 45 // errno.h:94:1: + EOVERFLOW = 84 // errno.h:146:1: + EPERM = 1 // errno.h:42:1: + EPFNOSUPPORT = 46 // errno.h:95:1: + EPIPE = 32 // errno.h:74:1: + EPROCLIM = 67 // errno.h:123:1: + EPROCUNAVAIL = 76 // errno.h:134:1: + EPROGMISMATCH = 75 // errno.h:133:1: + EPROGUNAVAIL = 74 // errno.h:132:1: + EPROTO = 96 // errno.h:173:1: + EPROTONOSUPPORT = 43 // errno.h:92:1: + EPROTOTYPE = 41 // errno.h:90:1: + ERANGE = 34 // errno.h:78:1: + EREMOTE = 71 // errno.h:129:1: + EROFS = 30 // errno.h:72:1: + ERPCMISMATCH = 73 // errno.h:131:1: + ESHUTDOWN = 58 // errno.h:109:1: + ESOCKTNOSUPPORT = 44 // errno.h:93:1: + ESPIPE = 29 // errno.h:71:1: + ESRCH = 3 // errno.h:44:1: + ESTALE = 70 // errno.h:128:1: + ETIME = 92 // errno.h:165:1: + ETIMEDOUT = 60 // errno.h:111:1: + ETOOMANYREFS = 59 // errno.h:110:1: + ETXTBSY = 26 // errno.h:68:1: + EUSERS = 68 // errno.h:124:1: + EWOULDBLOCK = 35 // errno.h:82:1: + EXDEV = 18 // errno.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ERRNO_H_ = 0 // errno.h:40:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_ERRNO_H_ = 0 // errno.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/errno/errno_openbsd_386.go b/vendor/modernc.org/libc/errno/errno_openbsd_386.go new file mode 100644 index 00000000..7dbe6dda --- /dev/null +++ b/vendor/modernc.org/libc/errno/errno_openbsd_386.go @@ -0,0 +1,133 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_openbsd_386.go -pkgname errno', DO NOT EDIT. + +package errno + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + E2BIG = 7 // errno.h:48:1: + EACCES = 13 // errno.h:55:1: + EADDRINUSE = 48 // errno.h:103:1: + EADDRNOTAVAIL = 49 // errno.h:104:1: + EAFNOSUPPORT = 47 // errno.h:102:1: + EAGAIN = 35 // errno.h:83:1: + EALREADY = 37 // errno.h:86:1: + EAUTH = 80 // errno.h:155:1: + EBADF = 9 // errno.h:50:1: + EBADMSG = 92 // errno.h:170:1: + EBADRPC = 72 // errno.h:143:1: + EBUSY = 16 // errno.h:60:1: + ECANCELED = 88 // errno.h:166:1: + ECHILD = 10 // errno.h:51:1: + ECONNABORTED = 53 // errno.h:110:1: + ECONNREFUSED = 61 // errno.h:120:1: + ECONNRESET = 54 // errno.h:111:1: + EDEADLK = 11 // errno.h:52:1: + EDESTADDRREQ = 39 // errno.h:90:1: + EDOM = 33 // errno.h:79:1: + EDQUOT = 69 // errno.h:137:1: + EEXIST = 17 // errno.h:61:1: + EFAULT = 14 // errno.h:56:1: + EFBIG = 27 // errno.h:71:1: + EFTYPE = 79 // errno.h:154:1: + EHOSTDOWN = 64 // errno.h:127:1: + EHOSTUNREACH = 65 // errno.h:129:1: + EIDRM = 89 // errno.h:167:1: + EILSEQ = 84 // errno.h:160:1: + EINPROGRESS = 36 // errno.h:85:1: + EINTR = 4 // errno.h:45:1: + EINVAL = 22 // errno.h:66:1: + EIO = 5 // errno.h:46:1: + EIPSEC = 82 // errno.h:157:1: + EISCONN = 56 // errno.h:113:1: + EISDIR = 21 // errno.h:65:1: + ELAST = 95 // errno.h:175:1: + ELOOP = 62 // errno.h:122:1: + EMEDIUMTYPE = 86 // errno.h:163:1: + EMFILE = 24 // errno.h:68:1: + EMLINK = 31 // errno.h:75:1: + EMSGSIZE = 40 // errno.h:91:1: + ENAMETOOLONG = 63 // errno.h:123:1: + ENEEDAUTH = 81 // errno.h:156:1: + ENETDOWN = 50 // errno.h:107:1: + ENETRESET = 52 // errno.h:109:1: + ENETUNREACH = 51 // errno.h:108:1: + ENFILE = 23 // errno.h:67:1: + ENOATTR = 83 // errno.h:158:1: + ENOBUFS = 55 // errno.h:112:1: + ENODEV = 19 // errno.h:63:1: + ENOENT = 2 // errno.h:43:1: + ENOEXEC = 8 // errno.h:49:1: + ENOLCK = 77 // errno.h:150:1: + ENOMEDIUM = 85 // errno.h:162:1: + ENOMEM = 12 // errno.h:54:1: + ENOMSG = 90 // errno.h:168:1: + ENOPROTOOPT = 42 // errno.h:93:1: + ENOSPC = 28 // errno.h:72:1: + ENOSYS = 78 // errno.h:151:1: + ENOTBLK = 15 // errno.h:58:1: + ENOTCONN = 57 // errno.h:114:1: + ENOTDIR = 20 // errno.h:64:1: + ENOTEMPTY = 66 // errno.h:130:1: + ENOTRECOVERABLE = 93 // errno.h:171:1: + ENOTSOCK = 38 // errno.h:89:1: + ENOTSUP = 91 // errno.h:169:1: + ENOTTY = 25 // errno.h:69:1: + ENXIO = 6 // errno.h:47:1: + EOPNOTSUPP = 45 // errno.h:98:1: + EOVERFLOW = 87 // errno.h:165:1: + EOWNERDEAD = 94 // errno.h:172:1: + EPERM = 1 // errno.h:42:1: + EPFNOSUPPORT = 46 // errno.h:100:1: + EPIPE = 32 // errno.h:76:1: + EPROCLIM = 67 // errno.h:134:1: + EPROCUNAVAIL = 76 // errno.h:147:1: + EPROGMISMATCH = 75 // errno.h:146:1: + EPROGUNAVAIL = 74 // errno.h:145:1: + EPROTO = 95 // errno.h:173:1: + EPROTONOSUPPORT = 43 // errno.h:94:1: + EPROTOTYPE = 41 // errno.h:92:1: + ERANGE = 34 // errno.h:80:1: + EREMOTE = 71 // errno.h:142:1: + EROFS = 30 // errno.h:74:1: + ERPCMISMATCH = 73 // errno.h:144:1: + ESHUTDOWN = 58 // errno.h:116:1: + ESOCKTNOSUPPORT = 44 // errno.h:96:1: + ESPIPE = 29 // errno.h:73:1: + ESRCH = 3 // errno.h:44:1: + ESTALE = 70 // errno.h:140:1: + ETIMEDOUT = 60 // errno.h:119:1: + ETOOMANYREFS = 59 // errno.h:117:1: + ETXTBSY = 26 // errno.h:70:1: + EUSERS = 68 // errno.h:135:1: + EWOULDBLOCK = 35 // errno.h:84:1: + EXDEV = 18 // errno.h:62:1: + X_ERRNO_H_ = 0 // errno.h:40:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go b/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go index 12d66db0..5add30b6 100644 --- a/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go +++ b/vendor/modernc.org/libc/errno/errno_openbsd_amd64.go @@ -118,7 +118,7 @@ const ( X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/errno/errno_openbsd_arm64.go b/vendor/modernc.org/libc/errno/errno_openbsd_arm64.go new file mode 100644 index 00000000..4fd73783 --- /dev/null +++ b/vendor/modernc.org/libc/errno/errno_openbsd_arm64.go @@ -0,0 +1,142 @@ +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_openbsd_arm64.go -pkgname errno', DO NOT EDIT. + +package errno + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + E2BIG = 7 // errno.h:48:1: + EACCES = 13 // errno.h:55:1: + EADDRINUSE = 48 // errno.h:103:1: + EADDRNOTAVAIL = 49 // errno.h:104:1: + EAFNOSUPPORT = 47 // errno.h:102:1: + EAGAIN = 35 // errno.h:83:1: + EALREADY = 37 // errno.h:86:1: + EAUTH = 80 // errno.h:155:1: + EBADF = 9 // errno.h:50:1: + EBADMSG = 92 // errno.h:170:1: + EBADRPC = 72 // errno.h:143:1: + EBUSY = 16 // errno.h:60:1: + ECANCELED = 88 // errno.h:166:1: + ECHILD = 10 // errno.h:51:1: + ECONNABORTED = 53 // errno.h:110:1: + ECONNREFUSED = 61 // errno.h:120:1: + ECONNRESET = 54 // errno.h:111:1: + EDEADLK = 11 // errno.h:52:1: + EDESTADDRREQ = 39 // errno.h:90:1: + EDOM = 33 // errno.h:79:1: + EDQUOT = 69 // errno.h:137:1: + EEXIST = 17 // errno.h:61:1: + EFAULT = 14 // errno.h:56:1: + EFBIG = 27 // errno.h:71:1: + EFTYPE = 79 // errno.h:154:1: + EHOSTDOWN = 64 // errno.h:127:1: + EHOSTUNREACH = 65 // errno.h:129:1: + EIDRM = 89 // errno.h:167:1: + EILSEQ = 84 // errno.h:160:1: + EINPROGRESS = 36 // errno.h:85:1: + EINTR = 4 // errno.h:45:1: + EINVAL = 22 // errno.h:66:1: + EIO = 5 // errno.h:46:1: + EIPSEC = 82 // errno.h:157:1: + EISCONN = 56 // errno.h:113:1: + EISDIR = 21 // errno.h:65:1: + ELAST = 95 // errno.h:175:1: + ELOOP = 62 // errno.h:122:1: + EMEDIUMTYPE = 86 // errno.h:163:1: + EMFILE = 24 // errno.h:68:1: + EMLINK = 31 // errno.h:75:1: + EMSGSIZE = 40 // errno.h:91:1: + ENAMETOOLONG = 63 // errno.h:123:1: + ENEEDAUTH = 81 // errno.h:156:1: + ENETDOWN = 50 // errno.h:107:1: + ENETRESET = 52 // errno.h:109:1: + ENETUNREACH = 51 // errno.h:108:1: + ENFILE = 23 // errno.h:67:1: + ENOATTR = 83 // errno.h:158:1: + ENOBUFS = 55 // errno.h:112:1: + ENODEV = 19 // errno.h:63:1: + ENOENT = 2 // errno.h:43:1: + ENOEXEC = 8 // errno.h:49:1: + ENOLCK = 77 // errno.h:150:1: + ENOMEDIUM = 85 // errno.h:162:1: + ENOMEM = 12 // errno.h:54:1: + ENOMSG = 90 // errno.h:168:1: + ENOPROTOOPT = 42 // errno.h:93:1: + ENOSPC = 28 // errno.h:72:1: + ENOSYS = 78 // errno.h:151:1: + ENOTBLK = 15 // errno.h:58:1: + ENOTCONN = 57 // errno.h:114:1: + ENOTDIR = 20 // errno.h:64:1: + ENOTEMPTY = 66 // errno.h:130:1: + ENOTRECOVERABLE = 93 // errno.h:171:1: + ENOTSOCK = 38 // errno.h:89:1: + ENOTSUP = 91 // errno.h:169:1: + ENOTTY = 25 // errno.h:69:1: + ENXIO = 6 // errno.h:47:1: + EOPNOTSUPP = 45 // errno.h:98:1: + EOVERFLOW = 87 // errno.h:165:1: + EOWNERDEAD = 94 // errno.h:172:1: + EPERM = 1 // errno.h:42:1: + EPFNOSUPPORT = 46 // errno.h:100:1: + EPIPE = 32 // errno.h:76:1: + EPROCLIM = 67 // errno.h:134:1: + EPROCUNAVAIL = 76 // errno.h:147:1: + EPROGMISMATCH = 75 // errno.h:146:1: + EPROGUNAVAIL = 74 // errno.h:145:1: + EPROTO = 95 // errno.h:173:1: + EPROTONOSUPPORT = 43 // errno.h:94:1: + EPROTOTYPE = 41 // errno.h:92:1: + ERANGE = 34 // errno.h:80:1: + EREMOTE = 71 // errno.h:142:1: + EROFS = 30 // errno.h:74:1: + ERPCMISMATCH = 73 // errno.h:144:1: + ESHUTDOWN = 58 // errno.h:116:1: + ESOCKTNOSUPPORT = 44 // errno.h:96:1: + ESPIPE = 29 // errno.h:73:1: + ESRCH = 3 // errno.h:44:1: + ESTALE = 70 // errno.h:140:1: + ETIMEDOUT = 60 // errno.h:119:1: + ETOOMANYREFS = 59 // errno.h:117:1: + ETXTBSY = 26 // errno.h:70:1: + EUSERS = 68 // errno.h:135:1: + EWOULDBLOCK = 35 // errno.h:84:1: + EXDEV = 18 // errno.h:62:1: + X_ERRNO_H_ = 0 // errno.h:40:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/errno/errno_windows_386.go b/vendor/modernc.org/libc/errno/errno_windows_386.go index 54c4a0c1..d31ff3e0 100644 --- a/vendor/modernc.org/libc/errno/errno_windows_386.go +++ b/vendor/modernc.org/libc/errno/errno_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo errno\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno\errno_windows_386.go -pkgname errno', DO NOT EDIT. +// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT. package errno @@ -15,168 +15,168 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - E2BIG = 7 - EACCES = 13 - EADDRINUSE = 100 - EADDRNOTAVAIL = 101 - EAFNOSUPPORT = 102 - EAGAIN = 11 - EALREADY = 103 - EBADF = 9 - EBADMSG = 104 - EBUSY = 16 - ECANCELED = 105 - ECHILD = 10 - ECONNABORTED = 106 - ECONNREFUSED = 107 - ECONNRESET = 108 - EDEADLK = 36 - EDEADLOCK = 36 - EDESTADDRREQ = 109 - EDOM = 33 - EEXIST = 17 - EFAULT = 14 - EFBIG = 27 - EHOSTUNREACH = 110 - EIDRM = 111 - EILSEQ = 42 - EINPROGRESS = 112 - EINTR = 4 - EINVAL = 22 - EIO = 5 - EISCONN = 113 - EISDIR = 21 - ELOOP = 114 - EMFILE = 24 - EMLINK = 31 - EMSGSIZE = 115 - ENAMETOOLONG = 38 - ENETDOWN = 116 - ENETRESET = 117 - ENETUNREACH = 118 - ENFILE = 23 - ENOBUFS = 119 - ENODATA = 120 - ENODEV = 19 - ENOENT = 2 - ENOEXEC = 8 - ENOFILE = 2 - ENOLCK = 39 - ENOLINK = 121 - ENOMEM = 12 - ENOMSG = 122 - ENOPROTOOPT = 123 - ENOSPC = 28 - ENOSR = 124 - ENOSTR = 125 - ENOSYS = 40 - ENOTCONN = 126 - ENOTDIR = 20 - ENOTEMPTY = 41 - ENOTRECOVERABLE = 127 - ENOTSOCK = 128 - ENOTSUP = 129 - ENOTTY = 25 - ENXIO = 6 - EOPNOTSUPP = 130 - EOVERFLOW = 132 - EOWNERDEAD = 133 - EPERM = 1 - EPIPE = 32 - EPROTO = 134 - EPROTONOSUPPORT = 135 - EPROTOTYPE = 136 - ERANGE = 34 - EROFS = 30 - ESPIPE = 29 - ESRCH = 3 - ETIME = 137 - ETIMEDOUT = 138 - ETXTBSY = 139 - EWOULDBLOCK = 140 - EXDEV = 18 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - STRUNCATE = 80 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_ERRNO_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_ERRNO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + E2BIG = 7 // errno.h:31:1: + EACCES = 13 // errno.h:37:1: + EADDRINUSE = 100 // errno.h:86:1: + EADDRNOTAVAIL = 101 // errno.h:90:1: + EAFNOSUPPORT = 102 // errno.h:82:1: + EAGAIN = 11 // errno.h:35:1: + EALREADY = 103 // errno.h:106:1: + EBADF = 9 // errno.h:33:1: + EBADMSG = 104 // errno.h:182:1: + EBUSY = 16 // errno.h:39:1: + ECANCELED = 105 // errno.h:154:1: + ECHILD = 10 // errno.h:34:1: + ECONNABORTED = 106 // errno.h:102:1: + ECONNREFUSED = 107 // errno.h:110:1: + ECONNRESET = 108 // errno.h:114:1: + EDEADLK = 36 // errno.h:55:1: + EDEADLOCK = 36 // errno.h:71:1: + EDESTADDRREQ = 109 // errno.h:118:1: + EDOM = 33 // errno.h:54:1: + EEXIST = 17 // errno.h:40:1: + EFAULT = 14 // errno.h:38:1: + EFBIG = 27 // errno.h:48:1: + EHOSTUNREACH = 110 // errno.h:122:1: + EIDRM = 111 // errno.h:186:1: + EILSEQ = 42 // errno.h:66:1: + EINPROGRESS = 112 // errno.h:158:1: + EINTR = 4 // errno.h:28:1: + EINVAL = 22 // errno.h:64:1: + EIO = 5 // errno.h:29:1: + EISCONN = 113 // errno.h:94:1: + EISDIR = 21 // errno.h:44:1: + ELOOP = 114 // errno.h:227:1: + EMFILE = 24 // errno.h:46:1: + EMLINK = 31 // errno.h:52:1: + EMSGSIZE = 115 // errno.h:126:1: + ENAMETOOLONG = 38 // errno.h:56:1: + ENETDOWN = 116 // errno.h:130:1: + ENETRESET = 117 // errno.h:134:1: + ENETUNREACH = 118 // errno.h:138:1: + ENFILE = 23 // errno.h:45:1: + ENOBUFS = 119 // errno.h:98:1: + ENODATA = 120 // errno.h:190:1: + ENODEV = 19 // errno.h:42:1: + ENOENT = 2 // errno.h:25:1: + ENOEXEC = 8 // errno.h:32:1: + ENOFILE = 2 // errno.h:26:1: + ENOLCK = 39 // errno.h:57:1: + ENOLINK = 121 // errno.h:194:1: + ENOMEM = 12 // errno.h:36:1: + ENOMSG = 122 // errno.h:198:1: + ENOPROTOOPT = 123 // errno.h:142:1: + ENOSPC = 28 // errno.h:49:1: + ENOSR = 124 // errno.h:202:1: + ENOSTR = 125 // errno.h:206:1: + ENOSYS = 40 // errno.h:58:1: + ENOTCONN = 126 // errno.h:150:1: + ENOTDIR = 20 // errno.h:43:1: + ENOTEMPTY = 41 // errno.h:59:1: + ENOTRECOVERABLE = 127 // errno.h:210:1: + ENOTSOCK = 128 // errno.h:146:1: + ENOTSUP = 129 // errno.h:76:1: + ENOTTY = 25 // errno.h:47:1: + ENXIO = 6 // errno.h:30:1: + EOPNOTSUPP = 130 // errno.h:162:1: + EOVERFLOW = 132 // errno.h:235:1: + EOWNERDEAD = 133 // errno.h:170:1: + EPERM = 1 // errno.h:24:1: + EPIPE = 32 // errno.h:53:1: + EPROTO = 134 // errno.h:174:1: + EPROTONOSUPPORT = 135 // errno.h:178:1: + EPROTOTYPE = 136 // errno.h:231:1: + ERANGE = 34 // errno.h:65:1: + EROFS = 30 // errno.h:51:1: + ESPIPE = 29 // errno.h:50:1: + ESRCH = 3 // errno.h:27:1: + ETIME = 137 // errno.h:214:1: + ETIMEDOUT = 138 // errno.h:223:1: + ETXTBSY = 139 // errno.h:218:1: + EWOULDBLOCK = 140 // errno.h:166:1: + EXDEV = 18 // errno.h:41:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + STRUNCATE = 80 // errno.h:67:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_ERRNO_DEFINED = 0 // errno.h:16:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_ERRNO = 0 // errno.h:7:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 // errno.h:63:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -210,6 +210,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -230,6 +235,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -270,26 +281,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -315,29 +328,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // Posix thread extensions. diff --git a/vendor/modernc.org/libc/etc.go b/vendor/modernc.org/libc/etc.go index 6e687055..ca188072 100644 --- a/vendor/modernc.org/libc/etc.go +++ b/vendor/modernc.org/libc/etc.go @@ -212,6 +212,8 @@ func (t *TLS) Close() { atomic.AddInt32(&tlsBalance, -1) } + t.pthreadData.close(t) + *t = TLS{} } // Alloc allocates n bytes of thread-local storage. It must be paired with a @@ -307,7 +309,7 @@ func (t *TLS) Alloc(n int) (r uintptr) { return r } -//this declares how many stack frames are kept alive before being freed +// this declares how many stack frames are kept alive before being freed const stackFrameKeepalive = 2 // Free deallocates n bytes of thread-local storage. See TLS.Alloc for details @@ -822,7 +824,7 @@ func parseZoneOffset(s string, offOpt bool) (string, string, int, bool) { return "", s0, 0, true } -// [+|-]hh[:mm[:ss]] +// [+|-]hh[:mm[:ss]] func parseOffset(s string) (string, int) { if len(s) == 0 { panic(todo("")) diff --git a/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go b/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go index bf61865d..768a82aa 100644 --- a/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. package fcntl diff --git a/vendor/modernc.org/libc/fcntl/capi_freebsd_arm.go b/vendor/modernc.org/libc/fcntl/capi_freebsd_arm.go new file mode 100644 index 00000000..d90010a4 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_freebsd_arm.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fcntl/capi_freebsd_arm64.go b/vendor/modernc.org/libc/fcntl/capi_freebsd_arm64.go new file mode 100644 index 00000000..53ad6eea --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_freebsd_amd64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fcntl/capi_netbsd_arm.go b/vendor/modernc.org/libc/fcntl/capi_netbsd_arm.go new file mode 100644 index 00000000..27212106 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_netbsd_arm.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fcntl/capi_openbsd_386.go b/vendor/modernc.org/libc/fcntl/capi_openbsd_386.go new file mode 100644 index 00000000..8f057158 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_386.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fcntl/capi_openbsd_arm64.go b/vendor/modernc.org/libc/fcntl/capi_openbsd_arm64.go new file mode 100644 index 00000000..7e595656 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fcntl/capi_windows_386.go b/vendor/modernc.org/libc/fcntl/capi_windows_386.go index 9a3802f3..a91731bd 100644 --- a/vendor/modernc.org/libc/fcntl/capi_windows_386.go +++ b/vendor/modernc.org/libc/fcntl/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo fcntl\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT. +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT. package fcntl diff --git a/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go index 64e9d719..5221b828 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT. package fcntl @@ -15,177 +15,177 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AT_EACCESS = 0x0010 - AT_FDCWD = -2 - AT_FDONLY = 0x0400 - AT_REALDEV = 0x0200 - AT_REMOVEDIR = 0x0080 - AT_SYMLINK_FOLLOW = 0x0040 - AT_SYMLINK_NOFOLLOW = 0x0020 - CPF_IGNORE_MODE = 0x0002 - CPF_MASK = 3 - CPF_OVERWRITE = 0x0001 - FAPPEND = 8 - FASYNC = 64 - FCNTL_FS_SPECIFIC_BASE = 0x00010000 - FD_CLOEXEC = 1 - FFDSYNC = 4194304 - FFSYNC = 128 - FNDELAY = 4 - FNONBLOCK = 4 - FREAD = 0x0001 - FWRITE = 0x0002 - F_ADDFILESIGS = 61 - F_ADDFILESIGS_FOR_DYLD_SIM = 83 - F_ADDFILESIGS_RETURN = 97 - F_ADDSIGS = 59 - F_ALLOCATEALL = 0x00000004 - F_ALLOCATECONTIG = 0x00000002 - F_BARRIERFSYNC = 85 - F_CHECK_LV = 98 - F_CHKCLEAN = 41 - F_DUPFD = 0 - F_DUPFD_CLOEXEC = 67 - F_FINDSIGS = 78 - F_FLUSH_DATA = 40 - F_FREEZE_FS = 53 - F_FULLFSYNC = 51 - F_GETCODEDIR = 72 - F_GETFD = 1 - F_GETFL = 3 - F_GETLK = 7 - F_GETLKPID = 66 - F_GETNOSIGPIPE = 74 - F_GETOWN = 5 - F_GETPATH = 50 - F_GETPATH_MTMINFO = 71 - F_GETPATH_NOFIRMLINK = 102 - F_GETPROTECTIONCLASS = 63 - F_GETPROTECTIONLEVEL = 77 - F_GLOBAL_NOCACHE = 55 - F_LOG2PHYS = 49 - F_LOG2PHYS_EXT = 65 - F_NOCACHE = 48 - F_NODIRECT = 62 - F_PATHPKG_CHECK = 52 - F_PEOFPOSMODE = 3 - F_PREALLOCATE = 42 - F_PUNCHHOLE = 99 - F_RDADVISE = 44 - F_RDAHEAD = 45 - F_RDLCK = 1 - F_SETBACKINGSTORE = 70 - F_SETFD = 2 - F_SETFL = 4 - F_SETLK = 8 - F_SETLKW = 9 - F_SETLKWTIMEOUT = 10 - F_SETNOSIGPIPE = 73 - F_SETOWN = 6 - F_SETPROTECTIONCLASS = 64 - F_SETSIZE = 43 - F_SINGLE_WRITER = 76 - F_SPECULATIVE_READ = 101 - F_THAW_FS = 54 - F_TRANSCODEKEY = 75 - F_TRIM_ACTIVE_FILE = 100 - F_UNLCK = 2 - F_VOLPOSMODE = 4 - F_WRLCK = 3 - LOCK_EX = 0x02 - LOCK_NB = 0x04 - LOCK_SH = 0x01 - LOCK_UN = 0x08 - O_ACCMODE = 0x0003 - O_ALERT = 0x20000000 - O_APPEND = 0x0008 - O_ASYNC = 0x0040 - O_CLOEXEC = 0x1000000 - O_CREAT = 0x0200 - O_DIRECTORY = 0x100000 - O_DP_GETRAWENCRYPTED = 0x0001 - O_DP_GETRAWUNENCRYPTED = 0x0002 - O_DSYNC = 0x400000 - O_EVTONLY = 0x8000 - O_EXCL = 0x0800 - O_EXLOCK = 0x0020 - O_FSYNC = 128 - O_NDELAY = 4 - O_NOCTTY = 0x20000 - O_NOFOLLOW = 0x0100 - O_NONBLOCK = 0x0004 - O_POPUP = 0x80000000 - O_RDONLY = 0x0000 - O_RDWR = 0x0002 - O_SHLOCK = 0x0010 - O_SYMLINK = 0x200000 - O_SYNC = 0x0080 - O_TRUNC = 0x0400 - O_WRONLY = 0x0001 - SEEK_CUR = 1 - SEEK_DATA = 4 - SEEK_END = 2 - SEEK_HOLE = 3 - SEEK_SET = 0 - S_IEXEC = 64 - S_IFBLK = 0060000 - S_IFCHR = 0020000 - S_IFDIR = 0040000 - S_IFIFO = 0010000 - S_IFLNK = 0120000 - S_IFMT = 0170000 - S_IFREG = 0100000 - S_IFSOCK = 0140000 - S_IFWHT = 0160000 - S_IREAD = 256 - S_IRGRP = 0000040 - S_IROTH = 0000004 - S_IRUSR = 0000400 - S_IRWXG = 0000070 - S_IRWXO = 0000007 - S_IRWXU = 0000700 - S_ISGID = 0002000 - S_ISTXT = 512 - S_ISUID = 0004000 - S_ISVTX = 0001000 - S_IWGRP = 0000020 - S_IWOTH = 0000002 - S_IWRITE = 128 - S_IWUSR = 0000200 - S_IXGRP = 0000010 - S_IXOTH = 0000001 - S_IXUSR = 0000100 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILESEC_T = 0 - X_FILE_OFFSET_BITS = 64 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_PID_T = 0 - X_SIZE_T = 0 - X_SYS_FCNTL_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + AT_EACCESS = 0x0010 // fcntl.h:138:1: + AT_FDCWD = -2 // fcntl.h:133:1: + AT_FDONLY = 0x0400 // fcntl.h:144:1: + AT_REALDEV = 0x0200 // fcntl.h:143:1: + AT_REMOVEDIR = 0x0080 // fcntl.h:141:1: + AT_SYMLINK_FOLLOW = 0x0040 // fcntl.h:140:1: + AT_SYMLINK_NOFOLLOW = 0x0020 // fcntl.h:139:1: + CPF_IGNORE_MODE = 0x0002 // fcntl.h:201:1: + CPF_MASK = 3 // fcntl.h:202:1: + CPF_OVERWRITE = 0x0001 // fcntl.h:200:1: + FAPPEND = 8 // fcntl.h:186:1: + FASYNC = 64 // fcntl.h:187:1: + FCNTL_FS_SPECIFIC_BASE = 0x00010000 // fcntl.h:297:1: + FD_CLOEXEC = 1 // fcntl.h:306:1: + FFDSYNC = 4194304 // fcntl.h:189:1: + FFSYNC = 128 // fcntl.h:188:1: + FNDELAY = 4 // fcntl.h:191:1: + FNONBLOCK = 4 // fcntl.h:190:1: + FREAD = 0x0001 // fcntl.h:110:1: + FWRITE = 0x0002 // fcntl.h:111:1: + F_ADDFILESIGS = 61 // fcntl.h:246:1: + F_ADDFILESIGS_FOR_DYLD_SIM = 83 // fcntl.h:279:1: + F_ADDFILESIGS_RETURN = 97 // fcntl.h:285:1: + F_ADDSIGS = 59 // fcntl.h:243:1: + F_ALLOCATEALL = 0x00000004 // fcntl.h:330:1: + F_ALLOCATECONTIG = 0x00000002 // fcntl.h:329:1: + F_BARRIERFSYNC = 85 // fcntl.h:282:1: + F_CHECK_LV = 98 // fcntl.h:286:1: + F_CHKCLEAN = 41 // fcntl.h:225:1: + F_DUPFD = 0 // fcntl.h:210:1: + F_DUPFD_CLOEXEC = 67 // fcntl.h:302:1: + F_FINDSIGS = 78 // fcntl.h:276:1: + F_FLUSH_DATA = 40 // fcntl.h:224:1: + F_FREEZE_FS = 53 // fcntl.h:238:1: + F_FULLFSYNC = 51 // fcntl.h:236:1: + F_GETCODEDIR = 72 // fcntl.h:264:1: + F_GETFD = 1 // fcntl.h:211:1: + F_GETFL = 3 // fcntl.h:213:1: + F_GETLK = 7 // fcntl.h:217:1: + F_GETLKPID = 66 // fcntl.h:256:1: + F_GETNOSIGPIPE = 74 // fcntl.h:267:1: + F_GETOWN = 5 // fcntl.h:215:1: + F_GETPATH = 50 // fcntl.h:235:1: + F_GETPATH_MTMINFO = 71 // fcntl.h:262:1: + F_GETPATH_NOFIRMLINK = 102 // fcntl.h:294:1: + F_GETPROTECTIONCLASS = 63 // fcntl.h:251:1: + F_GETPROTECTIONLEVEL = 77 // fcntl.h:274:1: + F_GLOBAL_NOCACHE = 55 // fcntl.h:240:1: + F_LOG2PHYS = 49 // fcntl.h:234:1: + F_LOG2PHYS_EXT = 65 // fcntl.h:254:1: + F_NOCACHE = 48 // fcntl.h:233:1: + F_NODIRECT = 62 // fcntl.h:248:1: + F_PATHPKG_CHECK = 52 // fcntl.h:237:1: + F_PEOFPOSMODE = 3 // fcntl.h:334:1: + F_PREALLOCATE = 42 // fcntl.h:226:1: + F_PUNCHHOLE = 99 // fcntl.h:288:1: + F_RDADVISE = 44 // fcntl.h:228:1: + F_RDAHEAD = 45 // fcntl.h:229:1: + F_RDLCK = 1 // fcntl.h:309:1: + F_SETBACKINGSTORE = 70 // fcntl.h:261:1: + F_SETFD = 2 // fcntl.h:212:1: + F_SETFL = 4 // fcntl.h:214:1: + F_SETLK = 8 // fcntl.h:218:1: + F_SETLKW = 9 // fcntl.h:219:1: + F_SETLKWTIMEOUT = 10 // fcntl.h:221:1: + F_SETNOSIGPIPE = 73 // fcntl.h:266:1: + F_SETOWN = 6 // fcntl.h:216:1: + F_SETPROTECTIONCLASS = 64 // fcntl.h:252:1: + F_SETSIZE = 43 // fcntl.h:227:1: + F_SINGLE_WRITER = 76 // fcntl.h:271:1: + F_SPECULATIVE_READ = 101 // fcntl.h:292:1: + F_THAW_FS = 54 // fcntl.h:239:1: + F_TRANSCODEKEY = 75 // fcntl.h:269:1: + F_TRIM_ACTIVE_FILE = 100 // fcntl.h:290:1: + F_UNLCK = 2 // fcntl.h:310:1: + F_VOLPOSMODE = 4 // fcntl.h:336:1: + F_WRLCK = 3 // fcntl.h:311:1: + LOCK_EX = 0x02 // fcntl.h:421:1: + LOCK_NB = 0x04 // fcntl.h:422:1: + LOCK_SH = 0x01 // fcntl.h:420:1: + LOCK_UN = 0x08 // fcntl.h:423:1: + O_ACCMODE = 0x0003 // fcntl.h:99:1: + O_ALERT = 0x20000000 // fcntl.h:502:1: + O_APPEND = 0x0008 // fcntl.h:114:1: + O_ASYNC = 0x0040 // fcntl.h:121:1: + O_CLOEXEC = 0x1000000 // fcntl.h:165:1: + O_CREAT = 0x0200 // fcntl.h:125:1: + O_DIRECTORY = 0x100000 // fcntl.h:157:1: + O_DP_GETRAWENCRYPTED = 0x0001 // fcntl.h:174:1: + O_DP_GETRAWUNENCRYPTED = 0x0002 // fcntl.h:175:1: + O_DSYNC = 0x400000 // _o_dsync.h:29:1: + O_EVTONLY = 0x8000 // fcntl.h:149:1: + O_EXCL = 0x0800 // fcntl.h:127:1: + O_EXLOCK = 0x0020 // fcntl.h:120:1: + O_FSYNC = 128 // fcntl.h:122:1: + O_NDELAY = 4 // fcntl.h:192:1: + O_NOCTTY = 0x20000 // fcntl.h:153:1: + O_NOFOLLOW = 0x0100 // fcntl.h:123:1: + O_NONBLOCK = 0x0004 // fcntl.h:113:1: + O_POPUP = 0x80000000 // fcntl.h:501:1: + O_RDONLY = 0x0000 // fcntl.h:96:1: + O_RDWR = 0x0002 // fcntl.h:98:1: + O_SHLOCK = 0x0010 // fcntl.h:119:1: + O_SYMLINK = 0x200000 // fcntl.h:158:1: + O_SYNC = 0x0080 // _o_sync.h:29:1: + O_TRUNC = 0x0400 // fcntl.h:126:1: + O_WRONLY = 0x0001 // fcntl.h:97:1: + SEEK_CUR = 1 // _seek_set.h:34:1: + SEEK_DATA = 4 // _seek_set.h:44:1: + SEEK_END = 2 // _seek_set.h:35:1: + SEEK_HOLE = 3 // _seek_set.h:40:1: + SEEK_SET = 0 // _seek_set.h:33:1: + S_IEXEC = 64 // _s_ifmt.h:72:1: + S_IFBLK = 0060000 // _s_ifmt.h:39:1: + S_IFCHR = 0020000 // _s_ifmt.h:37:1: + S_IFDIR = 0040000 // _s_ifmt.h:38:1: + S_IFIFO = 0010000 // _s_ifmt.h:36:1: + S_IFLNK = 0120000 // _s_ifmt.h:41:1: + S_IFMT = 0170000 // _s_ifmt.h:35:1: + S_IFREG = 0100000 // _s_ifmt.h:40:1: + S_IFSOCK = 0140000 // _s_ifmt.h:42:1: + S_IFWHT = 0160000 // _s_ifmt.h:44:1: + S_IREAD = 256 // _s_ifmt.h:70:1: + S_IRGRP = 0000040 // _s_ifmt.h:55:1: + S_IROTH = 0000004 // _s_ifmt.h:60:1: + S_IRUSR = 0000400 // _s_ifmt.h:50:1: + S_IRWXG = 0000070 // _s_ifmt.h:54:1: + S_IRWXO = 0000007 // _s_ifmt.h:59:1: + S_IRWXU = 0000700 // _s_ifmt.h:49:1: + S_ISGID = 0002000 // _s_ifmt.h:65:1: + S_ISTXT = 512 // _s_ifmt.h:69:1: + S_ISUID = 0004000 // _s_ifmt.h:64:1: + S_ISVTX = 0001000 // _s_ifmt.h:66:1: + S_IWGRP = 0000020 // _s_ifmt.h:56:1: + S_IWOTH = 0000002 // _s_ifmt.h:61:1: + S_IWRITE = 128 // _s_ifmt.h:71:1: + S_IWUSR = 0000200 // _s_ifmt.h:51:1: + S_IXGRP = 0000010 // _s_ifmt.h:57:1: + S_IXOTH = 0000001 // _s_ifmt.h:62:1: + S_IXUSR = 0000100 // _s_ifmt.h:52:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILESEC_T = 0 // _filesec_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:71:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) const ( /* fcntl.h:512:1: */ @@ -1915,7 +1915,7 @@ type Radvisory = struct { F__ccgo_pad1 [4]byte } /* fcntl.h:371:1 */ -//* Information the user passes in to get the codeblobs out of the kernel +// * Information the user passes in to get the codeblobs out of the kernel type Fcodeblobs = struct { Ff_cd_hash uintptr Ff_hash_size Size_t @@ -1926,7 +1926,7 @@ type Fcodeblobs = struct { F__padding int32 } /* fcntl.h:378:9 */ -//* Information the user passes in to get the codeblobs out of the kernel +// * Information the user passes in to get the codeblobs out of the kernel type Fcodeblobs_t = Fcodeblobs /* fcntl.h:386:3 */ // detached code signatures data type - diff --git a/vendor/modernc.org/libc/fcntl/fcntl_freebsd_386.go b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_386.go index 24eff390..7402dfec 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_freebsd_386.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_386.go @@ -638,8 +638,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/fcntl/fcntl_freebsd_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_amd64.go index 35bf5102..226622da 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_freebsd_amd64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_amd64.go @@ -15,58 +15,60 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AT_EACCESS = 0x0100 // fcntl.h:217:1: - AT_FDCWD = -100 // fcntl.h:212:1: - AT_REMOVEDIR = 0x0800 // fcntl.h:221:1: - AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:223:1: - AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:220:1: - AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:219:1: - FAPPEND = 8 // fcntl.h:186:1: - FASYNC = 64 // fcntl.h:187:1: - FDSYNC = 16777216 // fcntl.h:189:1: - FD_CLOEXEC = 1 // fcntl.h:272:1: - FD_NONE = -200 // fcntl.h:343:1: - FFSYNC = 128 // fcntl.h:188:1: - FNDELAY = 4 // fcntl.h:191:1: - FNONBLOCK = 4 // fcntl.h:190:1: - FRDAHEAD = 512 // fcntl.h:203:1: + AT_EACCESS = 0x0100 // fcntl.h:224:1: + AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1: + AT_FDCWD = -100 // fcntl.h:219:1: + AT_REMOVEDIR = 0x0800 // fcntl.h:228:1: + AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1: + AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1: + AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1: + FAPPEND = 8 // fcntl.h:193:1: + FASYNC = 64 // fcntl.h:194:1: + FDSYNC = 16777216 // fcntl.h:196:1: + FD_CLOEXEC = 1 // fcntl.h:283:1: + FD_NONE = -200 // fcntl.h:355:1: + FFSYNC = 128 // fcntl.h:195:1: + FNDELAY = 4 // fcntl.h:198:1: + FNONBLOCK = 4 // fcntl.h:197:1: + FRDAHEAD = 512 // fcntl.h:210:1: FREAD = 0x0001 // fcntl.h:89:1: FWRITE = 0x0002 // fcntl.h:90:1: - F_ADD_SEALS = 19 // fcntl.h:260:1: - F_CANCEL = 5 // fcntl.h:280:1: - F_DUP2FD = 10 // fcntl.h:245:1: - F_DUP2FD_CLOEXEC = 18 // fcntl.h:259:1: - F_DUPFD = 0 // fcntl.h:232:1: - F_DUPFD_CLOEXEC = 17 // fcntl.h:256:1: - F_GETFD = 1 // fcntl.h:233:1: - F_GETFL = 3 // fcntl.h:235:1: - F_GETLK = 11 // fcntl.h:247:1: - F_GETOWN = 5 // fcntl.h:238:1: - F_GET_SEALS = 20 // fcntl.h:261:1: - F_ISUNIONSTACK = 21 // fcntl.h:262:1: - F_OGETLK = 7 // fcntl.h:242:1: - F_OSETLK = 8 // fcntl.h:243:1: - F_OSETLKW = 9 // fcntl.h:244:1: - F_RDAHEAD = 16 // fcntl.h:253:1: - F_RDLCK = 1 // fcntl.h:275:1: - F_READAHEAD = 15 // fcntl.h:252:1: - F_SEAL_GROW = 0x0004 // fcntl.h:267:1: - F_SEAL_SEAL = 0x0001 // fcntl.h:265:1: - F_SEAL_SHRINK = 0x0002 // fcntl.h:266:1: - F_SEAL_WRITE = 0x0008 // fcntl.h:268:1: - F_SETFD = 2 // fcntl.h:234:1: - F_SETFL = 4 // fcntl.h:236:1: - F_SETLK = 12 // fcntl.h:248:1: - F_SETLKW = 13 // fcntl.h:249:1: - F_SETLK_REMOTE = 14 // fcntl.h:251:1: - F_SETOWN = 6 // fcntl.h:239:1: - F_UNLCK = 2 // fcntl.h:276:1: - F_UNLCKSYS = 4 // fcntl.h:279:1: - F_WRLCK = 3 // fcntl.h:277:1: - LOCK_EX = 0x02 // fcntl.h:320:1: - LOCK_NB = 0x04 // fcntl.h:321:1: - LOCK_SH = 0x01 // fcntl.h:319:1: - LOCK_UN = 0x08 // fcntl.h:322:1: + F_ADD_SEALS = 19 // fcntl.h:270:1: + F_CANCEL = 5 // fcntl.h:291:1: + F_DUP2FD = 10 // fcntl.h:255:1: + F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1: + F_DUPFD = 0 // fcntl.h:242:1: + F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1: + F_GETFD = 1 // fcntl.h:243:1: + F_GETFL = 3 // fcntl.h:245:1: + F_GETLK = 11 // fcntl.h:257:1: + F_GETOWN = 5 // fcntl.h:248:1: + F_GET_SEALS = 20 // fcntl.h:271:1: + F_ISUNIONSTACK = 21 // fcntl.h:272:1: + F_KINFO = 22 // fcntl.h:273:1: + F_OGETLK = 7 // fcntl.h:252:1: + F_OSETLK = 8 // fcntl.h:253:1: + F_OSETLKW = 9 // fcntl.h:254:1: + F_RDAHEAD = 16 // fcntl.h:263:1: + F_RDLCK = 1 // fcntl.h:286:1: + F_READAHEAD = 15 // fcntl.h:262:1: + F_SEAL_GROW = 0x0004 // fcntl.h:278:1: + F_SEAL_SEAL = 0x0001 // fcntl.h:276:1: + F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1: + F_SEAL_WRITE = 0x0008 // fcntl.h:279:1: + F_SETFD = 2 // fcntl.h:244:1: + F_SETFL = 4 // fcntl.h:246:1: + F_SETLK = 12 // fcntl.h:258:1: + F_SETLKW = 13 // fcntl.h:259:1: + F_SETLK_REMOTE = 14 // fcntl.h:261:1: + F_SETOWN = 6 // fcntl.h:249:1: + F_UNLCK = 2 // fcntl.h:287:1: + F_UNLCKSYS = 4 // fcntl.h:290:1: + F_WRLCK = 3 // fcntl.h:288:1: + LOCK_EX = 0x02 // fcntl.h:332:1: + LOCK_NB = 0x04 // fcntl.h:333:1: + LOCK_SH = 0x01 // fcntl.h:331:1: + LOCK_UN = 0x08 // fcntl.h:334:1: O_ACCMODE = 0x0003 // fcntl.h:78:1: O_APPEND = 0x0008 // fcntl.h:93:1: O_ASYNC = 0x0040 // fcntl.h:97:1: @@ -75,14 +77,16 @@ const ( O_DIRECT = 0x00010000 // fcntl.h:116:1: O_DIRECTORY = 0x00020000 // fcntl.h:120:1: O_DSYNC = 0x01000000 // fcntl.h:143:1: + O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1: O_EXCL = 0x0800 // fcntl.h:106:1: O_EXEC = 0x00040000 // fcntl.h:121:1: O_EXLOCK = 0x0020 // fcntl.h:96:1: O_FSYNC = 0x0080 // fcntl.h:98:1: - O_NDELAY = 4 // fcntl.h:192:1: + O_NDELAY = 4 // fcntl.h:199:1: O_NOCTTY = 0x8000 // fcntl.h:112:1: O_NOFOLLOW = 0x0100 // fcntl.h:102:1: O_NONBLOCK = 0x0004 // fcntl.h:92:1: + O_PATH = 0x00400000 // fcntl.h:138:1: O_RDONLY = 0x0000 // fcntl.h:75:1: O_RDWR = 0x0002 // fcntl.h:77:1: O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1: @@ -93,26 +97,26 @@ const ( O_TTY_INIT = 0x00080000 // fcntl.h:131:1: O_VERIFY = 0x00200000 // fcntl.h:137:1: O_WRONLY = 0x0001 // fcntl.h:76:1: - POSIX_FADV_DONTNEED = 4 // fcntl.h:333:1: - POSIX_FADV_NOREUSE = 5 // fcntl.h:334:1: - POSIX_FADV_NORMAL = 0 // fcntl.h:329:1: - POSIX_FADV_RANDOM = 1 // fcntl.h:330:1: - POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:331:1: - POSIX_FADV_WILLNEED = 3 // fcntl.h:332:1: + POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1: + POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1: + POSIX_FADV_NORMAL = 0 // fcntl.h:341:1: + POSIX_FADV_RANDOM = 1 // fcntl.h:342:1: + POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1: + POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_MODE_T_DECLARED = 0 // fcntl.h:54:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF_T_DECLARED = 0 // fcntl.h:59:1: X_PID_T_DECLARED = 0 // fcntl.h:64:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -391,12 +395,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -639,8 +646,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -714,8 +721,6 @@ type Pid_t = X__pid_t /* fcntl.h:63:18 */ // Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. -/* #define O_UNUSED1 0x00400000 */ // Was O_BENEATH - // XXX missing O_RSYNC. // The O_* flags used to have only F* names, which were used in the kernel @@ -755,7 +760,7 @@ type Flock = struct { Fl_whence int16 Fl_sysid int32 F__ccgo_pad1 [4]byte -} /* fcntl.h:294:1 */ +} /* fcntl.h:306:1 */ // Old advisory file segment locking data type, // before adding l_sysid. @@ -765,6 +770,6 @@ type X__oflock = struct { Fl_pid Pid_t Fl_type int16 Fl_whence int16 -} /* fcntl.h:308:1 */ +} /* fcntl.h:320:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_freebsd_arm.go b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_arm.go new file mode 100644 index 00000000..a2e03c04 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_arm.go @@ -0,0 +1,716 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_freebsd_arm.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AT_EACCESS = 0x0100 // fcntl.h:224:1: + AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1: + AT_FDCWD = -100 // fcntl.h:219:1: + AT_REMOVEDIR = 0x0800 // fcntl.h:228:1: + AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1: + AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1: + AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1: + FAPPEND = 8 // fcntl.h:193:1: + FASYNC = 64 // fcntl.h:194:1: + FDSYNC = 16777216 // fcntl.h:196:1: + FD_CLOEXEC = 1 // fcntl.h:283:1: + FD_NONE = -200 // fcntl.h:355:1: + FFSYNC = 128 // fcntl.h:195:1: + FNDELAY = 4 // fcntl.h:198:1: + FNONBLOCK = 4 // fcntl.h:197:1: + FRDAHEAD = 512 // fcntl.h:210:1: + FREAD = 0x0001 // fcntl.h:89:1: + FWRITE = 0x0002 // fcntl.h:90:1: + F_ADD_SEALS = 19 // fcntl.h:270:1: + F_CANCEL = 5 // fcntl.h:291:1: + F_DUP2FD = 10 // fcntl.h:255:1: + F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1: + F_DUPFD = 0 // fcntl.h:242:1: + F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1: + F_GETFD = 1 // fcntl.h:243:1: + F_GETFL = 3 // fcntl.h:245:1: + F_GETLK = 11 // fcntl.h:257:1: + F_GETOWN = 5 // fcntl.h:248:1: + F_GET_SEALS = 20 // fcntl.h:271:1: + F_ISUNIONSTACK = 21 // fcntl.h:272:1: + F_KINFO = 22 // fcntl.h:273:1: + F_OGETLK = 7 // fcntl.h:252:1: + F_OSETLK = 8 // fcntl.h:253:1: + F_OSETLKW = 9 // fcntl.h:254:1: + F_RDAHEAD = 16 // fcntl.h:263:1: + F_RDLCK = 1 // fcntl.h:286:1: + F_READAHEAD = 15 // fcntl.h:262:1: + F_SEAL_GROW = 0x0004 // fcntl.h:278:1: + F_SEAL_SEAL = 0x0001 // fcntl.h:276:1: + F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1: + F_SEAL_WRITE = 0x0008 // fcntl.h:279:1: + F_SETFD = 2 // fcntl.h:244:1: + F_SETFL = 4 // fcntl.h:246:1: + F_SETLK = 12 // fcntl.h:258:1: + F_SETLKW = 13 // fcntl.h:259:1: + F_SETLK_REMOTE = 14 // fcntl.h:261:1: + F_SETOWN = 6 // fcntl.h:249:1: + F_UNLCK = 2 // fcntl.h:287:1: + F_UNLCKSYS = 4 // fcntl.h:290:1: + F_WRLCK = 3 // fcntl.h:288:1: + LOCK_EX = 0x02 // fcntl.h:332:1: + LOCK_NB = 0x04 // fcntl.h:333:1: + LOCK_SH = 0x01 // fcntl.h:331:1: + LOCK_UN = 0x08 // fcntl.h:334:1: + O_ACCMODE = 0x0003 // fcntl.h:78:1: + O_APPEND = 0x0008 // fcntl.h:93:1: + O_ASYNC = 0x0040 // fcntl.h:97:1: + O_CLOEXEC = 0x00100000 // fcntl.h:133:1: + O_CREAT = 0x0200 // fcntl.h:104:1: + O_DIRECT = 0x00010000 // fcntl.h:116:1: + O_DIRECTORY = 0x00020000 // fcntl.h:120:1: + O_DSYNC = 0x01000000 // fcntl.h:143:1: + O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1: + O_EXCL = 0x0800 // fcntl.h:106:1: + O_EXEC = 0x00040000 // fcntl.h:121:1: + O_EXLOCK = 0x0020 // fcntl.h:96:1: + O_FSYNC = 0x0080 // fcntl.h:98:1: + O_NDELAY = 4 // fcntl.h:199:1: + O_NOCTTY = 0x8000 // fcntl.h:112:1: + O_NOFOLLOW = 0x0100 // fcntl.h:102:1: + O_NONBLOCK = 0x0004 // fcntl.h:92:1: + O_PATH = 0x00400000 // fcntl.h:138:1: + O_RDONLY = 0x0000 // fcntl.h:75:1: + O_RDWR = 0x0002 // fcntl.h:77:1: + O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1: + O_SEARCH = 262144 // fcntl.h:122:1: + O_SHLOCK = 0x0010 // fcntl.h:95:1: + O_SYNC = 0x0080 // fcntl.h:100:1: + O_TRUNC = 0x0400 // fcntl.h:105:1: + O_TTY_INIT = 0x00080000 // fcntl.h:131:1: + O_VERIFY = 0x00200000 // fcntl.h:137:1: + O_WRONLY = 0x0001 // fcntl.h:76:1: + POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1: + POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1: + POSIX_FADV_NORMAL = 0 // fcntl.h:341:1: + POSIX_FADV_RANDOM = 1 // fcntl.h:342:1: + POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1: + POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MODE_T_DECLARED = 0 // fcntl.h:54:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF_T_DECLARED = 0 // fcntl.h:59:1: + X_PID_T_DECLARED = 0 // fcntl.h:64:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1983, 1990, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fcntl.h 8.3 (Berkeley) 1/21/94 +// $FreeBSD$ + +// This file includes the definitions for open and fcntl +// described by POSIX for <fcntl.h>; it also includes +// related kernel definitions. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Mode_t = X__mode_t /* fcntl.h:53:18 */ + +type Off_t = X__off_t /* fcntl.h:58:18 */ + +type Pid_t = X__pid_t /* fcntl.h:63:18 */ + +// File status flags: these are used by open(2), fcntl(2). +// They are also used (indirectly) in the kernel file structure f_flags, +// which is a superset of the open/fcntl flags. Open flags and f_flags +// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). +// Open/fcntl flags begin with O_; kernel-internal flags begin with F. +// open-only flags + +// Kernel encoding of open mode; separate read and write bits that are +// independently testable: 1 greater than the above. +// +// XXX +// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, +// which was documented to use FREAD/FWRITE, continues to work. + +// Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. + +// Attempt to bypass buffer cache + +// Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. + +// XXX missing O_RSYNC. + +// The O_* flags used to have only F* names, which were used in the kernel +// and by fcntl. We retain the F* names for the kernel f_flag field +// and for backward compatibility for fcntl. These flags are deprecated. + +// Historically, we ran out of bits in f_flag (which was once a short). +// However, the flag bits not set in FMASK are only meaningful in the +// initial open syscall. Those bits were thus given a +// different meaning for fcntl(2). +// Read ahead + +// Magic value that specify the use of the current working directory +// to determine the target of relative file paths in the openat() and +// similar syscalls. + +// Miscellaneous flags for the *at() syscalls. +/* #define AT_UNUSED1 0x1000 */ // Was AT_BENEATH + +// Constants used for fcntl(2) + +// command values + +// Seals (F_ADD_SEALS, F_GET_SEALS). + +// file descriptor flags (F_GETFD, F_SETFD) + +// record locking flags (F_GETLK, F_SETLK, F_SETLKW) + +// Advisory file segment locking data type - +// information passed to system by user +type Flock = struct { + Fl_start Off_t + Fl_len Off_t + Fl_pid Pid_t + Fl_type int16 + Fl_whence int16 + Fl_sysid int32 + F__ccgo_pad1 [4]byte +} /* fcntl.h:306:1 */ + +// Old advisory file segment locking data type, +// before adding l_sysid. +type X__oflock = struct { + Fl_start Off_t + Fl_len Off_t + Fl_pid Pid_t + Fl_type int16 + Fl_whence int16 +} /* fcntl.h:320:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_freebsd_arm64.go b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_arm64.go new file mode 100644 index 00000000..226622da --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/fcntl_freebsd_arm64.go @@ -0,0 +1,775 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_freebsd_amd64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AT_EACCESS = 0x0100 // fcntl.h:224:1: + AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1: + AT_FDCWD = -100 // fcntl.h:219:1: + AT_REMOVEDIR = 0x0800 // fcntl.h:228:1: + AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1: + AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1: + AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1: + FAPPEND = 8 // fcntl.h:193:1: + FASYNC = 64 // fcntl.h:194:1: + FDSYNC = 16777216 // fcntl.h:196:1: + FD_CLOEXEC = 1 // fcntl.h:283:1: + FD_NONE = -200 // fcntl.h:355:1: + FFSYNC = 128 // fcntl.h:195:1: + FNDELAY = 4 // fcntl.h:198:1: + FNONBLOCK = 4 // fcntl.h:197:1: + FRDAHEAD = 512 // fcntl.h:210:1: + FREAD = 0x0001 // fcntl.h:89:1: + FWRITE = 0x0002 // fcntl.h:90:1: + F_ADD_SEALS = 19 // fcntl.h:270:1: + F_CANCEL = 5 // fcntl.h:291:1: + F_DUP2FD = 10 // fcntl.h:255:1: + F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1: + F_DUPFD = 0 // fcntl.h:242:1: + F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1: + F_GETFD = 1 // fcntl.h:243:1: + F_GETFL = 3 // fcntl.h:245:1: + F_GETLK = 11 // fcntl.h:257:1: + F_GETOWN = 5 // fcntl.h:248:1: + F_GET_SEALS = 20 // fcntl.h:271:1: + F_ISUNIONSTACK = 21 // fcntl.h:272:1: + F_KINFO = 22 // fcntl.h:273:1: + F_OGETLK = 7 // fcntl.h:252:1: + F_OSETLK = 8 // fcntl.h:253:1: + F_OSETLKW = 9 // fcntl.h:254:1: + F_RDAHEAD = 16 // fcntl.h:263:1: + F_RDLCK = 1 // fcntl.h:286:1: + F_READAHEAD = 15 // fcntl.h:262:1: + F_SEAL_GROW = 0x0004 // fcntl.h:278:1: + F_SEAL_SEAL = 0x0001 // fcntl.h:276:1: + F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1: + F_SEAL_WRITE = 0x0008 // fcntl.h:279:1: + F_SETFD = 2 // fcntl.h:244:1: + F_SETFL = 4 // fcntl.h:246:1: + F_SETLK = 12 // fcntl.h:258:1: + F_SETLKW = 13 // fcntl.h:259:1: + F_SETLK_REMOTE = 14 // fcntl.h:261:1: + F_SETOWN = 6 // fcntl.h:249:1: + F_UNLCK = 2 // fcntl.h:287:1: + F_UNLCKSYS = 4 // fcntl.h:290:1: + F_WRLCK = 3 // fcntl.h:288:1: + LOCK_EX = 0x02 // fcntl.h:332:1: + LOCK_NB = 0x04 // fcntl.h:333:1: + LOCK_SH = 0x01 // fcntl.h:331:1: + LOCK_UN = 0x08 // fcntl.h:334:1: + O_ACCMODE = 0x0003 // fcntl.h:78:1: + O_APPEND = 0x0008 // fcntl.h:93:1: + O_ASYNC = 0x0040 // fcntl.h:97:1: + O_CLOEXEC = 0x00100000 // fcntl.h:133:1: + O_CREAT = 0x0200 // fcntl.h:104:1: + O_DIRECT = 0x00010000 // fcntl.h:116:1: + O_DIRECTORY = 0x00020000 // fcntl.h:120:1: + O_DSYNC = 0x01000000 // fcntl.h:143:1: + O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1: + O_EXCL = 0x0800 // fcntl.h:106:1: + O_EXEC = 0x00040000 // fcntl.h:121:1: + O_EXLOCK = 0x0020 // fcntl.h:96:1: + O_FSYNC = 0x0080 // fcntl.h:98:1: + O_NDELAY = 4 // fcntl.h:199:1: + O_NOCTTY = 0x8000 // fcntl.h:112:1: + O_NOFOLLOW = 0x0100 // fcntl.h:102:1: + O_NONBLOCK = 0x0004 // fcntl.h:92:1: + O_PATH = 0x00400000 // fcntl.h:138:1: + O_RDONLY = 0x0000 // fcntl.h:75:1: + O_RDWR = 0x0002 // fcntl.h:77:1: + O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1: + O_SEARCH = 262144 // fcntl.h:122:1: + O_SHLOCK = 0x0010 // fcntl.h:95:1: + O_SYNC = 0x0080 // fcntl.h:100:1: + O_TRUNC = 0x0400 // fcntl.h:105:1: + O_TTY_INIT = 0x00080000 // fcntl.h:131:1: + O_VERIFY = 0x00200000 // fcntl.h:137:1: + O_WRONLY = 0x0001 // fcntl.h:76:1: + POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1: + POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1: + POSIX_FADV_NORMAL = 0 // fcntl.h:341:1: + POSIX_FADV_RANDOM = 1 // fcntl.h:342:1: + POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1: + POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MODE_T_DECLARED = 0 // fcntl.h:54:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF_T_DECLARED = 0 // fcntl.h:59:1: + X_PID_T_DECLARED = 0 // fcntl.h:64:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1983, 1990, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fcntl.h 8.3 (Berkeley) 1/21/94 +// $FreeBSD$ + +// This file includes the definitions for open and fcntl +// described by POSIX for <fcntl.h>; it also includes +// related kernel definitions. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Mode_t = X__mode_t /* fcntl.h:53:18 */ + +type Off_t = X__off_t /* fcntl.h:58:18 */ + +type Pid_t = X__pid_t /* fcntl.h:63:18 */ + +// File status flags: these are used by open(2), fcntl(2). +// They are also used (indirectly) in the kernel file structure f_flags, +// which is a superset of the open/fcntl flags. Open flags and f_flags +// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). +// Open/fcntl flags begin with O_; kernel-internal flags begin with F. +// open-only flags + +// Kernel encoding of open mode; separate read and write bits that are +// independently testable: 1 greater than the above. +// +// XXX +// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, +// which was documented to use FREAD/FWRITE, continues to work. + +// Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. + +// Attempt to bypass buffer cache + +// Defined by POSIX 1003.1-2008; BSD default, but reserve for future use. + +// XXX missing O_RSYNC. + +// The O_* flags used to have only F* names, which were used in the kernel +// and by fcntl. We retain the F* names for the kernel f_flag field +// and for backward compatibility for fcntl. These flags are deprecated. + +// Historically, we ran out of bits in f_flag (which was once a short). +// However, the flag bits not set in FMASK are only meaningful in the +// initial open syscall. Those bits were thus given a +// different meaning for fcntl(2). +// Read ahead + +// Magic value that specify the use of the current working directory +// to determine the target of relative file paths in the openat() and +// similar syscalls. + +// Miscellaneous flags for the *at() syscalls. +/* #define AT_UNUSED1 0x1000 */ // Was AT_BENEATH + +// Constants used for fcntl(2) + +// command values + +// Seals (F_ADD_SEALS, F_GET_SEALS). + +// file descriptor flags (F_GETFD, F_SETFD) + +// record locking flags (F_GETLK, F_SETLK, F_SETLKW) + +// Advisory file segment locking data type - +// information passed to system by user +type Flock = struct { + Fl_start Off_t + Fl_len Off_t + Fl_pid Pid_t + Fl_type int16 + Fl_whence int16 + Fl_sysid int32 + F__ccgo_pad1 [4]byte +} /* fcntl.h:306:1 */ + +// Old advisory file segment locking data type, +// before adding l_sysid. +type X__oflock = struct { + Fl_start Off_t + Fl_len Off_t + Fl_pid Pid_t + Fl_type int16 + Fl_whence int16 +} /* fcntl.h:320:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_386.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_386.go index bcf733b6..a8a250f7 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_linux_386.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_386.go @@ -822,7 +822,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -833,13 +834,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Get the definitions of O_*, F_*, FD_*: all the @@ -941,8 +944,9 @@ type Flock = struct { // argument). // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. -// Earlier POSIX standards permitted any type ending in `_t' to be defined -// by any POSIX header, so we don't conditionalize the definitions here. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. type Mode_t = X__mode_t /* fcntl.h:50:18 */ type Off_t = X__off64_t /* fcntl.h:58:19 */ @@ -1006,7 +1010,8 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_amd64.go index e0d177b7..8de6ac32 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_linux_amd64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_amd64.go @@ -837,7 +837,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -848,8 +849,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -959,8 +961,9 @@ type Flock = struct { // argument). // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. -// Earlier POSIX standards permitted any type ending in `_t' to be defined -// by any POSIX header, so we don't conditionalize the definitions here. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. type Mode_t = X__mode_t /* fcntl.h:50:18 */ type Off_t = X__off64_t /* fcntl.h:58:19 */ @@ -1024,7 +1027,8 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_arm.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_arm.go index a2dcc7d0..be219a66 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_linux_arm.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_arm.go @@ -881,7 +881,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -892,13 +893,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Get the definitions of O_*, F_*, FD_*: all the @@ -1002,8 +1005,9 @@ type Flock = struct { // argument). // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. -// Earlier POSIX standards permitted any type ending in `_t' to be defined -// by any POSIX header, so we don't conditionalize the definitions here. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. type Mode_t = X__mode_t /* fcntl.h:50:18 */ type Off_t = X__off64_t /* fcntl.h:58:19 */ @@ -1067,7 +1071,8 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_arm64.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_arm64.go index 8db44f6e..ecbff4fa 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_linux_arm64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_arm64.go @@ -905,7 +905,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -916,8 +917,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1026,8 +1028,9 @@ type Flock = struct { // argument). // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. -// Earlier POSIX standards permitted any type ending in `_t' to be defined -// by any POSIX header, so we don't conditionalize the definitions here. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. type Mode_t = X__mode_t /* fcntl.h:50:18 */ type Off_t = X__off64_t /* fcntl.h:58:19 */ @@ -1091,7 +1094,8 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_ppc64le.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_ppc64le.go index 71baa4e6..4bca8294 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_linux_ppc64le.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_ppc64le.go @@ -851,7 +851,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -862,8 +863,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -975,8 +977,9 @@ type Flock = struct { // argument). // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. -// Earlier POSIX standards permitted any type ending in `_t' to be defined -// by any POSIX header, so we don't conditionalize the definitions here. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. type Mode_t = X__mode_t /* fcntl.h:50:18 */ type Off_t = X__off64_t /* fcntl.h:58:19 */ @@ -1040,7 +1043,8 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go index e3c1e192..6d219d2a 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_riscv64.go @@ -1006,7 +1006,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1017,8 +1018,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1148,8 +1150,9 @@ type Flock = struct { // argument). // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. -// Earlier POSIX standards permitted any type ending in `_t' to be defined -// by any POSIX header, so we don't conditionalize the definitions here. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. type Mode_t = X__mode_t /* fcntl.h:50:18 */ type Off_t = X__off64_t /* fcntl.h:58:19 */ @@ -1236,7 +1239,8 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */ type Time_t = X__time_t /* time_t.h:10:18 */ // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_s390x.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_s390x.go index cbe884ce..bca84847 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_linux_s390x.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_s390x.go @@ -836,7 +836,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -847,8 +848,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -962,8 +964,9 @@ type Flock = struct { // argument). // POSIX.1-2001 specifies that these types are defined by <fcntl.h>. -// Earlier POSIX standards permitted any type ending in `_t' to be defined -// by any POSIX header, so we don't conditionalize the definitions here. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. type Mode_t = X__mode_t /* fcntl.h:50:18 */ type Off_t = X__off64_t /* fcntl.h:58:19 */ @@ -1027,7 +1030,8 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/fcntl/fcntl_netbsd_arm.go b/vendor/modernc.org/libc/fcntl/fcntl_netbsd_arm.go new file mode 100644 index 00000000..7c7234ce --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/fcntl_netbsd_arm.go @@ -0,0 +1,1455 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_netbsd_arm.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AT_EACCESS = 0x100 // fcntl.h:297:1: + AT_FDCWD = -100 // fcntl.h:296:1: + AT_REMOVEDIR = 0x800 // fcntl.h:300:1: + AT_SYMLINK_FOLLOW = 0x400 // fcntl.h:299:1: + AT_SYMLINK_NOFOLLOW = 0x200 // fcntl.h:298:1: + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + FAPPEND = 8 // fcntl.h:156:1: + FASYNC = 64 // fcntl.h:157:1: + FD_CLOEXEC = 1 // fcntl.h:199:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + FNDELAY = 4 // fcntl.h:159:1: + FREAD = 0x00000001 // fcntl.h:78:1: + FWRITE = 0x00000002 // fcntl.h:79:1: + F_CLOSEM = 10 // fcntl.h:191:1: + F_DUPFD = 0 // fcntl.h:177:1: + F_DUPFD_CLOEXEC = 12 // fcntl.h:193:1: + F_GETFD = 1 // fcntl.h:178:1: + F_GETFL = 3 // fcntl.h:180:1: + F_GETLK = 7 // fcntl.h:187:1: + F_GETNOSIGPIPE = 13 // fcntl.h:194:1: + F_GETOWN = 5 // fcntl.h:184:1: + F_MAXFD = 11 // fcntl.h:192:1: + F_PARAM_MASK = 0xfff // fcntl.h:213:1: + F_PARAM_MAX = 4095 // fcntl.h:215:1: + F_RDLCK = 1 // fcntl.h:202:1: + F_SETFD = 2 // fcntl.h:179:1: + F_SETFL = 4 // fcntl.h:181:1: + F_SETLK = 8 // fcntl.h:188:1: + F_SETLKW = 9 // fcntl.h:189:1: + F_SETNOSIGPIPE = 14 // fcntl.h:195:1: + F_SETOWN = 6 // fcntl.h:185:1: + F_UNLCK = 2 // fcntl.h:203:1: + F_WRLCK = 3 // fcntl.h:204:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + LOCK_EX = 0x02 // fcntl.h:264:1: + LOCK_NB = 0x04 // fcntl.h:265:1: + LOCK_SH = 0x01 // fcntl.h:263:1: + LOCK_UN = 0x08 // fcntl.h:266:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + O_ACCMODE = 0x00000003 // fcntl.h:67:1: + O_ALT_IO = 0x00040000 // fcntl.h:111:1: + O_APPEND = 0x00000008 // fcntl.h:82:1: + O_ASYNC = 0x00000040 // fcntl.h:86:1: + O_CLOEXEC = 0x00400000 // fcntl.h:116:1: + O_CREAT = 0x00000200 // fcntl.h:97:1: + O_DIRECT = 0x00080000 // fcntl.h:112:1: + O_DIRECTORY = 0x00200000 // fcntl.h:115:1: + O_DSYNC = 0x00010000 // fcntl.h:106:1: + O_EXCL = 0x00000800 // fcntl.h:99:1: + O_EXLOCK = 0x00000020 // fcntl.h:85:1: + O_FSYNC = 128 // fcntl.h:158:1: + O_NDELAY = 4 // fcntl.h:160:1: + O_NOCTTY = 0x00008000 // fcntl.h:102:1: + O_NOFOLLOW = 0x00000100 // fcntl.h:94:1: + O_NONBLOCK = 0x00000004 // fcntl.h:81:1: + O_NOSIGPIPE = 0x01000000 // fcntl.h:122:1: + O_RDONLY = 0x00000000 // fcntl.h:64:1: + O_RDWR = 0x00000002 // fcntl.h:66:1: + O_REGULAR = 0x02000000 // fcntl.h:123:1: + O_RSYNC = 0x00020000 // fcntl.h:107:1: + O_SEARCH = 0x00800000 // fcntl.h:119:1: + O_SHLOCK = 0x00000010 // fcntl.h:84:1: + O_SYNC = 0x00000080 // fcntl.h:91:1: + O_TRUNC = 0x00000400 // fcntl.h:98:1: + O_WRONLY = 0x00000001 // fcntl.h:65:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + POSIX_FADV_DONTNEED = 4 // fcntl.h:288:1: + POSIX_FADV_NOREUSE = 5 // fcntl.h:289:1: + POSIX_FADV_NORMAL = 0 // fcntl.h:284:1: + POSIX_FADV_RANDOM = 1 // fcntl.h:285:1: + POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:286:1: + POSIX_FADV_WILLNEED = 3 // fcntl.h:287:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SEEK_CUR = 1 // fcntl.h:274:1: + SEEK_END = 2 // fcntl.h:277:1: + SEEK_SET = 0 // fcntl.h:271:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:40:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// File status flags: these are used by open(2), fcntl(2). +// They are also used (indirectly) in the kernel file structure f_flags, +// which is a superset of the open/fcntl flags. Open flags and f_flags +// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). +// Open/fcntl flags begin with O_; kernel-internal flags begin with F. +// open-only flags + +// Kernel encoding of open mode; separate read and write bits that are +// independently testable: 1 greater than the above. +// +// XXX +// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, +// which was documented to use FREAD/FWRITE, continues to work. +// path component + +// defined by POSIX 1003.1; BSD default, but required to be bitwise distinct + +// The O_* flags used to have only F* names, which were used in the kernel +// and by fcntl. We retain the F* names for the kernel f_flags field +// and for backward compatibility for fcntl. + +// Constants used for fcntl(2) + +// command values + +// file descriptor flags (F_GETFD, F_SETFD) + +// record locking flags (F_GETLK, F_SETLK, F_SETLKW) + +// Constants for fcntl's passed to the underlying fs - like ioctl's. + +// Define command macros for operations which, if implemented, must be +// the same for all fs's. + +// Define command macros for fs-specific commands. + +// Advisory file segment locking data type - +// information passed to system by user +type Flock = struct { + Fl_start X__off_t + Fl_len X__off_t + Fl_pid X__pid_t + Fl_type int16 + Fl_whence int16 +} /* fcntl.h:252:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_386.go b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_386.go new file mode 100644 index 00000000..6ed4d22b --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_386.go @@ -0,0 +1,816 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_386.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AT_EACCESS = 0x01 // fcntl.h:200:1: + AT_FDCWD = -100 // fcntl.h:198:1: + AT_REMOVEDIR = 0x08 // fcntl.h:203:1: + AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1: + AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + FAPPEND = 8 // fcntl.h:130:1: + FASYNC = 64 // fcntl.h:131:1: + FD_CLOEXEC = 1 // fcntl.h:163:1: + FFSYNC = 128 // fcntl.h:132:1: + FNDELAY = 4 // fcntl.h:134:1: + FNONBLOCK = 4 // fcntl.h:133:1: + FREAD = 0x0001 // fcntl.h:76:1: + FWRITE = 0x0002 // fcntl.h:77:1: + F_DUPFD = 0 // fcntl.h:143:1: + F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1: + F_GETFD = 1 // fcntl.h:144:1: + F_GETFL = 3 // fcntl.h:146:1: + F_GETLK = 7 // fcntl.h:152:1: + F_GETOWN = 5 // fcntl.h:149:1: + F_ISATTY = 11 // fcntl.h:159:1: + F_RDLCK = 1 // fcntl.h:166:1: + F_SETFD = 2 // fcntl.h:145:1: + F_SETFL = 4 // fcntl.h:147:1: + F_SETLK = 8 // fcntl.h:153:1: + F_SETLKW = 9 // fcntl.h:154:1: + F_SETOWN = 6 // fcntl.h:150:1: + F_UNLCK = 2 // fcntl.h:167:1: + F_WRLCK = 3 // fcntl.h:168:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + LOCK_EX = 0x02 // fcntl.h:192:1: + LOCK_NB = 0x04 // fcntl.h:193:1: + LOCK_SH = 0x01 // fcntl.h:191:1: + LOCK_UN = 0x08 // fcntl.h:194:1: + O_ACCMODE = 0x0003 // fcntl.h:65:1: + O_APPEND = 0x0008 // fcntl.h:80:1: + O_ASYNC = 0x0040 // fcntl.h:84:1: + O_CLOEXEC = 0x10000 // fcntl.h:107:1: + O_CREAT = 0x0200 // fcntl.h:91:1: + O_DIRECTORY = 0x20000 // fcntl.h:108:1: + O_DSYNC = 128 // fcntl.h:100:1: + O_EXCL = 0x0800 // fcntl.h:93:1: + O_EXLOCK = 0x0020 // fcntl.h:83:1: + O_FSYNC = 0x0080 // fcntl.h:85:1: + O_NDELAY = 4 // fcntl.h:135:1: + O_NOCTTY = 0x8000 // fcntl.h:104:1: + O_NOFOLLOW = 0x0100 // fcntl.h:86:1: + O_NONBLOCK = 0x0004 // fcntl.h:79:1: + O_RDONLY = 0x0000 // fcntl.h:62:1: + O_RDWR = 0x0002 // fcntl.h:64:1: + O_RSYNC = 128 // fcntl.h:101:1: + O_SHLOCK = 0x0010 // fcntl.h:82:1: + O_SYNC = 0x0080 // fcntl.h:89:1: + O_TRUNC = 0x0400 // fcntl.h:92:1: + O_WRONLY = 0x0001 // fcntl.h:63:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $ +// $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $ + +// - +// Copyright (c) 1983, 1990, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fcntl.h 8.3 (Berkeley) 1/21/94 + +// This file includes the definitions for open and fcntl +// described by POSIX for <fcntl.h>; it also includes +// related kernel definitions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// File status flags: these are used by open(2), fcntl(2). +// They are also used (indirectly) in the kernel file structure f_flags, +// which is a superset of the open/fcntl flags. Open flags and f_flags +// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). +// Open/fcntl flags begin with O_; kernel-internal flags begin with F. +// open-only flags + +// Kernel encoding of open mode; separate read and write bits that are +// independently testable: 1 greater than the above. +// +// XXX +// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, +// which was documented to use FREAD/FWRITE, continues to work. + +// POSIX 1003.1 specifies a higher granularity for synchronous operations +// than we support. Since synchronicity is all or nothing in OpenBSD +// we just define these to be the same as O_SYNC. + +// defined by POSIX 1003.1; BSD default, this bit is not required + +// defined by POSIX Issue 7 + +// The O_* flags used to have only F* names, which were used in the kernel +// and by fcntl. We retain the F* names for the kernel f_flags field +// and for backward compatibility for fcntl. + +// Constants used for fcntl(2) + +// command values + +// file descriptor flags (F_GETFD, F_SETFD) + +// record locking flags (F_GETLK, F_SETLK, F_SETLKW) + +// Advisory file segment locking data type - +// information passed to system by user +type Flock = struct { + Fl_start Off_t + Fl_len Off_t + Fl_pid Pid_t + Fl_type int16 + Fl_whence int16 +} /* fcntl.h:180:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go index 47b82df8..15ebbbd4 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go @@ -74,8 +74,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -87,14 +87,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -102,13 +102,13 @@ const ( X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -333,7 +333,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -503,7 +503,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -663,18 +663,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -756,27 +755,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/fcntl/fcntl_openbsd_arm64.go b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_arm64.go new file mode 100644 index 00000000..ef4fd330 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/fcntl_openbsd_arm64.go @@ -0,0 +1,823 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AT_EACCESS = 0x01 // fcntl.h:200:1: + AT_FDCWD = -100 // fcntl.h:198:1: + AT_REMOVEDIR = 0x08 // fcntl.h:203:1: + AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1: + AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + FAPPEND = 8 // fcntl.h:130:1: + FASYNC = 64 // fcntl.h:131:1: + FD_CLOEXEC = 1 // fcntl.h:163:1: + FFSYNC = 128 // fcntl.h:132:1: + FNDELAY = 4 // fcntl.h:134:1: + FNONBLOCK = 4 // fcntl.h:133:1: + FREAD = 0x0001 // fcntl.h:76:1: + FWRITE = 0x0002 // fcntl.h:77:1: + F_DUPFD = 0 // fcntl.h:143:1: + F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1: + F_GETFD = 1 // fcntl.h:144:1: + F_GETFL = 3 // fcntl.h:146:1: + F_GETLK = 7 // fcntl.h:152:1: + F_GETOWN = 5 // fcntl.h:149:1: + F_ISATTY = 11 // fcntl.h:159:1: + F_RDLCK = 1 // fcntl.h:166:1: + F_SETFD = 2 // fcntl.h:145:1: + F_SETFL = 4 // fcntl.h:147:1: + F_SETLK = 8 // fcntl.h:153:1: + F_SETLKW = 9 // fcntl.h:154:1: + F_SETOWN = 6 // fcntl.h:150:1: + F_UNLCK = 2 // fcntl.h:167:1: + F_WRLCK = 3 // fcntl.h:168:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + LOCK_EX = 0x02 // fcntl.h:192:1: + LOCK_NB = 0x04 // fcntl.h:193:1: + LOCK_SH = 0x01 // fcntl.h:191:1: + LOCK_UN = 0x08 // fcntl.h:194:1: + O_ACCMODE = 0x0003 // fcntl.h:65:1: + O_APPEND = 0x0008 // fcntl.h:80:1: + O_ASYNC = 0x0040 // fcntl.h:84:1: + O_CLOEXEC = 0x10000 // fcntl.h:107:1: + O_CREAT = 0x0200 // fcntl.h:91:1: + O_DIRECTORY = 0x20000 // fcntl.h:108:1: + O_DSYNC = 128 // fcntl.h:100:1: + O_EXCL = 0x0800 // fcntl.h:93:1: + O_EXLOCK = 0x0020 // fcntl.h:83:1: + O_FSYNC = 0x0080 // fcntl.h:85:1: + O_NDELAY = 4 // fcntl.h:135:1: + O_NOCTTY = 0x8000 // fcntl.h:104:1: + O_NOFOLLOW = 0x0100 // fcntl.h:86:1: + O_NONBLOCK = 0x0004 // fcntl.h:79:1: + O_RDONLY = 0x0000 // fcntl.h:62:1: + O_RDWR = 0x0002 // fcntl.h:64:1: + O_RSYNC = 128 // fcntl.h:101:1: + O_SHLOCK = 0x0010 // fcntl.h:82:1: + O_SYNC = 0x0080 // fcntl.h:89:1: + O_TRUNC = 0x0400 // fcntl.h:92:1: + O_WRONLY = 0x0001 // fcntl.h:63:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $ +// $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $ + +// - +// Copyright (c) 1983, 1990, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fcntl.h 8.3 (Berkeley) 1/21/94 + +// This file includes the definitions for open and fcntl +// described by POSIX for <fcntl.h>; it also includes +// related kernel definitions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// File status flags: these are used by open(2), fcntl(2). +// They are also used (indirectly) in the kernel file structure f_flags, +// which is a superset of the open/fcntl flags. Open flags and f_flags +// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). +// Open/fcntl flags begin with O_; kernel-internal flags begin with F. +// open-only flags + +// Kernel encoding of open mode; separate read and write bits that are +// independently testable: 1 greater than the above. +// +// XXX +// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, +// which was documented to use FREAD/FWRITE, continues to work. + +// POSIX 1003.1 specifies a higher granularity for synchronous operations +// than we support. Since synchronicity is all or nothing in OpenBSD +// we just define these to be the same as O_SYNC. + +// defined by POSIX 1003.1; BSD default, this bit is not required + +// defined by POSIX Issue 7 + +// The O_* flags used to have only F* names, which were used in the kernel +// and by fcntl. We retain the F* names for the kernel f_flags field +// and for backward compatibility for fcntl. + +// Constants used for fcntl(2) + +// command values + +// file descriptor flags (F_GETFD, F_SETFD) + +// record locking flags (F_GETLK, F_SETLK, F_SETLKW) + +// Advisory file segment locking data type - +// information passed to system by user +type Flock = struct { + Fl_start Off_t + Fl_len Off_t + Fl_pid Pid_t + Fl_type int16 + Fl_whence int16 +} /* fcntl.h:180:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go b/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go index ef167d40..0055eedf 100644 --- a/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go +++ b/vendor/modernc.org/libc/fcntl/fcntl_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo fcntl\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT. +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT. package fcntl @@ -15,148 +15,148 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - F_OK = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - O_ACCMODE = 3 - O_APPEND = 8 - O_BINARY = 32768 - O_CREAT = 256 - O_EXCL = 1024 - O_NOINHERIT = 128 - O_RANDOM = 16 - O_RAW = 32768 - O_RDONLY = 0 - O_RDWR = 2 - O_SEQUENTIAL = 32 - O_TEMPORARY = 64 - O_TEXT = 16384 - O_TRUNC = 512 - O_WRONLY = 1 - R_OK = 4 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - W_OK = 2 - X_OK = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_A_ARCH = 0x20 - X_A_HIDDEN = 0x02 - X_A_NORMAL = 0x00 - X_A_RDONLY = 0x01 - X_A_SUBDIR = 0x10 - X_A_SYSTEM = 0x04 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_MEMORY_DEFINED = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_LSEEK = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FINDDATA_T_DEFINED = 0 - X_FSIZE_T_DEFINED = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_FCNTL = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STRING = 0 - X_INC_STRING_S = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IO_H_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_NLSCMPERROR = 2147483647 - X_NLSCMP_DEFINED = 0 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_O_ACCMODE = 3 - X_O_APPEND = 0x0008 - X_O_BINARY = 0x8000 - X_O_CREAT = 0x0100 - X_O_EXCL = 0x0400 - X_O_NOINHERIT = 0x0080 - X_O_RANDOM = 0x0010 - X_O_RAW = 32768 - X_O_RDONLY = 0x0000 - X_O_RDWR = 0x0002 - X_O_SEQUENTIAL = 0x0020 - X_O_SHORT_LIVED = 0x1000 - X_O_TEMPORARY = 0x0040 - X_O_TEXT = 0x4000 - X_O_TRUNC = 0x0200 - X_O_U16TEXT = 0x20000 - X_O_U8TEXT = 0x40000 - X_O_WRONLY = 0x0001 - X_O_WTEXT = 0x10000 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WConst_return = 0 - X_WFINDDATA_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WIO_DEFINED = 0 - X_WSTRING_DEFINED = 0 - X_WSTRING_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + F_OK = 0 // io.h:182:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + O_ACCMODE = 3 // fcntl.h:50:1: + O_APPEND = 8 // fcntl.h:39:1: + O_BINARY = 32768 // fcntl.h:44:1: + O_CREAT = 256 // fcntl.h:40:1: + O_EXCL = 1024 // fcntl.h:42:1: + O_NOINHERIT = 128 // fcntl.h:47:1: + O_RANDOM = 16 // fcntl.h:49:1: + O_RAW = 32768 // fcntl.h:45:1: + O_RDONLY = 0 // fcntl.h:36:1: + O_RDWR = 2 // fcntl.h:38:1: + O_SEQUENTIAL = 32 // fcntl.h:48:1: + O_TEMPORARY = 64 // fcntl.h:46:1: + O_TEXT = 16384 // fcntl.h:43:1: + O_TRUNC = 512 // fcntl.h:41:1: + O_WRONLY = 1 // fcntl.h:37:1: + R_OK = 4 // io.h:185:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + W_OK = 2 // io.h:184:1: + X_OK = 1 // io.h:183:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_A_ARCH = 0x20 // io.h:156:1: + X_A_HIDDEN = 0x02 // io.h:153:1: + X_A_NORMAL = 0x00 // io.h:151:1: + X_A_RDONLY = 0x01 // io.h:152:1: + X_A_SUBDIR = 0x10 // io.h:155:1: + X_A_SYSTEM = 0x04 // io.h:154:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_MEMORY_DEFINED = 0 // string.h:44:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FINDDATA_T_DEFINED = 0 // io.h:89:1: + X_FSIZE_T_DEFINED = 0 // io.h:30:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_FCNTL = 0 // fcntl.h:11:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STRING = 0 // string.h:7:1: + X_INC_STRING_S = 0 // string_s.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IO_H_ = 0 // io.h:7:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NLSCMPERROR = 2147483647 // string.h:26:1: + X_NLSCMP_DEFINED = 0 // string.h:25:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_O_ACCMODE = 3 // fcntl.h:25:1: + X_O_APPEND = 0x0008 // fcntl.h:16:1: + X_O_BINARY = 0x8000 // fcntl.h:21:1: + X_O_CREAT = 0x0100 // fcntl.h:17:1: + X_O_EXCL = 0x0400 // fcntl.h:19:1: + X_O_NOINHERIT = 0x0080 // fcntl.h:28:1: + X_O_RANDOM = 0x0010 // fcntl.h:33:1: + X_O_RAW = 32768 // fcntl.h:27:1: + X_O_RDONLY = 0x0000 // fcntl.h:13:1: + X_O_RDWR = 0x0002 // fcntl.h:15:1: + X_O_SEQUENTIAL = 0x0020 // fcntl.h:32:1: + X_O_SHORT_LIVED = 0x1000 // fcntl.h:30:1: + X_O_TEMPORARY = 0x0040 // fcntl.h:29:1: + X_O_TEXT = 0x4000 // fcntl.h:20:1: + X_O_TRUNC = 0x0200 // fcntl.h:18:1: + X_O_U16TEXT = 0x20000 // fcntl.h:23:1: + X_O_U8TEXT = 0x40000 // fcntl.h:24:1: + X_O_WRONLY = 0x0001 // fcntl.h:14:1: + X_O_WTEXT = 0x10000 // fcntl.h:22:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WConst_return = 0 // string.h:41:1: + X_WFINDDATA_T_DEFINED = 0 // io.h:148:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WIO_DEFINED = 0 // io.h:295:1: + X_WSTRING_DEFINED = 0 // string.h:129:1: + X_WSTRING_S_DEFINED = 0 // string_s.h:48:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -189,6 +189,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -209,6 +214,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -249,26 +260,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -294,29 +307,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_fsize_t = uint32 /* io.h:29:25 */ type X_finddata32_t = struct { diff --git a/vendor/modernc.org/libc/fts/capi_darwin_amd64.go b/vendor/modernc.org/libc/fts/capi_darwin_amd64.go index 46344857..71d2f55c 100644 --- a/vendor/modernc.org/libc/fts/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/fts/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT. +// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT. package fts diff --git a/vendor/modernc.org/libc/fts/capi_freebsd_arm.go b/vendor/modernc.org/libc/fts/capi_freebsd_arm.go new file mode 100644 index 00000000..3066863f --- /dev/null +++ b/vendor/modernc.org/libc/fts/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_freebsd_arm.go -pkgname fts', DO NOT EDIT. + +package fts + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fts/capi_freebsd_arm64.go b/vendor/modernc.org/libc/fts/capi_freebsd_arm64.go new file mode 100644 index 00000000..f7be5ca7 --- /dev/null +++ b/vendor/modernc.org/libc/fts/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_freebsd_amd64.go -pkgname fts', DO NOT EDIT. + +package fts + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fts/capi_netbsd_arm.go b/vendor/modernc.org/libc/fts/capi_netbsd_arm.go new file mode 100644 index 00000000..c6e5d8fe --- /dev/null +++ b/vendor/modernc.org/libc/fts/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_netbsd_arm.go -pkgname fts', DO NOT EDIT. + +package fts + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fts/capi_openbsd_386.go b/vendor/modernc.org/libc/fts/capi_openbsd_386.go new file mode 100644 index 00000000..a3e34da8 --- /dev/null +++ b/vendor/modernc.org/libc/fts/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_openbsd_386.go -pkgname fts', DO NOT EDIT. + +package fts + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fts/capi_openbsd_arm64.go b/vendor/modernc.org/libc/fts/capi_openbsd_arm64.go new file mode 100644 index 00000000..983e5630 --- /dev/null +++ b/vendor/modernc.org/libc/fts/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_openbsd_arm64.go -pkgname fts', DO NOT EDIT. + +package fts + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fts/fts_darwin_amd64.go b/vendor/modernc.org/libc/fts/fts_darwin_amd64.go index ef7479e7..efe81943 100644 --- a/vendor/modernc.org/libc/fts/fts_darwin_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT. +// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT. package fts @@ -15,185 +15,185 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSPERMS = 511 - ALLPERMS = 4095 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - DEFFILEMODE = 438 - EF_IS_PURGEABLE = 0x00000008 - EF_IS_SPARSE = 0x00000010 - EF_IS_SYNC_ROOT = 0x00000004 - EF_MAY_SHARE_BLOCKS = 0x00000001 - EF_NO_XATTRS = 0x00000002 - FD_SETSIZE = 1024 - FTS_AGAIN = 1 - FTS_BLOCK_COMPAR = 0x80000000 - FTS_COMFOLLOW = 0x001 - FTS_COMFOLLOWDIR = 0x400 - FTS_D = 1 - FTS_DC = 2 - FTS_DEFAULT = 3 - FTS_DNR = 4 - FTS_DONTCHDIR = 0x01 - FTS_DOT = 5 - FTS_DP = 6 - FTS_ERR = 7 - FTS_F = 8 - FTS_FOLLOW = 2 - FTS_INIT = 9 - FTS_ISW = 0x04 - FTS_LOGICAL = 0x002 - FTS_MAXLEVEL = 0x7fffffff - FTS_NAMEONLY = 0x100 - FTS_NOCHDIR = 0x004 - FTS_NOINSTR = 3 - FTS_NOSTAT = 0x008 - FTS_NOSTAT_TYPE = 0x800 - FTS_NS = 10 - FTS_NSOK = 11 - FTS_OPTIONMASK = 0xcff - FTS_PHYSICAL = 0x010 - FTS_ROOTLEVEL = 0 - FTS_ROOTPARENTLEVEL = -1 - FTS_SEEDOT = 0x020 - FTS_SKIP = 4 - FTS_SL = 12 - FTS_SLNONE = 13 - FTS_STOP = 0x200 - FTS_SYMFOLLOW = 0x02 - FTS_W = 14 - FTS_WHITEOUT = 0x080 - FTS_XDEV = 0x040 - LITTLE_ENDIAN = 1234 - NBBY = 8 - PDP_ENDIAN = 3412 - SF_APPEND = 0x00040000 - SF_ARCHIVED = 0x00010000 - SF_DATALESS = 0x40000000 - SF_FIRMLINK = 0x00800000 - SF_IMMUTABLE = 0x00020000 - SF_NOUNLINK = 0x00100000 - SF_RESTRICTED = 0x00080000 - SF_SETTABLE = 0x3fff0000 - SF_SUPPORTED = 0x009f0000 - SF_SYNTHETIC = 0xc0000000 - S_BLKSIZE = 512 - S_IEXEC = 64 - S_IFBLK = 0060000 - S_IFCHR = 0020000 - S_IFDIR = 0040000 - S_IFIFO = 0010000 - S_IFLNK = 0120000 - S_IFMT = 0170000 - S_IFREG = 0100000 - S_IFSOCK = 0140000 - S_IFWHT = 0160000 - S_IREAD = 256 - S_IRGRP = 0000040 - S_IROTH = 0000004 - S_IRUSR = 0000400 - S_IRWXG = 0000070 - S_IRWXO = 0000007 - S_IRWXU = 0000700 - S_ISGID = 0002000 - S_ISTXT = 512 - S_ISUID = 0004000 - S_ISVTX = 0001000 - S_IWGRP = 0000020 - S_IWOTH = 0000002 - S_IWRITE = 128 - S_IWUSR = 0000200 - S_IXGRP = 0000010 - S_IXOTH = 0000001 - S_IXUSR = 0000100 - UF_APPEND = 0x00000004 - UF_COMPRESSED = 0x00000020 - UF_DATAVAULT = 0x00000080 - UF_HIDDEN = 0x00008000 - UF_IMMUTABLE = 0x00000002 - UF_NODUMP = 0x00000001 - UF_OPAQUE = 0x00000008 - UF_SETTABLE = 0x0000ffff - UF_TRACKED = 0x00000040 - UTIME_NOW = -1 - UTIME_OMIT = -2 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILESEC_T = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_FTS_H_ = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_SUSECONDS_T = 0 - X_SYS_STAT_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 + ACCESSPERMS = 511 // stat.h:297:1: + ALLPERMS = 4095 // stat.h:299:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + DEFFILEMODE = 438 // stat.h:301:1: + EF_IS_PURGEABLE = 0x00000008 // stat.h:370:1: + EF_IS_SPARSE = 0x00000010 // stat.h:371:1: + EF_IS_SYNC_ROOT = 0x00000004 // stat.h:369:1: + EF_MAY_SHARE_BLOCKS = 0x00000001 // stat.h:367:1: + EF_NO_XATTRS = 0x00000002 // stat.h:368:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + FTS_AGAIN = 1 // fts.h:156:1: + FTS_BLOCK_COMPAR = 0x80000000 // fts.h:108:1: + FTS_COMFOLLOW = 0x001 // fts.h:89:1: + FTS_COMFOLLOWDIR = 0x400 // fts.h:97:1: + FTS_D = 1 // fts.h:135:1: + FTS_DC = 2 // fts.h:136:1: + FTS_DEFAULT = 3 // fts.h:137:1: + FTS_DNR = 4 // fts.h:138:1: + FTS_DONTCHDIR = 0x01 // fts.h:151:1: + FTS_DOT = 5 // fts.h:139:1: + FTS_DP = 6 // fts.h:140:1: + FTS_ERR = 7 // fts.h:141:1: + FTS_F = 8 // fts.h:142:1: + FTS_FOLLOW = 2 // fts.h:157:1: + FTS_INIT = 9 // fts.h:143:1: + FTS_ISW = 0x04 // fts.h:153:1: + FTS_LOGICAL = 0x002 // fts.h:90:1: + FTS_MAXLEVEL = 0x7fffffff // fts.h:132:1: + FTS_NAMEONLY = 0x100 // fts.h:105:1: + FTS_NOCHDIR = 0x004 // fts.h:91:1: + FTS_NOINSTR = 3 // fts.h:158:1: + FTS_NOSTAT = 0x008 // fts.h:92:1: + FTS_NOSTAT_TYPE = 0x800 // fts.h:101:1: + FTS_NS = 10 // fts.h:144:1: + FTS_NSOK = 11 // fts.h:145:1: + FTS_OPTIONMASK = 0xcff // fts.h:102:1: + FTS_PHYSICAL = 0x010 // fts.h:93:1: + FTS_ROOTLEVEL = 0 // fts.h:131:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:130:1: + FTS_SEEDOT = 0x020 // fts.h:94:1: + FTS_SKIP = 4 // fts.h:159:1: + FTS_SL = 12 // fts.h:146:1: + FTS_SLNONE = 13 // fts.h:147:1: + FTS_STOP = 0x200 // fts.h:106:1: + FTS_SYMFOLLOW = 0x02 // fts.h:152:1: + FTS_W = 14 // fts.h:148:1: + FTS_WHITEOUT = 0x080 // fts.h:96:1: + FTS_XDEV = 0x040 // fts.h:95:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + NBBY = 8 // types.h:186:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + SF_APPEND = 0x00040000 // stat.h:340:1: + SF_ARCHIVED = 0x00010000 // stat.h:338:1: + SF_DATALESS = 0x40000000 // stat.h:359:1: + SF_FIRMLINK = 0x00800000 // stat.h:351:1: + SF_IMMUTABLE = 0x00020000 // stat.h:339:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_RESTRICTED = 0x00080000 // stat.h:341:1: + SF_SETTABLE = 0x3fff0000 // stat.h:336:1: + SF_SUPPORTED = 0x009f0000 // stat.h:335:1: + SF_SYNTHETIC = 0xc0000000 // stat.h:337:1: + S_BLKSIZE = 512 // stat.h:303:1: + S_IEXEC = 64 // _s_ifmt.h:72:1: + S_IFBLK = 0060000 // _s_ifmt.h:39:1: + S_IFCHR = 0020000 // _s_ifmt.h:37:1: + S_IFDIR = 0040000 // _s_ifmt.h:38:1: + S_IFIFO = 0010000 // _s_ifmt.h:36:1: + S_IFLNK = 0120000 // _s_ifmt.h:41:1: + S_IFMT = 0170000 // _s_ifmt.h:35:1: + S_IFREG = 0100000 // _s_ifmt.h:40:1: + S_IFSOCK = 0140000 // _s_ifmt.h:42:1: + S_IFWHT = 0160000 // _s_ifmt.h:44:1: + S_IREAD = 256 // _s_ifmt.h:70:1: + S_IRGRP = 0000040 // _s_ifmt.h:55:1: + S_IROTH = 0000004 // _s_ifmt.h:60:1: + S_IRUSR = 0000400 // _s_ifmt.h:50:1: + S_IRWXG = 0000070 // _s_ifmt.h:54:1: + S_IRWXO = 0000007 // _s_ifmt.h:59:1: + S_IRWXU = 0000700 // _s_ifmt.h:49:1: + S_ISGID = 0002000 // _s_ifmt.h:65:1: + S_ISTXT = 512 // _s_ifmt.h:69:1: + S_ISUID = 0004000 // _s_ifmt.h:64:1: + S_ISVTX = 0001000 // _s_ifmt.h:66:1: + S_IWGRP = 0000020 // _s_ifmt.h:56:1: + S_IWOTH = 0000002 // _s_ifmt.h:61:1: + S_IWRITE = 128 // _s_ifmt.h:71:1: + S_IWUSR = 0000200 // _s_ifmt.h:51:1: + S_IXGRP = 0000010 // _s_ifmt.h:57:1: + S_IXOTH = 0000001 // _s_ifmt.h:62:1: + S_IXUSR = 0000100 // _s_ifmt.h:52:1: + UF_APPEND = 0x00000004 // stat.h:313:1: + UF_COMPRESSED = 0x00000020 // stat.h:320:1: + UF_DATAVAULT = 0x00000080 // stat.h:326:1: + UF_HIDDEN = 0x00008000 // stat.h:330:1: + UF_IMMUTABLE = 0x00000002 // stat.h:312:1: + UF_NODUMP = 0x00000001 // stat.h:311:1: + UF_OPAQUE = 0x00000008 // stat.h:314:1: + UF_SETTABLE = 0x0000ffff // stat.h:310:1: + UF_TRACKED = 0x00000040 // stat.h:324:1: + UTIME_NOW = -1 // stat.h:393:1: + UTIME_OMIT = -2 // stat.h:394:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILESEC_T = 0 // _filesec_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_FTS_H_ = 0 // fts.h:59:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_STAT_H_ = 0 // stat.h:71:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/fts/fts_freebsd_386.go b/vendor/modernc.org/libc/fts/fts_freebsd_386.go index fadabef9..296b37d6 100644 --- a/vendor/modernc.org/libc/fts/fts_freebsd_386.go +++ b/vendor/modernc.org/libc/fts/fts_freebsd_386.go @@ -171,7 +171,7 @@ const ( X_IN_PORT_T_DECLARED = 0 // types.h:136:1: X_KEY_T_DECLARED = 0 // types.h:151:1: X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: X_LSEEK_DECLARED = 0 // types.h:421:1: X_LWPID_T_DECLARED = 0 // types.h:156:1: X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: @@ -226,7 +226,7 @@ const ( X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: I386 = 1 // <predefined>:335:1: Unix = 1 // <predefined>:336:1: ) @@ -783,8 +783,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -2124,7 +2124,6 @@ type Tm = struct { // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -2152,7 +2151,7 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ type Stat = struct { Fst_dev Dev_t diff --git a/vendor/modernc.org/libc/fts/fts_freebsd_amd64.go b/vendor/modernc.org/libc/fts/fts_freebsd_amd64.go index de78d8e9..cff7dd85 100644 --- a/vendor/modernc.org/libc/fts/fts_freebsd_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_freebsd_amd64.go @@ -17,34 +17,37 @@ var _ unsafe.Pointer const ( ACCESSPERMS = 511 // stat.h:298:1: ALLPERMS = 4095 // stat.h:300:1: - BIG_ENDIAN = 4321 // endian.h:63:1: - BYTE_ORDER = 1234 // endian.h:65:1: - CLK_TCK = 128 // time.h:55:1: - CLOCKS_PER_SEC = 128 // time.h:59:1: - CLOCK_MONOTONIC = 4 // time.h:472:1: - CLOCK_MONOTONIC_FAST = 12 // time.h:479:1: - CLOCK_MONOTONIC_PRECISE = 11 // time.h:478:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // time.h:482:1: - CLOCK_PROF = 2 // time.h:469:1: - CLOCK_REALTIME = 0 // time.h:465:1: - CLOCK_REALTIME_FAST = 10 // time.h:477:1: - CLOCK_REALTIME_PRECISE = 9 // time.h:476:1: - CLOCK_SECOND = 13 // time.h:480:1: - CLOCK_THREAD_CPUTIME_ID = 14 // time.h:481:1: - CLOCK_UPTIME = 5 // time.h:473:1: - CLOCK_UPTIME_FAST = 8 // time.h:475:1: - CLOCK_UPTIME_PRECISE = 7 // time.h:474:1: - CLOCK_VIRTUAL = 1 // time.h:468:1: - CPUCLOCK_WHICH_PID = 0 // time.h:491:1: - CPUCLOCK_WHICH_TID = 1 // time.h:492:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUCLOCK_WHICH_PID = 0 // time.h:476:1: + CPUCLOCK_WHICH_TID = 1 // time.h:477:1: DEFFILEMODE = 438 // stat.h:302:1: - DST_AUST = 2 // time.h:48:1: - DST_CAN = 6 // time.h:52:1: - DST_EET = 5 // time.h:51:1: - DST_MET = 4 // time.h:50:1: - DST_NONE = 0 // time.h:46:1: - DST_USA = 1 // time.h:47:1: - DST_WET = 3 // time.h:49:1: + DST_AUST = 2 // time.h:49:1: + DST_CAN = 6 // time.h:53:1: + DST_EET = 5 // time.h:52:1: + DST_MET = 4 // time.h:51:1: + DST_NONE = 0 // time.h:47:1: + DST_USA = 1 // time.h:48:1: + DST_WET = 3 // time.h:50:1: FD_SETSIZE = 1024 // select.h:61:1: FTS_AGAIN = 1 // fts.h:111:1: FTS_COMFOLLOW = 0x001 // fts.h:52:1: @@ -80,12 +83,12 @@ const ( FTS_W = 14 // fts.h:103:1: FTS_WHITEOUT = 0x080 // fts.h:59:1: FTS_XDEV = 0x040 // fts.h:58:1: - ITIMER_PROF = 2 // time.h:445:1: - ITIMER_REAL = 0 // time.h:443:1: - ITIMER_VIRTUAL = 1 // time.h:444:1: - LITTLE_ENDIAN = 1234 // endian.h:62:1: - PDP_ENDIAN = 3412 // endian.h:64:1: - SBT_MAX = 0x7fffffffffffffff // time.h:134:1: + ITIMER_PROF = 2 // time.h:457:1: + ITIMER_REAL = 0 // time.h:455:1: + ITIMER_VIRTUAL = 1 // time.h:456:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SBT_MAX = 0x7fffffffffffffff // time.h:135:1: SF_APPEND = 0x00040000 // stat.h:341:1: SF_ARCHIVED = 0x00010000 // stat.h:339:1: SF_IMMUTABLE = 0x00020000 // stat.h:340:1: @@ -121,9 +124,9 @@ const ( S_IXGRP = 0000010 // stat.h:262:1: S_IXOTH = 0000001 // stat.h:267:1: S_IXUSR = 0000100 // stat.h:251:1: - TIMER_ABSTIME = 0x1 // time.h:487:1: - TIMER_RELTIME = 0x0 // time.h:123:1: - TIME_UTC = 1 // time.h:216:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: UF_APPEND = 0x00000004 // stat.h:314:1: UF_ARCHIVE = 0x00000800 // stat.h:330:1: UF_HIDDEN = 0x00008000 // stat.h:333:1: @@ -140,10 +143,10 @@ const ( UTIME_NOW = -1 // stat.h:358:1: UTIME_OMIT = -2 // stat.h:359:1: X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // endian.h:52:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: X_BLKCNT_T_DECLARED = 0 // types.h:90:1: X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // endian.h:55:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: X_CLOCKID_T_DECLARED = 0 // types.h:100:1: @@ -166,8 +169,8 @@ const ( X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: X_IN_PORT_T_DECLARED = 0 // types.h:136:1: X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // endian.h:51:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: X_LP64 = 1 // <predefined>:1:1: X_LSEEK_DECLARED = 0 // types.h:421:1: X_LWPID_T_DECLARED = 0 // types.h:156:1: @@ -179,16 +182,16 @@ const ( X_MODE_T_DECLARED = 0 // types.h:161:1: X_MQD_T_DECLARED = 0 // types.h:227:1: X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF64_T_DECLARED = 0 // types.h:181:1: X_OFF_T_DECLARED = 0 // types.h:176:1: - X_PDP_ENDIAN = 3412 // endian.h:53:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: X_PID_T_DECLARED = 0 // types.h:186:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // endian.h:44:1: - X_QUAD_LOWWORD = 0 // endian.h:45:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: X_RLIM_T_DECLARED = 0 // types.h:193:1: X_SELECT_DECLARED = 0 // select.h:103:1: X_SIGSET_T_DECLARED = 0 // select.h:50:1: @@ -200,9 +203,11 @@ const ( X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_SELECT_H_ = 0 // select.h:35:1: X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: X_SYS_TIME_H_ = 0 // time.h:36:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: @@ -221,8 +226,8 @@ const ( X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - Unix = 1 // <predefined>:337:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -497,12 +502,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // Machine type dependent parameters. // - // This file is in the public domain. @@ -542,42 +550,6 @@ type X__float128 = float64 /* <builtin>:47:21 */ // $FreeBSD$ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. Neither the name of the University nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -// SUCH DAMAGE. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> @@ -819,8 +791,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -1843,15 +1815,69 @@ type Fd_set = Fd_set1 /* select.h:75:3 */ // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp // $FreeBSD$ +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 -} /* time.h:42:1 */ +} /* time.h:43:1 */ type Bintime = struct { Fsec Time_t Ffrac Uint64_t -} /* time.h:55:1 */ +} /* time.h:56:1 */ // Operations on timespecs @@ -1867,7 +1893,7 @@ type Itimerval = struct { Ftv_sec Time_t Ftv_usec Suseconds_t } -} /* time.h:447:1 */ +} /* time.h:459:1 */ // Getkerninfo clock information structure type Clockinfo = struct { @@ -1876,9 +1902,7 @@ type Clockinfo = struct { Fspare int32 Fstathz int32 Fprofhz int32 -} /* time.h:455:1 */ - -// These macros are also in time.h. +} /* time.h:467:1 */ // - // SPDX-License-Identifier: BSD-3-Clause @@ -2013,6 +2037,43 @@ type Clockinfo = struct { // // $FreeBSD$ +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + // Frequency of the clock ticks reported by times(). Deprecated - use // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) @@ -2054,8 +2115,6 @@ type Clockinfo = struct { // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp // $FreeBSD$ -// These macros are also in sys/time.h. - type Tm = struct { Ftm_sec int32 Ftm_min int32 @@ -2069,13 +2128,12 @@ type Tm = struct { F__ccgo_pad1 [4]byte Ftm_gmtoff int64 Ftm_zone uintptr -} /* time.h:129:1 */ +} /* time.h:101:1 */ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -2103,7 +2161,7 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ type Stat = struct { Fst_dev Dev_t diff --git a/vendor/modernc.org/libc/fts/fts_freebsd_arm.go b/vendor/modernc.org/libc/fts/fts_freebsd_arm.go new file mode 100644 index 00000000..cca6f126 --- /dev/null +++ b/vendor/modernc.org/libc/fts/fts_freebsd_arm.go @@ -0,0 +1,2314 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_freebsd_arm.go -pkgname fts', DO NOT EDIT. + +package fts + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:298:1: + ALLPERMS = 4095 // stat.h:300:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUCLOCK_WHICH_PID = 0 // time.h:476:1: + CPUCLOCK_WHICH_TID = 1 // time.h:477:1: + DEFFILEMODE = 438 // stat.h:302:1: + DST_AUST = 2 // time.h:49:1: + DST_CAN = 6 // time.h:53:1: + DST_EET = 5 // time.h:52:1: + DST_MET = 4 // time.h:51:1: + DST_NONE = 0 // time.h:47:1: + DST_USA = 1 // time.h:48:1: + DST_WET = 3 // time.h:50:1: + FD_SETSIZE = 1024 // select.h:61:1: + FTS_AGAIN = 1 // fts.h:111:1: + FTS_COMFOLLOW = 0x001 // fts.h:52:1: + FTS_D = 1 // fts.h:90:1: + FTS_DC = 2 // fts.h:91:1: + FTS_DEFAULT = 3 // fts.h:92:1: + FTS_DNR = 4 // fts.h:93:1: + FTS_DONTCHDIR = 0x01 // fts.h:106:1: + FTS_DOT = 5 // fts.h:94:1: + FTS_DP = 6 // fts.h:95:1: + FTS_ERR = 7 // fts.h:96:1: + FTS_F = 8 // fts.h:97:1: + FTS_FOLLOW = 2 // fts.h:112:1: + FTS_INIT = 9 // fts.h:98:1: + FTS_ISW = 0x04 // fts.h:108:1: + FTS_LOGICAL = 0x002 // fts.h:53:1: + FTS_NAMEONLY = 0x100 // fts.h:62:1: + FTS_NOCHDIR = 0x004 // fts.h:54:1: + FTS_NOINSTR = 3 // fts.h:113:1: + FTS_NOSTAT = 0x008 // fts.h:55:1: + FTS_NS = 10 // fts.h:99:1: + FTS_NSOK = 11 // fts.h:100:1: + FTS_OPTIONMASK = 0x0ff // fts.h:60:1: + FTS_PHYSICAL = 0x010 // fts.h:56:1: + FTS_ROOTLEVEL = 0 // fts.h:87:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:86:1: + FTS_SEEDOT = 0x020 // fts.h:57:1: + FTS_SKIP = 4 // fts.h:114:1: + FTS_SL = 12 // fts.h:101:1: + FTS_SLNONE = 13 // fts.h:102:1: + FTS_STOP = 0x200 // fts.h:63:1: + FTS_SYMFOLLOW = 0x02 // fts.h:107:1: + FTS_W = 14 // fts.h:103:1: + FTS_WHITEOUT = 0x080 // fts.h:59:1: + FTS_XDEV = 0x040 // fts.h:58:1: + ITIMER_PROF = 2 // time.h:457:1: + ITIMER_REAL = 0 // time.h:455:1: + ITIMER_VIRTUAL = 1 // time.h:456:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SBT_MAX = 0x7fffffffffffffff // time.h:135:1: + SF_APPEND = 0x00040000 // stat.h:341:1: + SF_ARCHIVED = 0x00010000 // stat.h:339:1: + SF_IMMUTABLE = 0x00020000 // stat.h:340:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_SETTABLE = 0xffff0000 // stat.h:338:1: + SF_SNAPSHOT = 0x00200000 // stat.h:343:1: + S_BLKSIZE = 512 // stat.h:304:1: + S_IEXEC = 64 // stat.h:256:1: + S_IFBLK = 0060000 // stat.h:274:1: + S_IFCHR = 0020000 // stat.h:272:1: + S_IFDIR = 0040000 // stat.h:273:1: + S_IFIFO = 0010000 // stat.h:271:1: + S_IFLNK = 0120000 // stat.h:276:1: + S_IFMT = 0170000 // stat.h:270:1: + S_IFREG = 0100000 // stat.h:275:1: + S_IFSOCK = 0140000 // stat.h:277:1: + S_IFWHT = 0160000 // stat.h:281:1: + S_IREAD = 256 // stat.h:254:1: + S_IRGRP = 0000040 // stat.h:260:1: + S_IROTH = 0000004 // stat.h:265:1: + S_IRUSR = 0000400 // stat.h:249:1: + S_IRWXG = 0000070 // stat.h:259:1: + S_IRWXO = 0000007 // stat.h:264:1: + S_IRWXU = 0000700 // stat.h:248:1: + S_ISGID = 0002000 // stat.h:243:1: + S_ISTXT = 0001000 // stat.h:245:1: + S_ISUID = 0004000 // stat.h:242:1: + S_ISVTX = 0001000 // stat.h:278:1: + S_IWGRP = 0000020 // stat.h:261:1: + S_IWOTH = 0000002 // stat.h:266:1: + S_IWRITE = 128 // stat.h:255:1: + S_IWUSR = 0000200 // stat.h:250:1: + S_IXGRP = 0000010 // stat.h:262:1: + S_IXOTH = 0000001 // stat.h:267:1: + S_IXUSR = 0000100 // stat.h:251:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + UF_APPEND = 0x00000004 // stat.h:314:1: + UF_ARCHIVE = 0x00000800 // stat.h:330:1: + UF_HIDDEN = 0x00008000 // stat.h:333:1: + UF_IMMUTABLE = 0x00000002 // stat.h:313:1: + UF_NODUMP = 0x00000001 // stat.h:312:1: + UF_NOUNLINK = 0x00000010 // stat.h:316:1: + UF_OFFLINE = 0x00000200 // stat.h:328:1: + UF_OPAQUE = 0x00000008 // stat.h:315:1: + UF_READONLY = 0x00001000 // stat.h:331:1: + UF_REPARSE = 0x00000400 // stat.h:329:1: + UF_SETTABLE = 0x0000ffff // stat.h:311:1: + UF_SPARSE = 0x00000100 // stat.h:327:1: + UF_SYSTEM = 0x00000080 // stat.h:326:1: + UTIME_NOW = -1 // stat.h:358:1: + UTIME_OMIT = -2 // stat.h:359:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_FTS_H_ = 0 // fts.h:36:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKNOD_DECLARED = 0 // stat.h:393:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// Machine type dependent parameters. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2001 David E. O'Brien +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 8.1 (Berkeley) 6/10/93 +// $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint32 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint32 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint32 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stat.h 8.12 (Berkeley) 6/16/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// XXX We get miscellaneous namespace pollution with this. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:43:1 */ + +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:56:1 */ + +// Operations on timespecs + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } +} /* time.h:459:1 */ + +// Getkerninfo clock information structure +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fspare int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:467:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +type Stat = struct { + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_mode Mode_t + Fst_padding0 X__int16_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_padding1 X__int32_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags Fflags_t + Fst_gen X__uint64_t + Fst_spare [10]X__uint64_t +} /* stat.h:160:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type X_ftsent = struct { + Ffts_cycle uintptr + Ffts_parent uintptr + Ffts_link uintptr + F__ccgo_pad1 [4]byte + Ffts_number int64 + Ffts_pointer uintptr + Ffts_accpath uintptr + Ffts_path uintptr + Ffts_errno int32 + Ffts_symfd int32 + Ffts_pathlen X__size_t + Ffts_namelen X__size_t + F__ccgo_pad2 [4]byte + Ffts_ino X__ino_t + Ffts_dev X__dev_t + Ffts_nlink X__nlink_t + Ffts_level int32 + Ffts_info int32 + Ffts_flags uint32 + Ffts_instr int32 + Ffts_statp uintptr + Ffts_name uintptr + Ffts_fts uintptr + F__ccgo_pad3 [4]byte +} /* fts.h:41:2 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type FTS = struct { + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + F__ccgo_pad1 [4]byte + Ffts_dev X__dev_t + Ffts_path uintptr + Ffts_rfd int32 + Ffts_pathlen X__size_t + Ffts_nitems X__size_t + Ffts_compar uintptr + Ffts_options int32 + Ffts_clientptr uintptr + F__ccgo_pad2 [4]byte +} /* fts.h:66:3 */ + +type FTSENT = X_ftsent /* fts.h:120:3 */ + +var _ uint8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/fts/fts_freebsd_arm64.go b/vendor/modernc.org/libc/fts/fts_freebsd_arm64.go new file mode 100644 index 00000000..cff7dd85 --- /dev/null +++ b/vendor/modernc.org/libc/fts/fts_freebsd_arm64.go @@ -0,0 +1,2367 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_freebsd_amd64.go -pkgname fts', DO NOT EDIT. + +package fts + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:298:1: + ALLPERMS = 4095 // stat.h:300:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUCLOCK_WHICH_PID = 0 // time.h:476:1: + CPUCLOCK_WHICH_TID = 1 // time.h:477:1: + DEFFILEMODE = 438 // stat.h:302:1: + DST_AUST = 2 // time.h:49:1: + DST_CAN = 6 // time.h:53:1: + DST_EET = 5 // time.h:52:1: + DST_MET = 4 // time.h:51:1: + DST_NONE = 0 // time.h:47:1: + DST_USA = 1 // time.h:48:1: + DST_WET = 3 // time.h:50:1: + FD_SETSIZE = 1024 // select.h:61:1: + FTS_AGAIN = 1 // fts.h:111:1: + FTS_COMFOLLOW = 0x001 // fts.h:52:1: + FTS_D = 1 // fts.h:90:1: + FTS_DC = 2 // fts.h:91:1: + FTS_DEFAULT = 3 // fts.h:92:1: + FTS_DNR = 4 // fts.h:93:1: + FTS_DONTCHDIR = 0x01 // fts.h:106:1: + FTS_DOT = 5 // fts.h:94:1: + FTS_DP = 6 // fts.h:95:1: + FTS_ERR = 7 // fts.h:96:1: + FTS_F = 8 // fts.h:97:1: + FTS_FOLLOW = 2 // fts.h:112:1: + FTS_INIT = 9 // fts.h:98:1: + FTS_ISW = 0x04 // fts.h:108:1: + FTS_LOGICAL = 0x002 // fts.h:53:1: + FTS_NAMEONLY = 0x100 // fts.h:62:1: + FTS_NOCHDIR = 0x004 // fts.h:54:1: + FTS_NOINSTR = 3 // fts.h:113:1: + FTS_NOSTAT = 0x008 // fts.h:55:1: + FTS_NS = 10 // fts.h:99:1: + FTS_NSOK = 11 // fts.h:100:1: + FTS_OPTIONMASK = 0x0ff // fts.h:60:1: + FTS_PHYSICAL = 0x010 // fts.h:56:1: + FTS_ROOTLEVEL = 0 // fts.h:87:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:86:1: + FTS_SEEDOT = 0x020 // fts.h:57:1: + FTS_SKIP = 4 // fts.h:114:1: + FTS_SL = 12 // fts.h:101:1: + FTS_SLNONE = 13 // fts.h:102:1: + FTS_STOP = 0x200 // fts.h:63:1: + FTS_SYMFOLLOW = 0x02 // fts.h:107:1: + FTS_W = 14 // fts.h:103:1: + FTS_WHITEOUT = 0x080 // fts.h:59:1: + FTS_XDEV = 0x040 // fts.h:58:1: + ITIMER_PROF = 2 // time.h:457:1: + ITIMER_REAL = 0 // time.h:455:1: + ITIMER_VIRTUAL = 1 // time.h:456:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SBT_MAX = 0x7fffffffffffffff // time.h:135:1: + SF_APPEND = 0x00040000 // stat.h:341:1: + SF_ARCHIVED = 0x00010000 // stat.h:339:1: + SF_IMMUTABLE = 0x00020000 // stat.h:340:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_SETTABLE = 0xffff0000 // stat.h:338:1: + SF_SNAPSHOT = 0x00200000 // stat.h:343:1: + S_BLKSIZE = 512 // stat.h:304:1: + S_IEXEC = 64 // stat.h:256:1: + S_IFBLK = 0060000 // stat.h:274:1: + S_IFCHR = 0020000 // stat.h:272:1: + S_IFDIR = 0040000 // stat.h:273:1: + S_IFIFO = 0010000 // stat.h:271:1: + S_IFLNK = 0120000 // stat.h:276:1: + S_IFMT = 0170000 // stat.h:270:1: + S_IFREG = 0100000 // stat.h:275:1: + S_IFSOCK = 0140000 // stat.h:277:1: + S_IFWHT = 0160000 // stat.h:281:1: + S_IREAD = 256 // stat.h:254:1: + S_IRGRP = 0000040 // stat.h:260:1: + S_IROTH = 0000004 // stat.h:265:1: + S_IRUSR = 0000400 // stat.h:249:1: + S_IRWXG = 0000070 // stat.h:259:1: + S_IRWXO = 0000007 // stat.h:264:1: + S_IRWXU = 0000700 // stat.h:248:1: + S_ISGID = 0002000 // stat.h:243:1: + S_ISTXT = 0001000 // stat.h:245:1: + S_ISUID = 0004000 // stat.h:242:1: + S_ISVTX = 0001000 // stat.h:278:1: + S_IWGRP = 0000020 // stat.h:261:1: + S_IWOTH = 0000002 // stat.h:266:1: + S_IWRITE = 128 // stat.h:255:1: + S_IWUSR = 0000200 // stat.h:250:1: + S_IXGRP = 0000010 // stat.h:262:1: + S_IXOTH = 0000001 // stat.h:267:1: + S_IXUSR = 0000100 // stat.h:251:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + UF_APPEND = 0x00000004 // stat.h:314:1: + UF_ARCHIVE = 0x00000800 // stat.h:330:1: + UF_HIDDEN = 0x00008000 // stat.h:333:1: + UF_IMMUTABLE = 0x00000002 // stat.h:313:1: + UF_NODUMP = 0x00000001 // stat.h:312:1: + UF_NOUNLINK = 0x00000010 // stat.h:316:1: + UF_OFFLINE = 0x00000200 // stat.h:328:1: + UF_OPAQUE = 0x00000008 // stat.h:315:1: + UF_READONLY = 0x00001000 // stat.h:331:1: + UF_REPARSE = 0x00000400 // stat.h:329:1: + UF_SETTABLE = 0x0000ffff // stat.h:311:1: + UF_SPARSE = 0x00000100 // stat.h:327:1: + UF_SYSTEM = 0x00000080 // stat.h:326:1: + UTIME_NOW = -1 // stat.h:358:1: + UTIME_OMIT = -2 // stat.h:359:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_FTS_H_ = 0 // fts.h:36:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKNOD_DECLARED = 0 // stat.h:393:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// Machine type dependent parameters. +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint64 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint64 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint64 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [16]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stat.h 8.12 (Berkeley) 6/16/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// XXX We get miscellaneous namespace pollution with this. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:43:1 */ + +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:56:1 */ + +// Operations on timespecs + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:459:1 */ + +// Getkerninfo clock information structure +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fspare int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:467:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +type Stat = struct { + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_mode Mode_t + Fst_padding0 X__int16_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_padding1 X__int32_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags Fflags_t + Fst_gen X__uint64_t + Fst_spare [10]X__uint64_t +} /* stat.h:160:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type X_ftsent = struct { + Ffts_cycle uintptr + Ffts_parent uintptr + Ffts_link uintptr + Ffts_number int64 + Ffts_pointer uintptr + Ffts_accpath uintptr + Ffts_path uintptr + Ffts_errno int32 + Ffts_symfd int32 + Ffts_pathlen X__size_t + Ffts_namelen X__size_t + Ffts_ino X__ino_t + Ffts_dev X__dev_t + Ffts_nlink X__nlink_t + Ffts_level int64 + Ffts_info int32 + Ffts_flags uint32 + Ffts_instr int32 + F__ccgo_pad1 [4]byte + Ffts_statp uintptr + Ffts_name uintptr + Ffts_fts uintptr +} /* fts.h:41:2 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type FTS = struct { + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + Ffts_dev X__dev_t + Ffts_path uintptr + Ffts_rfd int32 + F__ccgo_pad1 [4]byte + Ffts_pathlen X__size_t + Ffts_nitems X__size_t + Ffts_compar uintptr + Ffts_options int32 + F__ccgo_pad2 [4]byte + Ffts_clientptr uintptr +} /* fts.h:66:3 */ + +type FTSENT = X_ftsent /* fts.h:120:3 */ + +var _ int8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/fts/fts_linux_386.go b/vendor/modernc.org/libc/fts/fts_linux_386.go index bccb4532..dc755686 100644 --- a/vendor/modernc.org/libc/fts/fts_linux_386.go +++ b/vendor/modernc.org/libc/fts/fts_linux_386.go @@ -818,7 +818,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -829,13 +830,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1141,7 +1144,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1188,7 +1192,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1502,18 +1507,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1537,7 +1545,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1549,7 +1558,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 diff --git a/vendor/modernc.org/libc/fts/fts_linux_amd64.go b/vendor/modernc.org/libc/fts/fts_linux_amd64.go index 57539a8d..e12eb02c 100644 --- a/vendor/modernc.org/libc/fts/fts_linux_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_linux_amd64.go @@ -834,7 +834,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -845,8 +846,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1158,7 +1160,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1205,7 +1208,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1517,18 +1521,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1552,7 +1559,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1564,7 +1572,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 diff --git a/vendor/modernc.org/libc/fts/fts_linux_arm.go b/vendor/modernc.org/libc/fts/fts_linux_arm.go index 8c7d18e6..30322132 100644 --- a/vendor/modernc.org/libc/fts/fts_linux_arm.go +++ b/vendor/modernc.org/libc/fts/fts_linux_arm.go @@ -876,7 +876,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -887,13 +888,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1200,7 +1203,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1247,7 +1251,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1612,18 +1617,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1647,7 +1655,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1659,7 +1668,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 diff --git a/vendor/modernc.org/libc/fts/fts_linux_arm64.go b/vendor/modernc.org/libc/fts/fts_linux_arm64.go index 5935c72b..ec64e652 100644 --- a/vendor/modernc.org/libc/fts/fts_linux_arm64.go +++ b/vendor/modernc.org/libc/fts/fts_linux_arm64.go @@ -902,7 +902,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -913,8 +914,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1225,7 +1227,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1272,7 +1275,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1617,18 +1621,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -1655,7 +1662,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1667,7 +1675,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/fts/fts_linux_ppc64le.go b/vendor/modernc.org/libc/fts/fts_linux_ppc64le.go index d1070b84..1076a059 100644 --- a/vendor/modernc.org/libc/fts/fts_linux_ppc64le.go +++ b/vendor/modernc.org/libc/fts/fts_linux_ppc64le.go @@ -847,7 +847,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -858,8 +859,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1170,7 +1172,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1217,7 +1220,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1529,18 +1533,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1564,7 +1571,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1576,7 +1584,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/fts/fts_linux_riscv64.go b/vendor/modernc.org/libc/fts/fts_linux_riscv64.go index 0332df86..149b9919 100644 --- a/vendor/modernc.org/libc/fts/fts_linux_riscv64.go +++ b/vendor/modernc.org/libc/fts/fts_linux_riscv64.go @@ -1002,7 +1002,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1013,8 +1014,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1325,7 +1327,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1372,7 +1375,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1690,9 +1694,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -1726,18 +1731,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1761,7 +1769,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1773,7 +1782,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/fts/fts_linux_s390x.go b/vendor/modernc.org/libc/fts/fts_linux_s390x.go index 7b76f765..b9620fb0 100644 --- a/vendor/modernc.org/libc/fts/fts_linux_s390x.go +++ b/vendor/modernc.org/libc/fts/fts_linux_s390x.go @@ -833,7 +833,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -844,8 +845,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1156,7 +1158,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1203,7 +1206,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1514,18 +1518,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1549,7 +1556,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1561,7 +1569,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go b/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go index c157a059..f465acfc 100644 --- a/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_netbsd_amd64.go @@ -1889,6 +1889,7 @@ type Timezone = struct { // 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 type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/fts/fts_netbsd_arm.go b/vendor/modernc.org/libc/fts/fts_netbsd_arm.go new file mode 100644 index 00000000..dba3077d --- /dev/null +++ b/vendor/modernc.org/libc/fts/fts_netbsd_arm.go @@ -0,0 +1,2605 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_netbsd_arm.go -pkgname fts', DO NOT EDIT. + +package fts + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:189:1: + ALLPERMS = 4095 // stat.h:191:1: + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + CLOCKS_PER_SEC = 100 // time.h:73:1: + CLOCK_MONOTONIC = 3 // time.h:297:1: + CLOCK_PROCESS_CPUTIME_ID = 0x40000000 // time.h:299:1: + CLOCK_PROF = 2 // time.h:296:1: + CLOCK_REALTIME = 0 // time.h:294:1: + CLOCK_THREAD_CPUTIME_ID = 0x20000000 // time.h:298:1: + CLOCK_VIRTUAL = 1 // time.h:295:1: + DEFFILEMODE = 438 // stat.h:193:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + FTS_AGAIN = 1 // fts.h:128:1: + FTS_COMFOLLOW = 0x001 // fts.h:71:1: + FTS_D = 1 // fts.h:107:1: + FTS_DC = 2 // fts.h:108:1: + FTS_DEFAULT = 3 // fts.h:109:1: + FTS_DNR = 4 // fts.h:110:1: + FTS_DONTCHDIR = 0x01 // fts.h:123:1: + FTS_DOT = 5 // fts.h:111:1: + FTS_DP = 6 // fts.h:112:1: + FTS_ERR = 7 // fts.h:113:1: + FTS_F = 8 // fts.h:114:1: + FTS_FOLLOW = 2 // fts.h:129:1: + FTS_INIT = 9 // fts.h:115:1: + FTS_ISW = 0x04 // fts.h:125:1: + FTS_LOGICAL = 0x002 // fts.h:72:1: + FTS_NAMEONLY = 0x100 // fts.h:81:1: + FTS_NOCHDIR = 0x004 // fts.h:73:1: + FTS_NOINSTR = 3 // fts.h:130:1: + FTS_NOSTAT = 0x008 // fts.h:74:1: + FTS_NS = 10 // fts.h:116:1: + FTS_NSOK = 11 // fts.h:117:1: + FTS_OPTIONMASK = 0x0ff // fts.h:79:1: + FTS_PHYSICAL = 0x010 // fts.h:75:1: + FTS_ROOTLEVEL = 0 // fts.h:104:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:103:1: + FTS_SEEDOT = 0x020 // fts.h:76:1: + FTS_SKIP = 4 // fts.h:131:1: + FTS_SL = 12 // fts.h:118:1: + FTS_SLNONE = 13 // fts.h:119:1: + FTS_STOP = 0x200 // fts.h:82:1: + FTS_SYMFOLLOW = 0x02 // fts.h:124:1: + FTS_W = 14 // fts.h:120:1: + FTS_WHITEOUT = 0x080 // fts.h:78:1: + FTS_XDEV = 0x040 // fts.h:77:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + ITIMER_MONOTONIC = 3 // time.h:278:1: + ITIMER_PROF = 2 // time.h:277:1: + ITIMER_REAL = 0 // time.h:275:1: + ITIMER_VIRTUAL = 1 // time.h:276:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SF_APPEND = 0x00040000 // stat.h:214:1: + SF_ARCHIVED = 0x00010000 // stat.h:212:1: + SF_IMMUTABLE = 0x00020000 // stat.h:213:1: + SF_LOG = 0x00400000 // stat.h:217:1: + SF_SETTABLE = 0xffff0000 // stat.h:211:1: + SF_SNAPINVAL = 0x00800000 // stat.h:218:1: + SF_SNAPSHOT = 0x00200000 // stat.h:216:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + S_ARCH1 = 65536 // stat.h:167:1: + S_ARCH2 = 131072 // stat.h:168:1: + S_BLKSIZE = 512 // stat.h:195:1: + S_IEXEC = 64 // stat.h:125:1: + S_IFBLK = 24576 // stat.h:156:1: + S_IFCHR = 8192 // stat.h:154:1: + S_IFDIR = 16384 // stat.h:155:1: + S_IFIFO = 4096 // stat.h:153:1: + S_IFLNK = 40960 // stat.h:158:1: + S_IFMT = 61440 // stat.h:152:1: + S_IFREG = 32768 // stat.h:157:1: + S_IFSOCK = 49152 // stat.h:162:1: + S_IFWHT = 57344 // stat.h:165:1: + S_IREAD = 256 // stat.h:123:1: + S_IRGRP = 0000040 // stat.h:129:1: + S_IROTH = 0000004 // stat.h:134:1: + S_IRUSR = 0000400 // stat.h:118:1: + S_IRWXG = 0000070 // stat.h:128:1: + S_IRWXO = 0000007 // stat.h:133:1: + S_IRWXU = 0000700 // stat.h:117:1: + S_ISGID = 0002000 // stat.h:112:1: + S_ISTXT = 0001000 // stat.h:114:1: + S_ISUID = 0004000 // stat.h:111:1: + S_ISVTX = 512 // stat.h:159:1: + S_IWGRP = 0000020 // stat.h:130:1: + S_IWOTH = 0000002 // stat.h:135:1: + S_IWRITE = 128 // stat.h:124:1: + S_IWUSR = 0000200 // stat.h:119:1: + S_IXGRP = 0000010 // stat.h:131:1: + S_IXOTH = 0000001 // stat.h:136:1: + S_IXUSR = 0000100 // stat.h:120:1: + TIMER_ABSTIME = 0x1 // time.h:304:1: + TIMER_RELTIME = 0x0 // time.h:302:1: + TIME_UTC = 1 // time.h:238:1: + UF_APPEND = 0x00000004 // stat.h:205:1: + UF_IMMUTABLE = 0x00000002 // stat.h:204:1: + UF_NODUMP = 0x00000001 // stat.h:203:1: + UF_OPAQUE = 0x00000008 // stat.h:206:1: + UF_SETTABLE = 0x0000ffff // stat.h:202:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + UTIME_NOW = 1073741823 // stat.h:235:1: + UTIME_OMIT = 1073741822 // stat.h:236:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FTS_H_ = 0 // fts.h:35:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_IDTYPE_H_ = 0 // idtype.h:32:1: + X_SYS_NULL_H_ = 0 // null.h:9:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: + X_SYS_STAT_H_ = 0 // stat.h:40:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:38:1: + X_SYS_TIME_H_ = 0 // time.h:35:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_S_ARCH1 = 0200000 // stat.h:148:1: + X_S_ARCH2 = 0400000 // stat.h:149:1: + X_S_IFBLK = 0060000 // stat.h:142:1: + X_S_IFCHR = 0020000 // stat.h:140:1: + X_S_IFDIR = 0040000 // stat.h:141:1: + X_S_IFIFO = 0010000 // stat.h:139:1: + X_S_IFLNK = 0120000 // stat.h:144:1: + X_S_IFMT = 0170000 // stat.h:138:1: + X_S_IFREG = 0100000 // stat.h:143:1: + X_S_IFSOCK = 0140000 // stat.h:146:1: + X_S_IFWHT = 0160000 // stat.h:147:1: + X_S_ISVTX = 0001000 // stat.h:145:1: + X_TIME_H_ = 0 // time.h:40:1: +) + +// $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. + +// 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. +const ( /* idtype.h:41:1: */ + P_MYID = -1 // Me/my process group + P_ALL = 0 // All processes. + P_PID = 1 // A process identifier. + P_LWPID = 2 // An LWP identifier. + P_PPID = 3 // A parent process identifier. + P_PGID = 4 // A process group identifier. + P_SID = 5 // A session identifier. + P_CID = 6 // A scheduling class identifier. + P_UID = 7 // A user identifier. + P_GID = 8 // A group identifier. + P_TASKID = 9 // A task identifier. + P_PROJID = 10 // A project identifier. + P_POOLID = 11 // A pool identifier. + P_ZONEID = 12 // A zone identifier. + P_CTID = 13 // A (process) contract identifier. + P_CPUID = 14 // CPU identifier. + P_PSETID = 15 // Processor set identifier. + X_P_MAXIDTYPE = 2147483647 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// 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 <time.h>". +// +// 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 +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// Structure returned by gettimeofday(2) system call, +// and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* time.h:44:1 */ + +// $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 + +// $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. + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* timespec.h:47:1 */ + +// Note: timezone is obsolete. All timezone handling is now in +// userland. Its just here for back compatibility. +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:65:1 */ + +// Operations on timevals. + +// 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 +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:102:1 */ + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. +// NB: Must match the CLOCK_ constants below. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } +} /* time.h:280:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* time.h:289:1 */ + +// $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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ + +// $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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. +// Public domain. + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:75:1 */ + +// $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. + +// 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. +type Idtype_t = int32 /* idtype.h:60:3 */ + +type Locale_t = uintptr /* time.h:188:25 */ + +type Timezone_t = uintptr /* time.h:198:24 */ + +type Stat = struct { + Fst_dev Dev_t + Fst_mode X__mode_t + F__ccgo_pad1 [4]byte + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid X__uid_t + Fst_gid X__gid_t + F__ccgo_pad2 [4]byte + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_size X__off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags Uint32_t + Fst_gen Uint32_t + Fst_spare [2]Uint32_t + F__ccgo_pad3 [4]byte +} /* stat.h:59:1 */ + +// $NetBSD: fts.h,v 1.19 2009/08/16 19:33:38 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +type X_ftsent = struct { + Ffts_cycle uintptr + Ffts_parent uintptr + Ffts_link uintptr + F__ccgo_pad1 [4]byte + Ffts_number Int64_t + Ffts_pointer uintptr + Ffts_accpath uintptr + Ffts_path uintptr + Ffts_errno int32 + Ffts_symfd int32 + Ffts_pathlen uint32 + Ffts_namelen uint32 + F__ccgo_pad2 [4]byte + Ffts_ino Ino_t + Ffts_dev Dev_t + Ffts_nlink Nlink_t + Ffts_level int32 + Ffts_info uint16 + Ffts_flags uint16 + Ffts_instr uint16 + F__ccgo_pad3 [2]byte + Ffts_statp uintptr + Ffts_name [1]uint8 + F__ccgo_pad4 [3]byte +} /* fts.h:60:2 */ + +// $NetBSD: fts.h,v 1.19 2009/08/16 19:33:38 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +type FTS = struct { + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + F__ccgo_pad1 [4]byte + Ffts_dev Dev_t + Ffts_path uintptr + Ffts_rfd int32 + Ffts_pathlen uint32 + Ffts_nitems uint32 + Ffts_compar uintptr + Ffts_options int32 +} /* fts.h:84:3 */ + +type FTSENT = X_ftsent /* fts.h:136:3 */ + +var _ uint8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/fts/fts_openbsd_386.go b/vendor/modernc.org/libc/fts/fts_openbsd_386.go new file mode 100644 index 00000000..7b60f48e --- /dev/null +++ b/vendor/modernc.org/libc/fts/fts_openbsd_386.go @@ -0,0 +1,1254 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_openbsd_386.go -pkgname fts', DO NOT EDIT. + +package fts + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:151:1: + ALLPERMS = 4095 // stat.h:153:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DEFFILEMODE = 438 // stat.h:155:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + FD_SETSIZE = 1024 // select.h:62:1: + FTS_AGAIN = 1 // fts.h:104:1: + FTS_COMFOLLOW = 0x0001 // fts.h:49:1: + FTS_D = 1 // fts.h:85:1: + FTS_DC = 2 // fts.h:86:1: + FTS_DEFAULT = 3 // fts.h:87:1: + FTS_DNR = 4 // fts.h:88:1: + FTS_DONTCHDIR = 0x01 // fts.h:100:1: + FTS_DOT = 5 // fts.h:89:1: + FTS_DP = 6 // fts.h:90:1: + FTS_ERR = 7 // fts.h:91:1: + FTS_F = 8 // fts.h:92:1: + FTS_FOLLOW = 2 // fts.h:105:1: + FTS_INIT = 9 // fts.h:93:1: + FTS_LOGICAL = 0x0002 // fts.h:50:1: + FTS_MAXLEVEL = 0x7fffffff // fts.h:82:1: + FTS_NAMEONLY = 0x1000 // fts.h:58:1: + FTS_NOCHDIR = 0x0004 // fts.h:51:1: + FTS_NOINSTR = 3 // fts.h:106:1: + FTS_NOSTAT = 0x0008 // fts.h:52:1: + FTS_NS = 10 // fts.h:94:1: + FTS_NSOK = 11 // fts.h:95:1: + FTS_OPTIONMASK = 0x00ff // fts.h:56:1: + FTS_PHYSICAL = 0x0010 // fts.h:53:1: + FTS_ROOTLEVEL = 0 // fts.h:81:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:80:1: + FTS_SEEDOT = 0x0020 // fts.h:54:1: + FTS_SKIP = 4 // fts.h:107:1: + FTS_SL = 12 // fts.h:96:1: + FTS_SLNONE = 13 // fts.h:97:1: + FTS_STOP = 0x2000 // fts.h:59:1: + FTS_SYMFOLLOW = 0x02 // fts.h:101:1: + FTS_XDEV = 0x0040 // fts.h:55:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NBBY = 8 // select.h:111:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SF_APPEND = 0x00040000 // stat.h:175:1: + SF_ARCHIVED = 0x00010000 // stat.h:173:1: + SF_IMMUTABLE = 0x00020000 // stat.h:174:1: + SF_SETTABLE = 0xffff0000 // stat.h:172:1: + S_BLKSIZE = 512 // stat.h:157:1: + S_IEXEC = 64 // stat.h:108:1: + S_IFBLK = 0060000 // stat.h:126:1: + S_IFCHR = 0020000 // stat.h:124:1: + S_IFDIR = 0040000 // stat.h:125:1: + S_IFIFO = 0010000 // stat.h:123:1: + S_IFLNK = 0120000 // stat.h:128:1: + S_IFMT = 0170000 // stat.h:122:1: + S_IFREG = 0100000 // stat.h:127:1: + S_IFSOCK = 0140000 // stat.h:129:1: + S_IREAD = 256 // stat.h:106:1: + S_IRGRP = 0000040 // stat.h:112:1: + S_IROTH = 0000004 // stat.h:117:1: + S_IRUSR = 0000400 // stat.h:101:1: + S_IRWXG = 0000070 // stat.h:111:1: + S_IRWXO = 0000007 // stat.h:116:1: + S_IRWXU = 0000700 // stat.h:100:1: + S_ISGID = 0002000 // stat.h:95:1: + S_ISTXT = 0001000 // stat.h:97:1: + S_ISUID = 0004000 // stat.h:94:1: + S_ISVTX = 0001000 // stat.h:130:1: + S_IWGRP = 0000020 // stat.h:113:1: + S_IWOTH = 0000002 // stat.h:118:1: + S_IWRITE = 128 // stat.h:107:1: + S_IWUSR = 0000200 // stat.h:102:1: + S_IXGRP = 0000010 // stat.h:114:1: + S_IXOTH = 0000001 // stat.h:119:1: + S_IXUSR = 0000100 // stat.h:103:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + UF_APPEND = 0x00000004 // stat.h:167:1: + UF_IMMUTABLE = 0x00000002 // stat.h:166:1: + UF_NODUMP = 0x00000001 // stat.h:165:1: + UF_OPAQUE = 0x00000008 // stat.h:168:1: + UF_SETTABLE = 0x0000ffff // stat.h:164:1: + UTIME_NOW = -2 // stat.h:188:1: + UTIME_OMIT = -1 // stat.h:189:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FTS_H_ = 0 // fts.h:36:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ +// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd 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.9 (Berkeley) 8/17/94 + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:111:1 */ + +type Stat = struct { + Fst_mode Mode_t + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags U_int32_t + Fst_gen U_int32_t + F__st_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* stat.h:45:1 */ + +// $OpenBSD: fts.h,v 1.14 2012/12/05 23:19:57 deraadt Exp $ +// $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +type X_ftsent = struct { + Ffts_cycle uintptr + Ffts_parent uintptr + Ffts_link uintptr + Ffts_number int32 + Ffts_pointer uintptr + Ffts_accpath uintptr + Ffts_path uintptr + Ffts_errno int32 + Ffts_symfd int32 + Ffts_pathlen Size_t + Ffts_namelen Size_t + Ffts_ino Ino_t + Ffts_dev Dev_t + Ffts_nlink Nlink_t + Ffts_level int32 + Ffts_info uint16 + Ffts_flags uint16 + Ffts_instr uint16 + Ffts_spare uint16 + Ffts_statp uintptr + Ffts_name [1]int8 + F__ccgo_pad1 [3]byte +} /* fts.h:39:2 */ + +// $OpenBSD: fts.h,v 1.14 2012/12/05 23:19:57 deraadt Exp $ +// $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +type FTS = struct { + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + Ffts_dev Dev_t + Ffts_path uintptr + Ffts_rfd int32 + Ffts_pathlen Size_t + Ffts_nitems int32 + Ffts_compar uintptr + Ffts_options int32 +} /* fts.h:61:3 */ + +type FTSENT = X_ftsent /* fts.h:114:3 */ + +var _ int8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go b/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go index c4f859c2..8b48edf1 100644 --- a/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go +++ b/vendor/modernc.org/libc/fts/fts_openbsd_amd64.go @@ -118,8 +118,8 @@ const ( UTIME_OMIT = -1 // stat.h:189:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_FTS_H_ = 0 // fts.h:36:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -133,16 +133,16 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -153,16 +153,16 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -183,7 +183,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* <builtin>:46:14 */ type X__float128 = float64 /* <builtin>:47:21 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -480,7 +480,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -640,18 +640,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -733,31 +732,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. -// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ // $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ // - @@ -795,7 +793,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)stat.h 8.9 (Berkeley) 8/17/94 -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -859,7 +857,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -1031,7 +1029,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/fts/fts_openbsd_arm64.go b/vendor/modernc.org/libc/fts/fts_openbsd_arm64.go new file mode 100644 index 00000000..bbdea051 --- /dev/null +++ b/vendor/modernc.org/libc/fts/fts_openbsd_arm64.go @@ -0,0 +1,1268 @@ +// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_openbsd_arm64.go -pkgname fts', DO NOT EDIT. + +package fts + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:151:1: + ALLPERMS = 4095 // stat.h:153:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DEFFILEMODE = 438 // stat.h:155:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + FD_SETSIZE = 1024 // select.h:62:1: + FTS_AGAIN = 1 // fts.h:104:1: + FTS_COMFOLLOW = 0x0001 // fts.h:49:1: + FTS_D = 1 // fts.h:85:1: + FTS_DC = 2 // fts.h:86:1: + FTS_DEFAULT = 3 // fts.h:87:1: + FTS_DNR = 4 // fts.h:88:1: + FTS_DONTCHDIR = 0x01 // fts.h:100:1: + FTS_DOT = 5 // fts.h:89:1: + FTS_DP = 6 // fts.h:90:1: + FTS_ERR = 7 // fts.h:91:1: + FTS_F = 8 // fts.h:92:1: + FTS_FOLLOW = 2 // fts.h:105:1: + FTS_INIT = 9 // fts.h:93:1: + FTS_LOGICAL = 0x0002 // fts.h:50:1: + FTS_MAXLEVEL = 0x7fffffff // fts.h:82:1: + FTS_NAMEONLY = 0x1000 // fts.h:58:1: + FTS_NOCHDIR = 0x0004 // fts.h:51:1: + FTS_NOINSTR = 3 // fts.h:106:1: + FTS_NOSTAT = 0x0008 // fts.h:52:1: + FTS_NS = 10 // fts.h:94:1: + FTS_NSOK = 11 // fts.h:95:1: + FTS_OPTIONMASK = 0x00ff // fts.h:56:1: + FTS_PHYSICAL = 0x0010 // fts.h:53:1: + FTS_ROOTLEVEL = 0 // fts.h:81:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:80:1: + FTS_SEEDOT = 0x0020 // fts.h:54:1: + FTS_SKIP = 4 // fts.h:107:1: + FTS_SL = 12 // fts.h:96:1: + FTS_SLNONE = 13 // fts.h:97:1: + FTS_STOP = 0x2000 // fts.h:59:1: + FTS_SYMFOLLOW = 0x02 // fts.h:101:1: + FTS_XDEV = 0x0040 // fts.h:55:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NBBY = 8 // select.h:111:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SF_APPEND = 0x00040000 // stat.h:175:1: + SF_ARCHIVED = 0x00010000 // stat.h:173:1: + SF_IMMUTABLE = 0x00020000 // stat.h:174:1: + SF_SETTABLE = 0xffff0000 // stat.h:172:1: + S_BLKSIZE = 512 // stat.h:157:1: + S_IEXEC = 64 // stat.h:108:1: + S_IFBLK = 0060000 // stat.h:126:1: + S_IFCHR = 0020000 // stat.h:124:1: + S_IFDIR = 0040000 // stat.h:125:1: + S_IFIFO = 0010000 // stat.h:123:1: + S_IFLNK = 0120000 // stat.h:128:1: + S_IFMT = 0170000 // stat.h:122:1: + S_IFREG = 0100000 // stat.h:127:1: + S_IFSOCK = 0140000 // stat.h:129:1: + S_IREAD = 256 // stat.h:106:1: + S_IRGRP = 0000040 // stat.h:112:1: + S_IROTH = 0000004 // stat.h:117:1: + S_IRUSR = 0000400 // stat.h:101:1: + S_IRWXG = 0000070 // stat.h:111:1: + S_IRWXO = 0000007 // stat.h:116:1: + S_IRWXU = 0000700 // stat.h:100:1: + S_ISGID = 0002000 // stat.h:95:1: + S_ISTXT = 0001000 // stat.h:97:1: + S_ISUID = 0004000 // stat.h:94:1: + S_ISVTX = 0001000 // stat.h:130:1: + S_IWGRP = 0000020 // stat.h:113:1: + S_IWOTH = 0000002 // stat.h:118:1: + S_IWRITE = 128 // stat.h:107:1: + S_IWUSR = 0000200 // stat.h:102:1: + S_IXGRP = 0000010 // stat.h:114:1: + S_IXOTH = 0000001 // stat.h:119:1: + S_IXUSR = 0000100 // stat.h:103:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + UF_APPEND = 0x00000004 // stat.h:167:1: + UF_IMMUTABLE = 0x00000002 // stat.h:166:1: + UF_NODUMP = 0x00000001 // stat.h:165:1: + UF_OPAQUE = 0x00000008 // stat.h:168:1: + UF_SETTABLE = 0x0000ffff // stat.h:164:1: + UTIME_NOW = -2 // stat.h:188:1: + UTIME_OMIT = -1 // stat.h:189:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FTS_H_ = 0 // fts.h:36:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ +// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd 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.9 (Berkeley) 8/17/94 + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:111:1 */ + +type Stat = struct { + Fst_mode Mode_t + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags U_int32_t + Fst_gen U_int32_t + F__ccgo_pad1 [4]byte + F__st_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* stat.h:45:1 */ + +// $OpenBSD: fts.h,v 1.14 2012/12/05 23:19:57 deraadt Exp $ +// $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +type X_ftsent = struct { + Ffts_cycle uintptr + Ffts_parent uintptr + Ffts_link uintptr + Ffts_number int64 + Ffts_pointer uintptr + Ffts_accpath uintptr + Ffts_path uintptr + Ffts_errno int32 + Ffts_symfd int32 + Ffts_pathlen Size_t + Ffts_namelen Size_t + Ffts_ino Ino_t + Ffts_dev Dev_t + Ffts_nlink Nlink_t + Ffts_level int32 + Ffts_info uint16 + Ffts_flags uint16 + Ffts_instr uint16 + Ffts_spare uint16 + F__ccgo_pad1 [4]byte + Ffts_statp uintptr + Ffts_name [1]int8 + F__ccgo_pad2 [7]byte +} /* fts.h:39:2 */ + +// $OpenBSD: fts.h,v 1.14 2012/12/05 23:19:57 deraadt Exp $ +// $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +type FTS = struct { + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + Ffts_dev Dev_t + F__ccgo_pad1 [4]byte + Ffts_path uintptr + Ffts_rfd int32 + F__ccgo_pad2 [4]byte + Ffts_pathlen Size_t + Ffts_nitems int32 + F__ccgo_pad3 [4]byte + Ffts_compar uintptr + Ffts_options int32 + F__ccgo_pad4 [4]byte +} /* fts.h:61:3 */ + +type FTSENT = X_ftsent /* fts.h:114:3 */ + +var _ int8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/grp/capi_darwin_amd64.go b/vendor/modernc.org/libc/grp/capi_darwin_amd64.go index 3d10f9a0..f5273821 100644 --- a/vendor/modernc.org/libc/grp/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/grp/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT. +// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT. package grp diff --git a/vendor/modernc.org/libc/grp/capi_freebsd_arm.go b/vendor/modernc.org/libc/grp/capi_freebsd_arm.go new file mode 100644 index 00000000..0119d1d2 --- /dev/null +++ b/vendor/modernc.org/libc/grp/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_freebsd_arm.go -pkgname grp', DO NOT EDIT. + +package grp + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/grp/capi_freebsd_arm64.go b/vendor/modernc.org/libc/grp/capi_freebsd_arm64.go new file mode 100644 index 00000000..b198981d --- /dev/null +++ b/vendor/modernc.org/libc/grp/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_freebsd_amd64.go -pkgname grp', DO NOT EDIT. + +package grp + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/grp/capi_netbsd_arm.go b/vendor/modernc.org/libc/grp/capi_netbsd_arm.go new file mode 100644 index 00000000..b5d855dd --- /dev/null +++ b/vendor/modernc.org/libc/grp/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_netbsd_arm.go -pkgname grp', DO NOT EDIT. + +package grp + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/grp/capi_openbsd_386.go b/vendor/modernc.org/libc/grp/capi_openbsd_386.go new file mode 100644 index 00000000..a047d104 --- /dev/null +++ b/vendor/modernc.org/libc/grp/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_openbsd_386.go -pkgname grp', DO NOT EDIT. + +package grp + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/grp/capi_openbsd_arm64.go b/vendor/modernc.org/libc/grp/capi_openbsd_arm64.go new file mode 100644 index 00000000..bd8e8ef7 --- /dev/null +++ b/vendor/modernc.org/libc/grp/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_openbsd_arm64.go -pkgname grp', DO NOT EDIT. + +package grp + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/grp/grp_darwin_amd64.go b/vendor/modernc.org/libc/grp/grp_darwin_amd64.go index 30f27935..805ed998 100644 --- a/vendor/modernc.org/libc/grp/grp_darwin_amd64.go +++ b/vendor/modernc.org/libc/grp/grp_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT. +// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT. package grp @@ -15,27 +15,27 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_GID_T = 0 - X_GRP_H_ = 0 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PATH_GROUP = "/etc/group" - X_SIZE_T = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UUID_STRING_T = 0 - X_UUID_T = 0 - X_UUID_UUID_H = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_GRP_H_ = 0 // grp.h:43:1: + X_LP64 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PATH_GROUP = "/etc/group" // grp.h:50:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UUID_STRING_T = 0 // uuid.h:42:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_UUID_UUID_H = 0 // uuid.h:36:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/grp/grp_freebsd_386.go b/vendor/modernc.org/libc/grp/grp_freebsd_386.go index 00d040c6..230499d3 100644 --- a/vendor/modernc.org/libc/grp/grp_freebsd_386.go +++ b/vendor/modernc.org/libc/grp/grp_freebsd_386.go @@ -546,8 +546,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/grp/grp_freebsd_amd64.go b/vendor/modernc.org/libc/grp/grp_freebsd_amd64.go index 2145a8a1..49f4ed58 100644 --- a/vendor/modernc.org/libc/grp/grp_freebsd_amd64.go +++ b/vendor/modernc.org/libc/grp/grp_freebsd_amd64.go @@ -21,14 +21,14 @@ const ( X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_PATH_GROUP = "/etc/group" // grp.h:46:1: X_SIZE_T_DECLARED = 0 // grp.h:55:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -303,12 +303,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -551,8 +554,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/grp/grp_freebsd_arm.go b/vendor/modernc.org/libc/grp/grp_freebsd_arm.go new file mode 100644 index 00000000..3ee0715a --- /dev/null +++ b/vendor/modernc.org/libc/grp/grp_freebsd_arm.go @@ -0,0 +1,556 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_freebsd_arm.go -pkgname grp', DO NOT EDIT. + +package grp + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GID_T_DECLARED = 0 // grp.h:50:1: + X_GRP_H_ = 0 // grp.h:41:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PATH_GROUP = "/etc/group" // grp.h:46:1: + X_SIZE_T_DECLARED = 0 // grp.h:55:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)grp.h 8.2 (Berkeley) 1/21/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Gid_t = X__gid_t /* grp.h:49:18 */ + +type Group = struct { + Fgr_name uintptr + Fgr_passwd uintptr + Fgr_gid Gid_t + Fgr_mem uintptr +} /* grp.h:58:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/grp/grp_freebsd_arm64.go b/vendor/modernc.org/libc/grp/grp_freebsd_arm64.go new file mode 100644 index 00000000..49f4ed58 --- /dev/null +++ b/vendor/modernc.org/libc/grp/grp_freebsd_arm64.go @@ -0,0 +1,616 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_freebsd_amd64.go -pkgname grp', DO NOT EDIT. + +package grp + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GID_T_DECLARED = 0 // grp.h:50:1: + X_GRP_H_ = 0 // grp.h:41:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PATH_GROUP = "/etc/group" // grp.h:46:1: + X_SIZE_T_DECLARED = 0 // grp.h:55:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)grp.h 8.2 (Berkeley) 1/21/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Gid_t = X__gid_t /* grp.h:49:18 */ + +type Group = struct { + Fgr_name uintptr + Fgr_passwd uintptr + Fgr_gid Gid_t + F__ccgo_pad1 [4]byte + Fgr_mem uintptr +} /* grp.h:58:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/grp/grp_linux_386.go b/vendor/modernc.org/libc/grp/grp_linux_386.go index 8c140e9e..272f3e75 100644 --- a/vendor/modernc.org/libc/grp/grp_linux_386.go +++ b/vendor/modernc.org/libc/grp/grp_linux_386.go @@ -722,7 +722,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -733,13 +734,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Wide character type. diff --git a/vendor/modernc.org/libc/grp/grp_linux_amd64.go b/vendor/modernc.org/libc/grp/grp_linux_amd64.go index 944ecb16..2a52cae7 100644 --- a/vendor/modernc.org/libc/grp/grp_linux_amd64.go +++ b/vendor/modernc.org/libc/grp/grp_linux_amd64.go @@ -741,7 +741,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -752,8 +753,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. diff --git a/vendor/modernc.org/libc/grp/grp_linux_arm.go b/vendor/modernc.org/libc/grp/grp_linux_arm.go index c475790e..cadbaa80 100644 --- a/vendor/modernc.org/libc/grp/grp_linux_arm.go +++ b/vendor/modernc.org/libc/grp/grp_linux_arm.go @@ -781,7 +781,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -792,13 +793,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Wide character type. diff --git a/vendor/modernc.org/libc/grp/grp_linux_arm64.go b/vendor/modernc.org/libc/grp/grp_linux_arm64.go index 661be98c..2f00cb11 100644 --- a/vendor/modernc.org/libc/grp/grp_linux_arm64.go +++ b/vendor/modernc.org/libc/grp/grp_linux_arm64.go @@ -809,7 +809,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -820,8 +821,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. diff --git a/vendor/modernc.org/libc/grp/grp_linux_ppc64le.go b/vendor/modernc.org/libc/grp/grp_linux_ppc64le.go index 6fe1a382..343a5267 100644 --- a/vendor/modernc.org/libc/grp/grp_linux_ppc64le.go +++ b/vendor/modernc.org/libc/grp/grp_linux_ppc64le.go @@ -751,7 +751,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -762,8 +763,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. diff --git a/vendor/modernc.org/libc/grp/grp_linux_riscv64.go b/vendor/modernc.org/libc/grp/grp_linux_riscv64.go index f5f68e96..3c8b2099 100644 --- a/vendor/modernc.org/libc/grp/grp_linux_riscv64.go +++ b/vendor/modernc.org/libc/grp/grp_linux_riscv64.go @@ -913,7 +913,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -924,8 +925,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Wide character type. diff --git a/vendor/modernc.org/libc/grp/grp_linux_s390x.go b/vendor/modernc.org/libc/grp/grp_linux_s390x.go index 405cea31..b6f130de 100644 --- a/vendor/modernc.org/libc/grp/grp_linux_s390x.go +++ b/vendor/modernc.org/libc/grp/grp_linux_s390x.go @@ -740,7 +740,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -751,8 +752,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. diff --git a/vendor/modernc.org/libc/grp/grp_netbsd_arm.go b/vendor/modernc.org/libc/grp/grp_netbsd_arm.go new file mode 100644 index 00000000..895d287c --- /dev/null +++ b/vendor/modernc.org/libc/grp/grp_netbsd_arm.go @@ -0,0 +1,1568 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_netbsd_arm.go -pkgname grp', DO NOT EDIT. + +package grp + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GRP_H_ = 0 // grp.h:40:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PATH_GROUP = "/etc/group" // grp.h:47:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +type Group = struct { + Fgr_name uintptr + Fgr_passwd uintptr + Fgr_gid X__gid_t + Fgr_mem uintptr +} /* grp.h:50:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/grp/grp_openbsd_386.go b/vendor/modernc.org/libc/grp/grp_openbsd_386.go new file mode 100644 index 00000000..554607dd --- /dev/null +++ b/vendor/modernc.org/libc/grp/grp_openbsd_386.go @@ -0,0 +1,688 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_openbsd_386.go -pkgname grp', DO NOT EDIT. + +package grp + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GRP_H_ = 0 // grp.h:41:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PATH_GROUP = "/etc/group" // grp.h:46:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: grp.h,v 1.13 2018/09/13 12:31:15 millert Exp $ +// $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Group = struct { + Fgr_name uintptr + Fgr_passwd uintptr + Fgr_gid Gid_t + Fgr_mem uintptr +} /* grp.h:50:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go b/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go index 30028ea6..6a52e72d 100644 --- a/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go +++ b/vendor/modernc.org/libc/grp/grp_openbsd_amd64.go @@ -21,8 +21,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_GRP_H_ = 0 // grp.h:41:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -35,28 +35,28 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PATH_GROUP = "/etc/group" // grp.h:46:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -115,7 +115,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // // @(#)grp.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -412,7 +412,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -572,18 +572,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -665,27 +664,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/grp/grp_openbsd_arm64.go b/vendor/modernc.org/libc/grp/grp_openbsd_arm64.go new file mode 100644 index 00000000..89520208 --- /dev/null +++ b/vendor/modernc.org/libc/grp/grp_openbsd_arm64.go @@ -0,0 +1,696 @@ +// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_openbsd_arm64.go -pkgname grp', DO NOT EDIT. + +package grp + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GRP_H_ = 0 // grp.h:41:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PATH_GROUP = "/etc/group" // grp.h:46:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: grp.h,v 1.13 2018/09/13 12:31:15 millert Exp $ +// $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Group = struct { + Fgr_name uintptr + Fgr_passwd uintptr + Fgr_gid Gid_t + F__ccgo_pad1 [4]byte + Fgr_mem uintptr +} /* grp.h:50:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go b/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go index 61f80522..dae75172 100644 --- a/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go +++ b/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go @@ -747,6 +747,11 @@ func init() { continue } + // https://gitlab.com/cznic/libc/-/issues/25 + if strings.Index(fields[1], "/") < 0 { + continue + } + name := fields[0] portproto := strings.SplitN(fields[1], "/", 2) port, err := strconv.ParseInt(portproto[0], 10, 32) diff --git a/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go b/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go index 8189cc44..f9459e90 100644 --- a/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. +// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. package langinfo diff --git a/vendor/modernc.org/libc/langinfo/capi_freebsd_arm.go b/vendor/modernc.org/libc/langinfo/capi_freebsd_arm.go new file mode 100644 index 00000000..489f5f3a --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_freebsd_arm.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/langinfo/capi_freebsd_arm64.go b/vendor/modernc.org/libc/langinfo/capi_freebsd_arm64.go new file mode 100644 index 00000000..d6cbaa47 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_freebsd_amd64.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/langinfo/capi_netbsd_arm.go b/vendor/modernc.org/libc/langinfo/capi_netbsd_arm.go new file mode 100644 index 00000000..7a57bf4f --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_netbsd_arm.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/langinfo/capi_openbsd_386.go b/vendor/modernc.org/libc/langinfo/capi_openbsd_386.go new file mode 100644 index 00000000..a11db272 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_386.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/langinfo/capi_openbsd_arm64.go b/vendor/modernc.org/libc/langinfo/capi_openbsd_arm64.go new file mode 100644 index 00000000..40674a20 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_arm64.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go b/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go index a2f803f7..337246d7 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. +// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT. package langinfo @@ -15,80 +15,80 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ABDAY_1 = 14 - ABDAY_2 = 15 - ABDAY_3 = 16 - ABDAY_4 = 17 - ABDAY_5 = 18 - ABDAY_6 = 19 - ABDAY_7 = 20 - ABMON_1 = 33 - ABMON_10 = 42 - ABMON_11 = 43 - ABMON_12 = 44 - ABMON_2 = 34 - ABMON_3 = 35 - ABMON_4 = 36 - ABMON_5 = 37 - ABMON_6 = 38 - ABMON_7 = 39 - ABMON_8 = 40 - ABMON_9 = 41 - ALT_DIGITS = 49 - AM_STR = 5 - CODESET = 0 - CRNCYSTR = 56 - DAY_1 = 7 - DAY_2 = 8 - DAY_3 = 9 - DAY_4 = 10 - DAY_5 = 11 - DAY_6 = 12 - DAY_7 = 13 - D_FMT = 2 - D_MD_ORDER = 57 - D_T_FMT = 1 - ERA = 45 - ERA_D_FMT = 46 - ERA_D_T_FMT = 47 - ERA_T_FMT = 48 - MON_1 = 21 - MON_10 = 30 - MON_11 = 31 - MON_12 = 32 - MON_2 = 22 - MON_3 = 23 - MON_4 = 24 - MON_5 = 25 - MON_6 = 26 - MON_7 = 27 - MON_8 = 28 - MON_9 = 29 - NOEXPR = 53 - NOSTR = 55 - PM_STR = 6 - RADIXCHAR = 50 - THOUSEP = 51 - T_FMT = 3 - T_FMT_AMPM = 4 - YESEXPR = 52 - YESSTR = 54 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_LANGINFO_H_ = 0 - X_LP64 = 1 - X_NL_ITEM = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 + ABDAY_1 = 14 // langinfo.h:53:1: + ABDAY_2 = 15 // langinfo.h:54:1: + ABDAY_3 = 16 // langinfo.h:55:1: + ABDAY_4 = 17 // langinfo.h:56:1: + ABDAY_5 = 18 // langinfo.h:57:1: + ABDAY_6 = 19 // langinfo.h:58:1: + ABDAY_7 = 20 // langinfo.h:59:1: + ABMON_1 = 33 // langinfo.h:76:1: + ABMON_10 = 42 // langinfo.h:85:1: + ABMON_11 = 43 // langinfo.h:86:1: + ABMON_12 = 44 // langinfo.h:87:1: + ABMON_2 = 34 // langinfo.h:77:1: + ABMON_3 = 35 // langinfo.h:78:1: + ABMON_4 = 36 // langinfo.h:79:1: + ABMON_5 = 37 // langinfo.h:80:1: + ABMON_6 = 38 // langinfo.h:81:1: + ABMON_7 = 39 // langinfo.h:82:1: + ABMON_8 = 40 // langinfo.h:83:1: + ABMON_9 = 41 // langinfo.h:84:1: + ALT_DIGITS = 49 // langinfo.h:93:1: + AM_STR = 5 // langinfo.h:40:1: + CODESET = 0 // langinfo.h:35:1: + CRNCYSTR = 56 // langinfo.h:106:1: + DAY_1 = 7 // langinfo.h:44:1: + DAY_2 = 8 // langinfo.h:45:1: + DAY_3 = 9 // langinfo.h:46:1: + DAY_4 = 10 // langinfo.h:47:1: + DAY_5 = 11 // langinfo.h:48:1: + DAY_6 = 12 // langinfo.h:49:1: + DAY_7 = 13 // langinfo.h:50:1: + D_FMT = 2 // langinfo.h:37:1: + D_MD_ORDER = 57 // langinfo.h:109:1: + D_T_FMT = 1 // langinfo.h:36:1: + ERA = 45 // langinfo.h:89:1: + ERA_D_FMT = 46 // langinfo.h:90:1: + ERA_D_T_FMT = 47 // langinfo.h:91:1: + ERA_T_FMT = 48 // langinfo.h:92:1: + MON_1 = 21 // langinfo.h:62:1: + MON_10 = 30 // langinfo.h:71:1: + MON_11 = 31 // langinfo.h:72:1: + MON_12 = 32 // langinfo.h:73:1: + MON_2 = 22 // langinfo.h:63:1: + MON_3 = 23 // langinfo.h:64:1: + MON_4 = 24 // langinfo.h:65:1: + MON_5 = 25 // langinfo.h:66:1: + MON_6 = 26 // langinfo.h:67:1: + MON_7 = 27 // langinfo.h:68:1: + MON_8 = 28 // langinfo.h:69:1: + MON_9 = 29 // langinfo.h:70:1: + NOEXPR = 53 // langinfo.h:99:1: + NOSTR = 55 // langinfo.h:103:1: + PM_STR = 6 // langinfo.h:41:1: + RADIXCHAR = 50 // langinfo.h:95:1: + THOUSEP = 51 // langinfo.h:96:1: + T_FMT = 3 // langinfo.h:38:1: + T_FMT_AMPM = 4 // langinfo.h:39:1: + YESEXPR = 52 // langinfo.h:98:1: + YESSTR = 54 // langinfo.h:102:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_LANGINFO_H_ = 0 // langinfo.h:30:1: + X_LP64 = 1 // <predefined>:1:1: + X_NL_ITEM = 0 // _nl_item.h:30:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_freebsd_386.go b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_386.go index 19e72307..cf28300d 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_freebsd_386.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_386.go @@ -88,7 +88,7 @@ const ( X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_ILP32 = 1 // <predefined>:1:1: X_LANGINFO_H_ = 0 // langinfo.h:32:1: - X_LOCALE_T_DEFINED = 0 // _langinfo.h:38:1: + X_LOCALE_T_DEFINED = 0 // _langinfo.h:37:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_NL_ITEM_DECLARED = 0 // langinfo.h:39:1: @@ -97,7 +97,7 @@ const ( X_Nullable = 0 // cdefs.h:791:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_XLOCALE_LANGINFO_H = 0 // _langinfo.h:35:1: + X_XLOCALE_LANGINFO_H = 0 // _langinfo.h:34:1: I386 = 1 // <predefined>:335:1: Unix = 1 // <predefined>:336:1: ) @@ -607,8 +607,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -662,7 +662,6 @@ type Nl_item = X__nl_item /* langinfo.h:38:19 */ // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -690,6 +689,6 @@ type Nl_item = X__nl_item /* langinfo.h:38:19 */ // // $FreeBSD$ -type Locale_t = uintptr /* _langinfo.h:39:25 */ +type Locale_t = uintptr /* _langinfo.h:38:25 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_freebsd_amd64.go b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_amd64.go index 428cea6f..5d216514 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_freebsd_amd64.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_amd64.go @@ -87,18 +87,18 @@ const ( YESSTR = 54 // langinfo.h:109:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_LANGINFO_H_ = 0 // langinfo.h:32:1: - X_LOCALE_T_DEFINED = 0 // _langinfo.h:38:1: + X_LOCALE_T_DEFINED = 0 // _langinfo.h:37:1: X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_NL_ITEM_DECLARED = 0 // langinfo.h:39:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_XLOCALE_LANGINFO_H = 0 // _langinfo.h:35:1: - Unix = 1 // <predefined>:337:1: + X_XLOCALE_LANGINFO_H = 0 // _langinfo.h:34:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -364,12 +364,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -612,8 +615,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -667,7 +670,6 @@ type Nl_item = X__nl_item /* langinfo.h:38:19 */ // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -695,6 +697,6 @@ type Nl_item = X__nl_item /* langinfo.h:38:19 */ // // $FreeBSD$ -type Locale_t = uintptr /* _langinfo.h:39:25 */ +type Locale_t = uintptr /* _langinfo.h:38:25 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_freebsd_arm.go b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_arm.go new file mode 100644 index 00000000..3a212e93 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_arm.go @@ -0,0 +1,643 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_freebsd_arm.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ABDAY_1 = 14 // langinfo.h:60:1: + ABDAY_2 = 15 // langinfo.h:61:1: + ABDAY_3 = 16 // langinfo.h:62:1: + ABDAY_4 = 17 // langinfo.h:63:1: + ABDAY_5 = 18 // langinfo.h:64:1: + ABDAY_6 = 19 // langinfo.h:65:1: + ABDAY_7 = 20 // langinfo.h:66:1: + ABMON_1 = 33 // langinfo.h:83:1: + ABMON_10 = 42 // langinfo.h:92:1: + ABMON_11 = 43 // langinfo.h:93:1: + ABMON_12 = 44 // langinfo.h:94:1: + ABMON_2 = 34 // langinfo.h:84:1: + ABMON_3 = 35 // langinfo.h:85:1: + ABMON_4 = 36 // langinfo.h:86:1: + ABMON_5 = 37 // langinfo.h:87:1: + ABMON_6 = 38 // langinfo.h:88:1: + ABMON_7 = 39 // langinfo.h:89:1: + ABMON_8 = 40 // langinfo.h:90:1: + ABMON_9 = 41 // langinfo.h:91:1: + ALTMON_1 = 58 // langinfo.h:120:1: + ALTMON_10 = 67 // langinfo.h:129:1: + ALTMON_11 = 68 // langinfo.h:130:1: + ALTMON_12 = 69 // langinfo.h:131:1: + ALTMON_2 = 59 // langinfo.h:121:1: + ALTMON_3 = 60 // langinfo.h:122:1: + ALTMON_4 = 61 // langinfo.h:123:1: + ALTMON_5 = 62 // langinfo.h:124:1: + ALTMON_6 = 63 // langinfo.h:125:1: + ALTMON_7 = 64 // langinfo.h:126:1: + ALTMON_8 = 65 // langinfo.h:127:1: + ALTMON_9 = 66 // langinfo.h:128:1: + ALT_DIGITS = 49 // langinfo.h:100:1: + AM_STR = 5 // langinfo.h:47:1: + CODESET = 0 // langinfo.h:42:1: + CRNCYSTR = 56 // langinfo.h:113:1: + DAY_1 = 7 // langinfo.h:51:1: + DAY_2 = 8 // langinfo.h:52:1: + DAY_3 = 9 // langinfo.h:53:1: + DAY_4 = 10 // langinfo.h:54:1: + DAY_5 = 11 // langinfo.h:55:1: + DAY_6 = 12 // langinfo.h:56:1: + DAY_7 = 13 // langinfo.h:57:1: + D_FMT = 2 // langinfo.h:44:1: + D_MD_ORDER = 57 // langinfo.h:116:1: + D_T_FMT = 1 // langinfo.h:43:1: + ERA = 45 // langinfo.h:96:1: + ERA_D_FMT = 46 // langinfo.h:97:1: + ERA_D_T_FMT = 47 // langinfo.h:98:1: + ERA_T_FMT = 48 // langinfo.h:99:1: + MON_1 = 21 // langinfo.h:69:1: + MON_10 = 30 // langinfo.h:78:1: + MON_11 = 31 // langinfo.h:79:1: + MON_12 = 32 // langinfo.h:80:1: + MON_2 = 22 // langinfo.h:70:1: + MON_3 = 23 // langinfo.h:71:1: + MON_4 = 24 // langinfo.h:72:1: + MON_5 = 25 // langinfo.h:73:1: + MON_6 = 26 // langinfo.h:74:1: + MON_7 = 27 // langinfo.h:75:1: + MON_8 = 28 // langinfo.h:76:1: + MON_9 = 29 // langinfo.h:77:1: + NOEXPR = 53 // langinfo.h:106:1: + NOSTR = 55 // langinfo.h:110:1: + PM_STR = 6 // langinfo.h:48:1: + RADIXCHAR = 50 // langinfo.h:102:1: + THOUSEP = 51 // langinfo.h:103:1: + T_FMT = 3 // langinfo.h:45:1: + T_FMT_AMPM = 4 // langinfo.h:46:1: + YESEXPR = 52 // langinfo.h:105:1: + YESSTR = 54 // langinfo.h:109:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LANGINFO_H_ = 0 // langinfo.h:32:1: + X_LOCALE_T_DEFINED = 0 // _langinfo.h:37:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_NL_ITEM_DECLARED = 0 // langinfo.h:39:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_XLOCALE_LANGINFO_H = 0 // _langinfo.h:34:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Nl_item = X__nl_item /* langinfo.h:38:19 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _langinfo.h:38:25 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_freebsd_arm64.go b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_arm64.go new file mode 100644 index 00000000..5d216514 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/langinfo_freebsd_arm64.go @@ -0,0 +1,702 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_freebsd_amd64.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ABDAY_1 = 14 // langinfo.h:60:1: + ABDAY_2 = 15 // langinfo.h:61:1: + ABDAY_3 = 16 // langinfo.h:62:1: + ABDAY_4 = 17 // langinfo.h:63:1: + ABDAY_5 = 18 // langinfo.h:64:1: + ABDAY_6 = 19 // langinfo.h:65:1: + ABDAY_7 = 20 // langinfo.h:66:1: + ABMON_1 = 33 // langinfo.h:83:1: + ABMON_10 = 42 // langinfo.h:92:1: + ABMON_11 = 43 // langinfo.h:93:1: + ABMON_12 = 44 // langinfo.h:94:1: + ABMON_2 = 34 // langinfo.h:84:1: + ABMON_3 = 35 // langinfo.h:85:1: + ABMON_4 = 36 // langinfo.h:86:1: + ABMON_5 = 37 // langinfo.h:87:1: + ABMON_6 = 38 // langinfo.h:88:1: + ABMON_7 = 39 // langinfo.h:89:1: + ABMON_8 = 40 // langinfo.h:90:1: + ABMON_9 = 41 // langinfo.h:91:1: + ALTMON_1 = 58 // langinfo.h:120:1: + ALTMON_10 = 67 // langinfo.h:129:1: + ALTMON_11 = 68 // langinfo.h:130:1: + ALTMON_12 = 69 // langinfo.h:131:1: + ALTMON_2 = 59 // langinfo.h:121:1: + ALTMON_3 = 60 // langinfo.h:122:1: + ALTMON_4 = 61 // langinfo.h:123:1: + ALTMON_5 = 62 // langinfo.h:124:1: + ALTMON_6 = 63 // langinfo.h:125:1: + ALTMON_7 = 64 // langinfo.h:126:1: + ALTMON_8 = 65 // langinfo.h:127:1: + ALTMON_9 = 66 // langinfo.h:128:1: + ALT_DIGITS = 49 // langinfo.h:100:1: + AM_STR = 5 // langinfo.h:47:1: + CODESET = 0 // langinfo.h:42:1: + CRNCYSTR = 56 // langinfo.h:113:1: + DAY_1 = 7 // langinfo.h:51:1: + DAY_2 = 8 // langinfo.h:52:1: + DAY_3 = 9 // langinfo.h:53:1: + DAY_4 = 10 // langinfo.h:54:1: + DAY_5 = 11 // langinfo.h:55:1: + DAY_6 = 12 // langinfo.h:56:1: + DAY_7 = 13 // langinfo.h:57:1: + D_FMT = 2 // langinfo.h:44:1: + D_MD_ORDER = 57 // langinfo.h:116:1: + D_T_FMT = 1 // langinfo.h:43:1: + ERA = 45 // langinfo.h:96:1: + ERA_D_FMT = 46 // langinfo.h:97:1: + ERA_D_T_FMT = 47 // langinfo.h:98:1: + ERA_T_FMT = 48 // langinfo.h:99:1: + MON_1 = 21 // langinfo.h:69:1: + MON_10 = 30 // langinfo.h:78:1: + MON_11 = 31 // langinfo.h:79:1: + MON_12 = 32 // langinfo.h:80:1: + MON_2 = 22 // langinfo.h:70:1: + MON_3 = 23 // langinfo.h:71:1: + MON_4 = 24 // langinfo.h:72:1: + MON_5 = 25 // langinfo.h:73:1: + MON_6 = 26 // langinfo.h:74:1: + MON_7 = 27 // langinfo.h:75:1: + MON_8 = 28 // langinfo.h:76:1: + MON_9 = 29 // langinfo.h:77:1: + NOEXPR = 53 // langinfo.h:106:1: + NOSTR = 55 // langinfo.h:110:1: + PM_STR = 6 // langinfo.h:48:1: + RADIXCHAR = 50 // langinfo.h:102:1: + THOUSEP = 51 // langinfo.h:103:1: + T_FMT = 3 // langinfo.h:45:1: + T_FMT_AMPM = 4 // langinfo.h:46:1: + YESEXPR = 52 // langinfo.h:105:1: + YESSTR = 54 // langinfo.h:109:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LANGINFO_H_ = 0 // langinfo.h:32:1: + X_LOCALE_T_DEFINED = 0 // _langinfo.h:37:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_NL_ITEM_DECLARED = 0 // langinfo.h:39:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_XLOCALE_LANGINFO_H = 0 // _langinfo.h:34:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Nl_item = X__nl_item /* langinfo.h:38:19 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _langinfo.h:38:25 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_netbsd_arm.go b/vendor/modernc.org/libc/langinfo/langinfo_netbsd_arm.go new file mode 100644 index 00000000..b0ce4332 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/langinfo_netbsd_arm.go @@ -0,0 +1,185 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_netbsd_arm.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + NL_CAT_LOCALE = 1 // nl_types.h:75:1: + NL_SETD = 1 // nl_types.h:74:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LANGINFO_H_ = 0 // langinfo.h:9:1: + X_NL_TYPES_H_ = 0 // nl_types.h:33:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: nl_types.h,v 1.13 2013/08/19 08:03:33 joerg Exp $ + +// - +// Copyright (c) 1996 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +type X__nl_cat_d = struct { + F__data uintptr + F__size int32 +} /* nl_types.h:77:9 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: nl_types.h,v 1.13 2013/08/19 08:03:33 joerg Exp $ + +// - +// Copyright (c) 1996 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +type Nl_catd = uintptr /* nl_types.h:80:3 */ + +type Nl_item = int32 /* nl_types.h:82:14 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_386.go b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_386.go new file mode 100644 index 00000000..399b0ad3 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_386.go @@ -0,0 +1,501 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_386.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ABDAY_1 = 13 // langinfo.h:29:1: + ABDAY_2 = 14 // langinfo.h:30:1: + ABDAY_3 = 15 // langinfo.h:31:1: + ABDAY_4 = 16 // langinfo.h:32:1: + ABDAY_5 = 17 // langinfo.h:33:1: + ABDAY_6 = 18 // langinfo.h:34:1: + ABDAY_7 = 19 // langinfo.h:35:1: + ABMON_1 = 32 // langinfo.h:50:1: + ABMON_10 = 41 // langinfo.h:59:1: + ABMON_11 = 42 // langinfo.h:60:1: + ABMON_12 = 43 // langinfo.h:61:1: + ABMON_2 = 33 // langinfo.h:51:1: + ABMON_3 = 34 // langinfo.h:52:1: + ABMON_4 = 35 // langinfo.h:53:1: + ABMON_5 = 36 // langinfo.h:54:1: + ABMON_6 = 37 // langinfo.h:55:1: + ABMON_7 = 38 // langinfo.h:56:1: + ABMON_8 = 39 // langinfo.h:57:1: + ABMON_9 = 40 // langinfo.h:58:1: + AM_STR = 4 // langinfo.h:18:1: + CODESET = 51 // langinfo.h:71:1: + CRNCYSTR = 50 // langinfo.h:69:1: + DAY_1 = 6 // langinfo.h:21:1: + DAY_2 = 7 // langinfo.h:22:1: + DAY_3 = 8 // langinfo.h:23:1: + DAY_4 = 9 // langinfo.h:24:1: + DAY_5 = 10 // langinfo.h:25:1: + DAY_6 = 11 // langinfo.h:26:1: + DAY_7 = 12 // langinfo.h:27:1: + D_FMT = 1 // langinfo.h:15:1: + D_T_FMT = 0 // langinfo.h:14:1: + MON_1 = 20 // langinfo.h:37:1: + MON_10 = 29 // langinfo.h:46:1: + MON_11 = 30 // langinfo.h:47:1: + MON_12 = 31 // langinfo.h:48:1: + MON_2 = 21 // langinfo.h:38:1: + MON_3 = 22 // langinfo.h:39:1: + MON_4 = 23 // langinfo.h:40:1: + MON_5 = 24 // langinfo.h:41:1: + MON_6 = 25 // langinfo.h:42:1: + MON_7 = 26 // langinfo.h:43:1: + MON_8 = 27 // langinfo.h:44:1: + MON_9 = 28 // langinfo.h:45:1: + NL_CAT_LOCALE = 1 // nl_types.h:76:1: + NL_SETD = 1 // nl_types.h:75:1: + NOEXPR = 49 // langinfo.h:68:1: + NOSTR = 48 // langinfo.h:67:1: + PM_STR = 5 // langinfo.h:19:1: + RADIXCHAR = 44 // langinfo.h:63:1: + THOUSEP = 45 // langinfo.h:64:1: + T_FMT = 2 // langinfo.h:16:1: + T_FMT_AMPM = 3 // langinfo.h:17:1: + YESEXPR = 47 // langinfo.h:66:1: + YESSTR = 46 // langinfo.h:65:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LANGINFO_H_ = 0 // langinfo.h:10:1: + X_LOCALE_T_DEFINED_ = 0 // langinfo.h:75:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_NL_TYPES_H_ = 0 // nl_types.h:34:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $ + +// Written by J.T. Conklin <jtc@netbsd.org> +// Public domain. + +// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $ +// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $ + +// - +// Copyright (c) 1996 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// +// 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 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type X_nl_catd = struct { + F__data uintptr + F__size int32 +} /* nl_types.h:78:9 */ + +// $OpenBSD: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $ + +// Written by J.T. Conklin <jtc@netbsd.org> +// Public domain. + +// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $ +// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $ + +// - +// Copyright (c) 1996 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// +// 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 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type Nl_catd = uintptr /* nl_types.h:81:3 */ + +type Nl_item = int32 /* nl_types.h:83:14 */ + +type Locale_t = uintptr /* langinfo.h:76:14 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go index 55f4505e..e97366e3 100644 --- a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go +++ b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go @@ -77,7 +77,7 @@ const ( X_NL_TYPES_H_ = 0 // nl_types.h:34:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/langinfo/langinfo_openbsd_arm64.go b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_arm64.go new file mode 100644 index 00000000..37fd7883 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/langinfo_openbsd_arm64.go @@ -0,0 +1,505 @@ +// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_openbsd_arm64.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ABDAY_1 = 13 // langinfo.h:29:1: + ABDAY_2 = 14 // langinfo.h:30:1: + ABDAY_3 = 15 // langinfo.h:31:1: + ABDAY_4 = 16 // langinfo.h:32:1: + ABDAY_5 = 17 // langinfo.h:33:1: + ABDAY_6 = 18 // langinfo.h:34:1: + ABDAY_7 = 19 // langinfo.h:35:1: + ABMON_1 = 32 // langinfo.h:50:1: + ABMON_10 = 41 // langinfo.h:59:1: + ABMON_11 = 42 // langinfo.h:60:1: + ABMON_12 = 43 // langinfo.h:61:1: + ABMON_2 = 33 // langinfo.h:51:1: + ABMON_3 = 34 // langinfo.h:52:1: + ABMON_4 = 35 // langinfo.h:53:1: + ABMON_5 = 36 // langinfo.h:54:1: + ABMON_6 = 37 // langinfo.h:55:1: + ABMON_7 = 38 // langinfo.h:56:1: + ABMON_8 = 39 // langinfo.h:57:1: + ABMON_9 = 40 // langinfo.h:58:1: + AM_STR = 4 // langinfo.h:18:1: + CODESET = 51 // langinfo.h:71:1: + CRNCYSTR = 50 // langinfo.h:69:1: + DAY_1 = 6 // langinfo.h:21:1: + DAY_2 = 7 // langinfo.h:22:1: + DAY_3 = 8 // langinfo.h:23:1: + DAY_4 = 9 // langinfo.h:24:1: + DAY_5 = 10 // langinfo.h:25:1: + DAY_6 = 11 // langinfo.h:26:1: + DAY_7 = 12 // langinfo.h:27:1: + D_FMT = 1 // langinfo.h:15:1: + D_T_FMT = 0 // langinfo.h:14:1: + MON_1 = 20 // langinfo.h:37:1: + MON_10 = 29 // langinfo.h:46:1: + MON_11 = 30 // langinfo.h:47:1: + MON_12 = 31 // langinfo.h:48:1: + MON_2 = 21 // langinfo.h:38:1: + MON_3 = 22 // langinfo.h:39:1: + MON_4 = 23 // langinfo.h:40:1: + MON_5 = 24 // langinfo.h:41:1: + MON_6 = 25 // langinfo.h:42:1: + MON_7 = 26 // langinfo.h:43:1: + MON_8 = 27 // langinfo.h:44:1: + MON_9 = 28 // langinfo.h:45:1: + NL_CAT_LOCALE = 1 // nl_types.h:76:1: + NL_SETD = 1 // nl_types.h:75:1: + NOEXPR = 49 // langinfo.h:68:1: + NOSTR = 48 // langinfo.h:67:1: + PM_STR = 5 // langinfo.h:19:1: + RADIXCHAR = 44 // langinfo.h:63:1: + THOUSEP = 45 // langinfo.h:64:1: + T_FMT = 2 // langinfo.h:16:1: + T_FMT_AMPM = 3 // langinfo.h:17:1: + YESEXPR = 47 // langinfo.h:66:1: + YESSTR = 46 // langinfo.h:65:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LANGINFO_H_ = 0 // langinfo.h:10:1: + X_LOCALE_T_DEFINED_ = 0 // langinfo.h:75:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_NL_TYPES_H_ = 0 // nl_types.h:34:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $ + +// Written by J.T. Conklin <jtc@netbsd.org> +// Public domain. + +// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $ +// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $ + +// - +// Copyright (c) 1996 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// +// 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 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type X_nl_catd = struct { + F__data uintptr + F__size int32 + F__ccgo_pad1 [4]byte +} /* nl_types.h:78:9 */ + +// $OpenBSD: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $ + +// Written by J.T. Conklin <jtc@netbsd.org> +// Public domain. + +// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $ +// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $ + +// - +// Copyright (c) 1996 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by J.T. Conklin. +// +// 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 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type Nl_catd = uintptr /* nl_types.h:81:3 */ + +type Nl_item = int64 /* nl_types.h:83:14 */ + +type Locale_t = uintptr /* langinfo.h:76:14 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/libc.go b/vendor/modernc.org/libc/libc.go index 3cc9e160..1cd63db7 100644 --- a/vendor/modernc.org/libc/libc.go +++ b/vendor/modernc.org/libc/libc.go @@ -409,7 +409,7 @@ func X__builtin_object_size(t *TLS, p uintptr, typ int32) types.Size_t { var atomicLoadStore16 sync.Mutex -func AtomicLoadNUint16(ptr uintptr, memorder int16) uint16 { +func AtomicLoadNUint16(ptr uintptr, memorder int32) uint16 { atomicLoadStore16.Lock() r := *(*uint16)(unsafe.Pointer(ptr)) atomicLoadStore16.Unlock() @@ -575,7 +575,16 @@ func Xabs(t *TLS, j int32) int32 { return -j } +func Xllabs(tls *TLS, a int64) int64 { + if a >= int64(0) { + return a + } + + return -a +} + func X__builtin_isnan(t *TLS, x float64) int32 { return Bool32(math.IsNaN(x)) } +func X__builtin_llabs(tls *TLS, a int64) int64 { return Xllabs(tls, a) } func Xacos(t *TLS, x float64) float64 { return math.Acos(x) } func Xacosh(t *TLS, x float64) float64 { return math.Acosh(x) } func Xasin(t *TLS, x float64) float64 { return math.Asin(x) } @@ -1223,8 +1232,9 @@ func Xreadv(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t { } // int openpty(int *amaster, int *aslave, char *name, -// const struct termios *termp, -// const struct winsize *winp); +// +// const struct termios *termp, +// const struct winsize *winp); func Xopenpty(t *TLS, amaster, aslave, name, termp, winp uintptr) int32 { panic(todo("")) } @@ -1235,8 +1245,9 @@ func Xsetsid(t *TLS) types.Pid_t { } // int pselect(int nfds, fd_set *readfds, fd_set *writefds, -// fd_set *exceptfds, const struct timespec *timeout, -// const sigset_t *sigmask); +// +// fd_set *exceptfds, const struct timespec *timeout, +// const sigset_t *sigmask); func Xpselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout, sigmask uintptr) int32 { panic(todo("")) } diff --git a/vendor/modernc.org/libc/libc_darwin.go b/vendor/modernc.org/libc/libc_darwin.go index 34b38974..1dc5b926 100644 --- a/vendor/modernc.org/libc/libc_darwin.go +++ b/vendor/modernc.org/libc/libc_darwin.go @@ -13,6 +13,7 @@ import ( "os/exec" gosignal "os/signal" "path/filepath" + "runtime" "strings" "syscall" gotime "time" @@ -60,13 +61,15 @@ var X__stdinp = Xstdin var X__stdoutp = Xstdout // user@darwin-m1:~/tmp$ cat main.c -// #include <xlocale.h> -// #include <stdio.h> // -// int main() { -// printf("%i\n", ___mb_cur_max()); -// return 0; -// } +// #include <xlocale.h> +// #include <stdio.h> +// +// int main() { +// printf("%i\n", ___mb_cur_max()); +// return 0; +// } +// // user@darwin-m1:~/tmp$ gcc main.c && ./a.out // 1 // user@darwin-m1:~/tmp$ @@ -381,6 +384,8 @@ func Xsysconf(t *TLS, name int32) long { switch name { case unistd.X_SC_PAGESIZE: return long(unix.Getpagesize()) + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("")) @@ -1936,26 +1941,29 @@ func Xpause(t *TLS) int32 { // } fd_set; // __darwin_fd_set(int _fd, struct fd_set *const _p) -// { -// (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] |= ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)))); -// } +// +// { +// (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] |= ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)))); +// } func X__darwin_fd_set(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:12:1: */ *(*int32)(unsafe.Pointer(_p + uintptr(uint64(_fd)/(uint64(unsafe.Sizeof(int32(0)))*uint64(8)))*4)) |= int32(uint64(uint64(1)) << (uint64(_fd) % (uint64(unsafe.Sizeof(int32(0))) * uint64(8)))) return int32(0) } // __darwin_fd_isset(int _fd, const struct fd_set *_p) -// { -// return _p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] & ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))); -// } +// +// { +// return _p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] & ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))); +// } func X__darwin_fd_isset(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:17:1: */ return *(*int32)(unsafe.Pointer(_p + uintptr(uint64(_fd)/(uint64(unsafe.Sizeof(int32(0)))*uint64(8)))*4)) & int32(uint64(uint64(1))<<(uint64(_fd)%(uint64(unsafe.Sizeof(int32(0)))*uint64(8)))) } // __darwin_fd_clr(int _fd, struct fd_set *const _p) -// { -// (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] &= ~((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)))); -// } +// +// { +// (_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] &= ~((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)))); +// } func X__darwin_fd_clr(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:22:1: */ *(*int32)(unsafe.Pointer(_p + uintptr(uint64(_fd)/(uint64(unsafe.Sizeof(int32(0)))*uint64(8)))*4)) &= ^int32(uint64(uint64(1)) << (uint64(_fd) % (uint64(unsafe.Sizeof(int32(0))) * uint64(8)))) return int32(0) diff --git a/vendor/modernc.org/libc/libc_freebsd.go b/vendor/modernc.org/libc/libc_freebsd.go index 7190fd6a..486f8ec4 100644 --- a/vendor/modernc.org/libc/libc_freebsd.go +++ b/vendor/modernc.org/libc/libc_freebsd.go @@ -10,10 +10,12 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "strings" "syscall" gotime "time" + "unicode" "unsafe" guuid "github.com/google/uuid" @@ -274,6 +276,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) @@ -1427,7 +1431,7 @@ func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, off const PTHREAD_MUTEX_DEFAULT = 0 func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */ - return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))) + return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & uint32(3))) } func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */ @@ -1493,7 +1497,7 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth if uint32(type1) > uint32(2) { return 22 } - (*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1)) + (*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1)) return 0 } @@ -1509,3 +1513,26 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 { } func X__srget(t *TLS, stream uintptr) int32 { return Xgetc(t, stream) } + +func X___tolower(t *TLS, r rune) rune { + return unicode.ToLower(r) +} + +func X___toupper(t *TLS, r rune) rune { + return unicode.ToLower(r) +} + +// uint16_t __builtin_bswap16 (uint32_t x) +func Xbswap16(t *TLS, x uint16) uint16 { + return X__builtin_bswap16(t, x) +} + +// uint32_t __builtin_bswap32 (uint32_t x) +func Xbswap32(t *TLS, x uint32) uint32 { + return X__builtin_bswap32(t, x) +} + +// uint64_t __builtin_bswap64 (uint64_t x) +func Xbswap64(t *TLS, x uint64) uint64 { + return X__builtin_bswap64(t, x) +} diff --git a/vendor/modernc.org/libc/libc_freebsd_arm.go b/vendor/modernc.org/libc/libc_freebsd_arm.go new file mode 100644 index 00000000..29444877 --- /dev/null +++ b/vendor/modernc.org/libc/libc_freebsd_arm.go @@ -0,0 +1,647 @@ +// Copyright 2021 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "strings" + "syscall" + "unsafe" + + "golang.org/x/sys/unix" + "modernc.org/libc/fcntl" + "modernc.org/libc/fts" + "modernc.org/libc/sys/types" + "modernc.org/libc/time" + "modernc.org/libc/utime" +) + +type ( + long = int32 + ulong = uint32 +) + +// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// FILE *fopen64(const char *pathname, const char *mode); +func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { + m := strings.ReplaceAll(GoString(mode), "b", "") + var flags int + switch m { + case "r": + flags = fcntl.O_RDONLY + case "r+": + flags = fcntl.O_RDWR + case "w": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC + case "w+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC + case "a": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND + case "a+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND + default: + panic(m) + } + fd, err := unix.Open(GoString(pathname), int(flags), 0666) + if err != nil { + if dmesgs { + dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) + } + t.setErrno(err) + return 0 + } + + if dmesgs { + dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) + } + if p := newFile(t, int32(fd)); p != 0 { + return p + } + + panic("OOM") +} + +// int lstat(const char *pathname, struct stat *statbuf); +func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int stat(const char *pathname, struct stat *statbuf); +func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int mkdir(const char *path, mode_t mode); +func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(path)) + } + return 0 +} + +// int access(const char *pathname, int mode); +func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// int unlink(const char *pathname); +func Xunlink(t *TLS, pathname uintptr) int32 { + if err := unix.Unlink(GoString(pathname)); err != nil { + if dmesgs { + dmesg("%v: %q: %v", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); +func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { + var n int + var err error + switch { + case buf == 0 || bufsize == 0: + n, err = unix.Readlink(GoString(path), nil) + default: + n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) + } + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok") + } + return types.Ssize_t(n) +} + +// int symlink(const char *target, const char *linkpath); +func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chmod(const char *pathname, mode_t mode) +func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// time_t time(time_t *tloc); +func Xtime(t *TLS, tloc uintptr) time.Time_t { + panic(todo("")) + // n := time.Now().UTC().Unix() + // if tloc != 0 { + // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) + // } + // return types.Time_t(n) +} + +// int utimes(const char *filename, const struct timeval times[2]); +func Xutimes(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) + a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: fd %d: ok", origin(1), fd) + } + return 0 +} + +// off64_t lseek64(int fd, off64_t offset, int whence); +func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { + n, err := unix.Seek(int(fd), int64(offset), int(whence)) + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return types.Off_t(n) +} + +func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) + if err != 0 { + if dmesgs { + dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) + } + return int32(n) +} + +// int rename(const char *oldpath, const char *newpath); +func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int mknod(const char *pathname, mode_t mode, dev_t dev); +func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int utime(const char *filename, const struct utimbuf *times); +func Xutime(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime + a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chown(const char *pathname, uid_t owner, gid_t group); +func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { + if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int link(const char *oldpath, const char *newpath); +func Xlink(t *TLS, oldpath, newpath uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int dup2(int oldfd, int newfd); +func Xdup2(t *TLS, oldfd, newfd int32) int32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + // if err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return int32(n) +} + +// unsigned int alarm(unsigned int seconds); +func Xalarm(t *TLS, seconds uint32) uint32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) + // if err != 0 { + // panic(todo("")) + // } + + // return uint32(n) +} + +func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(347) + //TODO defer tls.Free(347) + + //TODO // var ptr [78]int8 at bp, 78 + + //TODO // var buf [256]int8 at bp+78, 256 + + //TODO // var num [13]int8 at bp+334, 13 + + //TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + //TODO var a uintptr + //TODO var scopeid uint32 + + //TODO switch af { + //TODO case 2: + //TODO a = (sa1 + 4 /* &.sin_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) { + //TODO return -6 + //TODO } + //TODO mkptr4(tls, bp /* &ptr[0] */, a) + //TODO scopeid = uint32(0) + //TODO break + //TODO case 10: + //TODO a = (sa1 + 8 /* &.sin6_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) { + //TODO return -6 + //TODO } + //TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 { + //TODO mkptr6(tls, bp /* &ptr[0] */, a) + //TODO } else { + //TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12))) + //TODO } + //TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + //TODO break + //TODO default: + //TODO return -6 + //TODO } + + //TODO if (node != 0) && (nodelen != 0) { + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x01) != 0) { + //TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) { + //TODO Xabort(tls) //TODO- + //TODO // unsigned char query[18+PTR_MAX], reply[512]; + //TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, + //TODO // 0, 0, 0, query, sizeof query); + //TODO // query[3] = 0; /* don't need AD flag */ + //TODO // int rlen = __res_send(query, qlen, reply, sizeof reply); + //TODO // buf[0] = 0; + //TODO // if (rlen > 0) + //TODO // __dns_parse(reply, rlen, dns_parse_callback, buf); + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) { + //TODO if (flags & 0x08) != 0 { + //TODO return -2 + //TODO } + //TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{}))) + //TODO if scopeid != 0 { + //TODO Xabort(tls) //TODO- + //TODO // char *p = 0, tmp[IF_NAMESIZE+1]; + //TODO // if (!(flags & NI_NUMERICSCOPE) && + //TODO // (IN6_IS_ADDR_LINKLOCAL(a) || + //TODO // IN6_IS_ADDR_MC_LINKLOCAL(a))) + //TODO // p = if_indextoname(scopeid, tmp+1); + //TODO // if (!p) + //TODO // p = itoa(num, scopeid); + //TODO // *--p = '%'; + //TODO // strcat(buf, p); + //TODO } + //TODO } + //TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */) + //TODO } + + //TODO if (serv != 0) && (servlen != 0) { + //TODO var p uintptr = bp + 78 /* buf */ + //TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x02) != 0) { + //TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10)) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) { + //TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port)) + //TODO } + //TODO if Xstrlen(tls, p) >= size_t(servlen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, serv, p) + //TODO } + + //TODO return 0 +} + +func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(28) + //TODO defer tls.Free(28) + + //TODO //TODO union { + //TODO //TODO struct sockaddr_in sin; + //TODO //TODO struct sockaddr_in6 sin6; + //TODO //TODO } sa = { .sin.sin_family = af }; + //TODO *(*struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO })(unsafe.Pointer(bp /* sa1 */)) = struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO }{} //TODO- + //TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO- + //TODO var sl socklen_t + //TODO if af == 10 { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{})) + //TODO } else { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in{})) + //TODO } + //TODO var i int32 + + //TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + + //TODO // Load address argument into sockaddr structure + //TODO if (af == 10) && (l == socklen_t(16)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16)) + //TODO } else if (af == 2) && (l == socklen_t(4)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4)) + //TODO } else { + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return 22 + //TODO } + + //TODO // Align buffer and check for space for pointers and ip address + //TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))) + //TODO if !(i != 0) { + //TODO i = int32(unsafe.Sizeof(uintptr(0))) + //TODO } + //TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) { + //TODO return 34 + //TODO } + //TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i))) + //TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) + + //TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + //TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf + //TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + //TODO buf += uintptr(l) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + + //TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { + //TODO case -3: + //TODO *(*int32)(unsafe.Pointer(err)) = 2 + //TODO return 11 + //TODO case -12: + //TODO return 34 + //TODO default: + //TODO fallthrough + //TODO case -10: + //TODO fallthrough + //TODO case -11: + //TODO fallthrough + //TODO case -4: + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + //TODO case 0: + //TODO break + //TODO } + + //TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af + //TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l) + //TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + //TODO *(*uintptr)(unsafe.Pointer(res)) = h + //TODO return 0 +} + +// int getrlimit(int resource, struct rlimit *rlim); +func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { + var statp uintptr + if stat != nil { + statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) + if statp == 0 { + panic("OOM") + } + + *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat + } + csp, errx := CString(path) + if errx != nil { + panic("OOM") + } + + return &fts.FTSENT{ + Ffts_info: int32(info), + Ffts_path: csp, + Ffts_pathlen: uint32(len(path)), + Ffts_statp: statp, + Ffts_errno: int32(err), + } +} + +// DIR *opendir(const char *name); +func Xopendir(t *TLS, name uintptr) uintptr { + p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{}))) + if p == 0 { + panic("OOM") + } + + fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) + if fd < 0 { + if dmesgs { + dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) + } + Xfree(t, p) + return 0 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + (*darwinDir)(unsafe.Pointer(p)).fd = fd + (*darwinDir)(unsafe.Pointer(p)).h = 0 + (*darwinDir)(unsafe.Pointer(p)).l = 0 + (*darwinDir)(unsafe.Pointer(p)).eof = false + return p +} + +// int chflags(const char *path, u_int flags); +func Xchflags(t *TLS, path uintptr, flags uint32) int32 { + if err := unix.Chflags(GoString(path), int(flags)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} diff --git a/vendor/modernc.org/libc/libc_freebsd_arm64.go b/vendor/modernc.org/libc/libc_freebsd_arm64.go new file mode 100644 index 00000000..48f7fd78 --- /dev/null +++ b/vendor/modernc.org/libc/libc_freebsd_arm64.go @@ -0,0 +1,647 @@ +// Copyright 2021 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "strings" + "syscall" + "unsafe" + + "golang.org/x/sys/unix" + "modernc.org/libc/fcntl" + "modernc.org/libc/fts" + "modernc.org/libc/sys/types" + "modernc.org/libc/time" + "modernc.org/libc/utime" +) + +type ( + long = int64 + ulong = uint64 +) + +// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// FILE *fopen64(const char *pathname, const char *mode); +func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { + m := strings.ReplaceAll(GoString(mode), "b", "") + var flags int + switch m { + case "r": + flags = fcntl.O_RDONLY + case "r+": + flags = fcntl.O_RDWR + case "w": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC + case "w+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC + case "a": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND + case "a+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND + default: + panic(m) + } + fd, err := unix.Open(GoString(pathname), int(flags), 0666) + if err != nil { + if dmesgs { + dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) + } + t.setErrno(err) + return 0 + } + + if dmesgs { + dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) + } + if p := newFile(t, int32(fd)); p != 0 { + return p + } + + panic("OOM") +} + +// int lstat(const char *pathname, struct stat *statbuf); +func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int stat(const char *pathname, struct stat *statbuf); +func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int mkdir(const char *path, mode_t mode); +func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(path)) + } + return 0 +} + +// int access(const char *pathname, int mode); +func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// int unlink(const char *pathname); +func Xunlink(t *TLS, pathname uintptr) int32 { + if err := unix.Unlink(GoString(pathname)); err != nil { + if dmesgs { + dmesg("%v: %q: %v", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); +func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { + var n int + var err error + switch { + case buf == 0 || bufsize == 0: + n, err = unix.Readlink(GoString(path), nil) + default: + n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) + } + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok") + } + return types.Ssize_t(n) +} + +// int symlink(const char *target, const char *linkpath); +func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chmod(const char *pathname, mode_t mode) +func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// time_t time(time_t *tloc); +func Xtime(t *TLS, tloc uintptr) time.Time_t { + panic(todo("")) + // n := time.Now().UTC().Unix() + // if tloc != 0 { + // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) + // } + // return types.Time_t(n) +} + +// int utimes(const char *filename, const struct timeval times[2]); +func Xutimes(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) + a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: fd %d: ok", origin(1), fd) + } + return 0 +} + +// off64_t lseek64(int fd, off64_t offset, int whence); +func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { + n, err := unix.Seek(int(fd), int64(offset), int(whence)) + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return types.Off_t(n) +} + +func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) + if err != 0 { + if dmesgs { + dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) + } + return int32(n) +} + +// int rename(const char *oldpath, const char *newpath); +func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int mknod(const char *pathname, mode_t mode, dev_t dev); +func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int utime(const char *filename, const struct utimbuf *times); +func Xutime(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime + a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chown(const char *pathname, uid_t owner, gid_t group); +func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { + if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int link(const char *oldpath, const char *newpath); +func Xlink(t *TLS, oldpath, newpath uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int dup2(int oldfd, int newfd); +func Xdup2(t *TLS, oldfd, newfd int32) int32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + // if err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return int32(n) +} + +// unsigned int alarm(unsigned int seconds); +func Xalarm(t *TLS, seconds uint32) uint32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) + // if err != 0 { + // panic(todo("")) + // } + + // return uint32(n) +} + +func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(347) + //TODO defer tls.Free(347) + + //TODO // var ptr [78]int8 at bp, 78 + + //TODO // var buf [256]int8 at bp+78, 256 + + //TODO // var num [13]int8 at bp+334, 13 + + //TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + //TODO var a uintptr + //TODO var scopeid uint32 + + //TODO switch af { + //TODO case 2: + //TODO a = (sa1 + 4 /* &.sin_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) { + //TODO return -6 + //TODO } + //TODO mkptr4(tls, bp /* &ptr[0] */, a) + //TODO scopeid = uint32(0) + //TODO break + //TODO case 10: + //TODO a = (sa1 + 8 /* &.sin6_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) { + //TODO return -6 + //TODO } + //TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 { + //TODO mkptr6(tls, bp /* &ptr[0] */, a) + //TODO } else { + //TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12))) + //TODO } + //TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + //TODO break + //TODO default: + //TODO return -6 + //TODO } + + //TODO if (node != 0) && (nodelen != 0) { + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x01) != 0) { + //TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) { + //TODO Xabort(tls) //TODO- + //TODO // unsigned char query[18+PTR_MAX], reply[512]; + //TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, + //TODO // 0, 0, 0, query, sizeof query); + //TODO // query[3] = 0; /* don't need AD flag */ + //TODO // int rlen = __res_send(query, qlen, reply, sizeof reply); + //TODO // buf[0] = 0; + //TODO // if (rlen > 0) + //TODO // __dns_parse(reply, rlen, dns_parse_callback, buf); + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) { + //TODO if (flags & 0x08) != 0 { + //TODO return -2 + //TODO } + //TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{}))) + //TODO if scopeid != 0 { + //TODO Xabort(tls) //TODO- + //TODO // char *p = 0, tmp[IF_NAMESIZE+1]; + //TODO // if (!(flags & NI_NUMERICSCOPE) && + //TODO // (IN6_IS_ADDR_LINKLOCAL(a) || + //TODO // IN6_IS_ADDR_MC_LINKLOCAL(a))) + //TODO // p = if_indextoname(scopeid, tmp+1); + //TODO // if (!p) + //TODO // p = itoa(num, scopeid); + //TODO // *--p = '%'; + //TODO // strcat(buf, p); + //TODO } + //TODO } + //TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */) + //TODO } + + //TODO if (serv != 0) && (servlen != 0) { + //TODO var p uintptr = bp + 78 /* buf */ + //TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x02) != 0) { + //TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10)) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) { + //TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port)) + //TODO } + //TODO if Xstrlen(tls, p) >= size_t(servlen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, serv, p) + //TODO } + + //TODO return 0 +} + +func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(28) + //TODO defer tls.Free(28) + + //TODO //TODO union { + //TODO //TODO struct sockaddr_in sin; + //TODO //TODO struct sockaddr_in6 sin6; + //TODO //TODO } sa = { .sin.sin_family = af }; + //TODO *(*struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO })(unsafe.Pointer(bp /* sa1 */)) = struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO }{} //TODO- + //TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO- + //TODO var sl socklen_t + //TODO if af == 10 { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{})) + //TODO } else { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in{})) + //TODO } + //TODO var i int32 + + //TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + + //TODO // Load address argument into sockaddr structure + //TODO if (af == 10) && (l == socklen_t(16)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16)) + //TODO } else if (af == 2) && (l == socklen_t(4)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4)) + //TODO } else { + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return 22 + //TODO } + + //TODO // Align buffer and check for space for pointers and ip address + //TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))) + //TODO if !(i != 0) { + //TODO i = int32(unsafe.Sizeof(uintptr(0))) + //TODO } + //TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) { + //TODO return 34 + //TODO } + //TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i))) + //TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) + + //TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + //TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf + //TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + //TODO buf += uintptr(l) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + + //TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { + //TODO case -3: + //TODO *(*int32)(unsafe.Pointer(err)) = 2 + //TODO return 11 + //TODO case -12: + //TODO return 34 + //TODO default: + //TODO fallthrough + //TODO case -10: + //TODO fallthrough + //TODO case -11: + //TODO fallthrough + //TODO case -4: + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + //TODO case 0: + //TODO break + //TODO } + + //TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af + //TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l) + //TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + //TODO *(*uintptr)(unsafe.Pointer(res)) = h + //TODO return 0 +} + +// int getrlimit(int resource, struct rlimit *rlim); +func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { + var statp uintptr + if stat != nil { + statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) + if statp == 0 { + panic("OOM") + } + + *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat + } + csp, errx := CString(path) + if errx != nil { + panic("OOM") + } + + return &fts.FTSENT{ + Ffts_info: int32(info), + Ffts_path: csp, + Ffts_pathlen: uint64(len(path)), + Ffts_statp: statp, + Ffts_errno: int32(err), + } +} + +// DIR *opendir(const char *name); +func Xopendir(t *TLS, name uintptr) uintptr { + p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{}))) + if p == 0 { + panic("OOM") + } + + fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) + if fd < 0 { + if dmesgs { + dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) + } + Xfree(t, p) + return 0 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + (*darwinDir)(unsafe.Pointer(p)).fd = fd + (*darwinDir)(unsafe.Pointer(p)).h = 0 + (*darwinDir)(unsafe.Pointer(p)).l = 0 + (*darwinDir)(unsafe.Pointer(p)).eof = false + return p +} + +// int chflags(const char *path, u_int flags); +func Xchflags(t *TLS, path uintptr, flags uint64) int32 { + if err := unix.Chflags(GoString(path), int(flags)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux.go b/vendor/modernc.org/libc/libc_linux.go index 0989c6d5..b2910d9e 100644 --- a/vendor/modernc.org/libc/libc_linux.go +++ b/vendor/modernc.org/libc/libc_linux.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "syscall" "time" @@ -259,6 +260,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) diff --git a/vendor/modernc.org/libc/libc_linux_s390x.go b/vendor/modernc.org/libc/libc_linux_s390x.go index dfb7aa2f..a877924c 100644 --- a/vendor/modernc.org/libc/libc_linux_s390x.go +++ b/vendor/modernc.org/libc/libc_linux_s390x.go @@ -452,7 +452,7 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { return 0 } -//TODO- +// TODO- func __syscall1(t *TLS, trap, p1 long) long { return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), 0, 0)) } diff --git a/vendor/modernc.org/libc/libc_netbsd.go b/vendor/modernc.org/libc/libc_netbsd.go index 0ff1e9d2..77a28cb5 100644 --- a/vendor/modernc.org/libc/libc_netbsd.go +++ b/vendor/modernc.org/libc/libc_netbsd.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "strings" "syscall" @@ -40,11 +41,6 @@ var ( in6_addr_any in.In6_addr ) -type ( - long = int64 - ulong = uint64 -) - // // Keep these outside of the var block otherwise go generate will miss them. var X__stderrp = Xstdout var X__stdinp = Xstdin @@ -314,6 +310,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) @@ -753,30 +751,6 @@ func Xfileno(t *TLS, stream uintptr) int32 { panic(todo("")) } -func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { - var statp uintptr - if stat != nil { - statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) - if statp == 0 { - panic("OOM") - } - - *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat - } - csp, errx := CString(path) - if errx != nil { - panic("OOM") - } - - return &fts.FTSENT{ - Ffts_info: uint16(info), - Ffts_path: csp, - Ffts_pathlen: uint32(len(path)), - Ffts_statp: statp, - Ffts_errno: int32(err), - } -} - func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) uintptr { p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(fts.FTSENT{}))) if p == 0 { @@ -1449,32 +1423,6 @@ func Xclosedir(t *TLS, dir uintptr) int32 { return r } -// DIR *opendir(const char *name); -func Xopendir(t *TLS, name uintptr) uintptr { - p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{}))) - if p == 0 { - panic("OOM") - } - - fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) - if fd < 0 { - if dmesgs { - dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) - } - Xfree(t, p) - return 0 - } - - if dmesgs { - dmesg("%v: ok", origin(1)) - } - (*darwinDir)(unsafe.Pointer(p)).fd = fd - (*darwinDir)(unsafe.Pointer(p)).h = 0 - (*darwinDir)(unsafe.Pointer(p)).l = 0 - (*darwinDir)(unsafe.Pointer(p)).eof = false - return p -} - // int __xuname(int namesize, void *namebuf) func X__xuname(t *TLS, namesize int32, namebuf uintptr) int32 { return Xuname(t, namebuf) @@ -1541,7 +1489,7 @@ func X__errno(t *TLS) uintptr { } func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */ - return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))) + return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & uint32(3))) } func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */ @@ -1578,7 +1526,7 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth if uint32(type1) > uint32(2) { return 22 } - (*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1)) + (*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1)) return 0 } @@ -1594,3 +1542,18 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 { } func X__srget(t *TLS, stream uintptr) int32 { return Xgetc(t, stream) } + +// uint16_t __builtin_bswap16 (uint32_t x) +func Xbswap16(t *TLS, x uint16) uint16 { + return X__builtin_bswap16(t, x) +} + +// uint32_t __builtin_bswap32 (uint32_t x) +func Xbswap32(t *TLS, x uint32) uint32 { + return X__builtin_bswap32(t, x) +} + +// uint64_t __builtin_bswap64 (uint64_t x) +func Xbswap64(t *TLS, x uint64) uint64 { + return X__builtin_bswap64(t, x) +} diff --git a/vendor/modernc.org/libc/libc_netbsd_amd64.go b/vendor/modernc.org/libc/libc_netbsd_amd64.go index 9c963d00..c418ad4f 100644 --- a/vendor/modernc.org/libc/libc_netbsd_amd64.go +++ b/vendor/modernc.org/libc/libc_netbsd_amd64.go @@ -6,15 +6,22 @@ package libc // import "modernc.org/libc" import ( "strings" + "syscall" "unsafe" "golang.org/x/sys/unix" "modernc.org/libc/fcntl" + "modernc.org/libc/fts" "modernc.org/libc/sys/types" "modernc.org/libc/time" "modernc.org/libc/utime" ) +type ( + long = int64 + ulong = uint64 +) + // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { panic(todo("")) @@ -574,3 +581,53 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { return 0 } + +func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { + var statp uintptr + if stat != nil { + statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) + if statp == 0 { + panic("OOM") + } + + *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat + } + csp, errx := CString(path) + if errx != nil { + panic("OOM") + } + + return &fts.FTSENT{ + Ffts_info: uint16(info), + Ffts_path: csp, + Ffts_pathlen: uint32(len(path)), + Ffts_statp: statp, + Ffts_errno: int32(err), + } +} + +// DIR *opendir(const char *name); +func Xopendir(t *TLS, name uintptr) uintptr { + p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{}))) + if p == 0 { + panic("OOM") + } + + fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) + if fd < 0 { + if dmesgs { + dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) + } + Xfree(t, p) + return 0 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + (*darwinDir)(unsafe.Pointer(p)).fd = fd + (*darwinDir)(unsafe.Pointer(p)).h = 0 + (*darwinDir)(unsafe.Pointer(p)).l = 0 + (*darwinDir)(unsafe.Pointer(p)).eof = false + return p +} diff --git a/vendor/modernc.org/libc/libc_netbsd_arm.go b/vendor/modernc.org/libc/libc_netbsd_arm.go new file mode 100644 index 00000000..7f10ac9c --- /dev/null +++ b/vendor/modernc.org/libc/libc_netbsd_arm.go @@ -0,0 +1,632 @@ +// Copyright 2021 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "strings" + "syscall" + "unsafe" + + "golang.org/x/sys/unix" + "modernc.org/libc/fcntl" + "modernc.org/libc/fts" + "modernc.org/libc/sys/types" + "modernc.org/libc/time" + "modernc.org/libc/utime" +) + +type ( + long = int32 + ulong = uint32 +) + +// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// FILE *fopen64(const char *pathname, const char *mode); +func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { + m := strings.ReplaceAll(GoString(mode), "b", "") + var flags int + switch m { + case "r": + flags = fcntl.O_RDONLY + case "r+": + flags = fcntl.O_RDWR + case "w": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC + case "w+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC + case "a": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND + case "a+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND + default: + panic(m) + } + fd, err := unix.Open(GoString(pathname), int(flags), 0666) + if err != nil { + if dmesgs { + dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) + } + t.setErrno(err) + return 0 + } + + if dmesgs { + dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) + } + if p := newFile(t, int32(fd)); p != 0 { + return p + } + + panic("OOM") +} + +// int lstat(const char *pathname, struct stat *statbuf); +func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int stat(const char *pathname, struct stat *statbuf); +func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int mkdir(const char *path, mode_t mode); +func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(path)) + } + return 0 +} + +// int access(const char *pathname, int mode); +func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// int unlink(const char *pathname); +func Xunlink(t *TLS, pathname uintptr) int32 { + if err := unix.Unlink(GoString(pathname)); err != nil { + if dmesgs { + dmesg("%v: %q: %v", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); +func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { + var n int + var err error + switch { + case buf == 0 || bufsize == 0: + n, err = unix.Readlink(GoString(path), nil) + default: + n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) + } + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok") + } + return types.Ssize_t(n) +} + +// int symlink(const char *target, const char *linkpath); +func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chmod(const char *pathname, mode_t mode) +func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// time_t time(time_t *tloc); +func Xtime(t *TLS, tloc uintptr) time.Time_t { + panic(todo("")) + // n := time.Now().UTC().Unix() + // if tloc != 0 { + // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) + // } + // return types.Time_t(n) +} + +// int utimes(const char *filename, const struct timeval times[2]); +func Xutimes(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) + a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: fd %d: ok", origin(1), fd) + } + return 0 +} + +// off64_t lseek64(int fd, off64_t offset, int whence); +func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { + n, err := unix.Seek(int(fd), int64(offset), int(whence)) + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return types.Off_t(n) +} + +func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) + if err != 0 { + if dmesgs { + dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) + } + return int32(n) +} + +// int rename(const char *oldpath, const char *newpath); +func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int mknod(const char *pathname, mode_t mode, dev_t dev); +func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int utime(const char *filename, const struct utimbuf *times); +func Xutime(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime + a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chown(const char *pathname, uid_t owner, gid_t group); +func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { + if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int link(const char *oldpath, const char *newpath); +func Xlink(t *TLS, oldpath, newpath uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int dup2(int oldfd, int newfd); +func Xdup2(t *TLS, oldfd, newfd int32) int32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + // if err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return int32(n) +} + +// unsigned int alarm(unsigned int seconds); +func Xalarm(t *TLS, seconds uint32) uint32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) + // if err != 0 { + // panic(todo("")) + // } + + // return uint32(n) +} + +func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(347) + //TODO defer tls.Free(347) + + //TODO // var ptr [78]int8 at bp, 78 + + //TODO // var buf [256]int8 at bp+78, 256 + + //TODO // var num [13]int8 at bp+334, 13 + + //TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + //TODO var a uintptr + //TODO var scopeid uint32 + + //TODO switch af { + //TODO case 2: + //TODO a = (sa1 + 4 /* &.sin_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) { + //TODO return -6 + //TODO } + //TODO mkptr4(tls, bp /* &ptr[0] */, a) + //TODO scopeid = uint32(0) + //TODO break + //TODO case 10: + //TODO a = (sa1 + 8 /* &.sin6_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) { + //TODO return -6 + //TODO } + //TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 { + //TODO mkptr6(tls, bp /* &ptr[0] */, a) + //TODO } else { + //TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12))) + //TODO } + //TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + //TODO break + //TODO default: + //TODO return -6 + //TODO } + + //TODO if (node != 0) && (nodelen != 0) { + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x01) != 0) { + //TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) { + //TODO Xabort(tls) //TODO- + //TODO // unsigned char query[18+PTR_MAX], reply[512]; + //TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, + //TODO // 0, 0, 0, query, sizeof query); + //TODO // query[3] = 0; /* don't need AD flag */ + //TODO // int rlen = __res_send(query, qlen, reply, sizeof reply); + //TODO // buf[0] = 0; + //TODO // if (rlen > 0) + //TODO // __dns_parse(reply, rlen, dns_parse_callback, buf); + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) { + //TODO if (flags & 0x08) != 0 { + //TODO return -2 + //TODO } + //TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{}))) + //TODO if scopeid != 0 { + //TODO Xabort(tls) //TODO- + //TODO // char *p = 0, tmp[IF_NAMESIZE+1]; + //TODO // if (!(flags & NI_NUMERICSCOPE) && + //TODO // (IN6_IS_ADDR_LINKLOCAL(a) || + //TODO // IN6_IS_ADDR_MC_LINKLOCAL(a))) + //TODO // p = if_indextoname(scopeid, tmp+1); + //TODO // if (!p) + //TODO // p = itoa(num, scopeid); + //TODO // *--p = '%'; + //TODO // strcat(buf, p); + //TODO } + //TODO } + //TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */) + //TODO } + + //TODO if (serv != 0) && (servlen != 0) { + //TODO var p uintptr = bp + 78 /* buf */ + //TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x02) != 0) { + //TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10)) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) { + //TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port)) + //TODO } + //TODO if Xstrlen(tls, p) >= size_t(servlen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, serv, p) + //TODO } + + //TODO return 0 +} + +func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(28) + //TODO defer tls.Free(28) + + //TODO //TODO union { + //TODO //TODO struct sockaddr_in sin; + //TODO //TODO struct sockaddr_in6 sin6; + //TODO //TODO } sa = { .sin.sin_family = af }; + //TODO *(*struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO })(unsafe.Pointer(bp /* sa1 */)) = struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO }{} //TODO- + //TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO- + //TODO var sl socklen_t + //TODO if af == 10 { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{})) + //TODO } else { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in{})) + //TODO } + //TODO var i int32 + + //TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + + //TODO // Load address argument into sockaddr structure + //TODO if (af == 10) && (l == socklen_t(16)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16)) + //TODO } else if (af == 2) && (l == socklen_t(4)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4)) + //TODO } else { + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return 22 + //TODO } + + //TODO // Align buffer and check for space for pointers and ip address + //TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))) + //TODO if !(i != 0) { + //TODO i = int32(unsafe.Sizeof(uintptr(0))) + //TODO } + //TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) { + //TODO return 34 + //TODO } + //TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i))) + //TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) + + //TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + //TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf + //TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + //TODO buf += uintptr(l) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + + //TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { + //TODO case -3: + //TODO *(*int32)(unsafe.Pointer(err)) = 2 + //TODO return 11 + //TODO case -12: + //TODO return 34 + //TODO default: + //TODO fallthrough + //TODO case -10: + //TODO fallthrough + //TODO case -11: + //TODO fallthrough + //TODO case -4: + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + //TODO case 0: + //TODO break + //TODO } + + //TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af + //TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l) + //TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + //TODO *(*uintptr)(unsafe.Pointer(res)) = h + //TODO return 0 +} + +// int getrlimit(int resource, struct rlimit *rlim); +func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { + var statp uintptr + if stat != nil { + statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) + if statp == 0 { + panic("OOM") + } + + *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat + } + csp, errx := CString(path) + if errx != nil { + panic("OOM") + } + + return &fts.FTSENT{ + Ffts_info: uint16(info), + Ffts_path: csp, + Ffts_pathlen: uint32(len(path)), + Ffts_statp: statp, + Ffts_errno: int32(err), + } +} + +// DIR *opendir(const char *name); +func Xopendir(t *TLS, name uintptr) uintptr { + p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{}))) + if p == 0 { + panic("OOM") + } + + fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) + if fd < 0 { + if dmesgs { + dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) + } + Xfree(t, p) + return 0 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + (*darwinDir)(unsafe.Pointer(p)).fd = fd + (*darwinDir)(unsafe.Pointer(p)).h = 0 + (*darwinDir)(unsafe.Pointer(p)).l = 0 + (*darwinDir)(unsafe.Pointer(p)).eof = false + return p +} diff --git a/vendor/modernc.org/libc/libc_openbsd.go b/vendor/modernc.org/libc/libc_openbsd.go index 0ad1a38c..62a820cd 100644 --- a/vendor/modernc.org/libc/libc_openbsd.go +++ b/vendor/modernc.org/libc/libc_openbsd.go @@ -10,6 +10,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "runtime/debug" "strings" "syscall" @@ -40,11 +41,6 @@ var ( in6_addr_any in.In6_addr ) -type ( - long = int64 - ulong = uint64 -) - // // Keep these outside of the var block otherwise go generate will miss them. var X__stderrp = Xstdout var X__stdinp = Xstdin @@ -314,6 +310,8 @@ func Xsysconf(t *TLS, name int32) long { return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 + case unistd.X_SC_NPROCESSORS_ONLN: + return long(runtime.NumCPU()) } panic(todo("", name)) @@ -753,30 +751,6 @@ func Xfileno(t *TLS, stream uintptr) int32 { panic(todo("")) } -func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { - var statp uintptr - if stat != nil { - statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) - if statp == 0 { - panic("OOM") - } - - *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat - } - csp, errx := CString(path) - if errx != nil { - panic("OOM") - } - - return &fts.FTSENT{ - Ffts_info: uint16(info), - Ffts_path: csp, - Ffts_pathlen: uint64(len(path)), - Ffts_statp: statp, - Ffts_errno: int32(err), - } -} - func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) uintptr { p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(fts.FTSENT{}))) if p == 0 { @@ -1449,32 +1423,6 @@ func Xclosedir(t *TLS, dir uintptr) int32 { return r } -// DIR *opendir(const char *name); -func Xopendir(t *TLS, name uintptr) uintptr { - p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{}))) - if p == 0 { - panic("OOM") - } - - fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) - if fd < 0 { - if dmesgs { - dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) - } - Xfree(t, p) - return 0 - } - - if dmesgs { - dmesg("%v: ok", origin(1)) - } - (*darwinDir)(unsafe.Pointer(p)).fd = fd - (*darwinDir)(unsafe.Pointer(p)).h = 0 - (*darwinDir)(unsafe.Pointer(p)).l = 0 - (*darwinDir)(unsafe.Pointer(p)).eof = false - return p -} - // int __xuname(int namesize, void *namebuf) func X__xuname(t *TLS, namesize int32, namebuf uintptr) int32 { return Xuname(t, namebuf) @@ -1541,7 +1489,7 @@ func X__errno(t *TLS) uintptr { } func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */ - return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))) + return (int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & uint32(3))) } func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */ @@ -1578,7 +1526,7 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth if uint32(type1) > uint32(2) { return 22 } - (*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1)) + (*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).F__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1)) return 0 } @@ -1631,3 +1579,20 @@ func Xpthread_mutex_init(t *TLS, pMutex, pAttr uintptr) int32 { mutexes[pMutex] = newMutex(typ) return 0 } + +// uint16_t __builtin_bswap16 (uint32_t x) +func Xbswap16(t *TLS, x uint16) uint16 { + return X__builtin_bswap16(t, x) +} + +// uint32_t __builtin_bswap32 (uint32_t x) +func Xbswap32(t *TLS, x uint32) uint32 { + return X__builtin_bswap32(t, x) +} + +// uint64_t __builtin_bswap64 (uint64_t x) +func Xbswap64(t *TLS, x uint64) uint64 { + return X__builtin_bswap64(t, x) +} + +func X__builtin_isblank(t *TLS, _c int32) int32 { return Xisblank(t, _c) } diff --git a/vendor/modernc.org/libc/libc_openbsd_386.go b/vendor/modernc.org/libc/libc_openbsd_386.go new file mode 100644 index 00000000..8c30e7b5 --- /dev/null +++ b/vendor/modernc.org/libc/libc_openbsd_386.go @@ -0,0 +1,631 @@ +// Copyright 2021 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "strings" + "syscall" + "unsafe" + + "golang.org/x/sys/unix" + "modernc.org/libc/fcntl" + "modernc.org/libc/fts" + "modernc.org/libc/sys/types" + "modernc.org/libc/time" + "modernc.org/libc/utime" +) + +type ( + long = int32 + ulong = uint32 +) + +// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// FILE *fopen64(const char *pathname, const char *mode); +func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { + m := strings.ReplaceAll(GoString(mode), "b", "") + var flags int + switch m { + case "r": + flags = fcntl.O_RDONLY + case "r+": + flags = fcntl.O_RDWR + case "w": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC + case "w+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC + case "a": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND + case "a+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND + default: + panic(m) + } + fd, err := unix.Open(GoString(pathname), int(flags), 0666) + if err != nil { + if dmesgs { + dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) + } + t.setErrno(err) + return 0 + } + + if dmesgs { + dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) + } + if p := newFile(t, int32(fd)); p != 0 { + return p + } + + panic("OOM") +} + +// int lstat(const char *pathname, struct stat *statbuf); +func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int stat(const char *pathname, struct stat *statbuf); +func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int mkdir(const char *path, mode_t mode); +func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(path)) + } + return 0 +} + +// int access(const char *pathname, int mode); +func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// int unlink(const char *pathname); +func Xunlink(t *TLS, pathname uintptr) int32 { + if err := unix.Unlink(GoString(pathname)); err != nil { + if dmesgs { + dmesg("%v: %q: %v", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); +func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { + var n int + var err error + switch { + case buf == 0 || bufsize == 0: + n, err = unix.Readlink(GoString(path), nil) + default: + n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) + } + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok") + } + return types.Ssize_t(n) +} + +// int symlink(const char *target, const char *linkpath); +func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chmod(const char *pathname, mode_t mode) +func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// time_t time(time_t *tloc); +func Xtime(t *TLS, tloc uintptr) time.Time_t { + panic(todo("")) + // n := time.Now().UTC().Unix() + // if tloc != 0 { + // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) + // } + // return types.Time_t(n) +} + +// int utimes(const char *filename, const struct timeval times[2]); +func Xutimes(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) + a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: fd %d: ok", origin(1), fd) + } + return 0 +} + +// off64_t lseek64(int fd, off64_t offset, int whence); +func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { + n, err := unix.Seek(int(fd), int64(offset), int(whence)) + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return types.Off_t(n) +} + +func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) + if err != 0 { + if dmesgs { + dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) + } + return int32(n) +} + +// int rename(const char *oldpath, const char *newpath); +func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int mknod(const char *pathname, mode_t mode, dev_t dev); +func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int utime(const char *filename, const struct utimbuf *times); +func Xutime(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0].Sec = int64((*utime.Utimbuf)(unsafe.Pointer(times)).Factime) + a[1].Sec = int64((*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime) + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chown(const char *pathname, uid_t owner, gid_t group); +func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { + if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int link(const char *oldpath, const char *newpath); +func Xlink(t *TLS, oldpath, newpath uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int dup2(int oldfd, int newfd); +func Xdup2(t *TLS, oldfd, newfd int32) int32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + // if err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return int32(n) +} + +// unsigned int alarm(unsigned int seconds); +func Xalarm(t *TLS, seconds uint32) uint32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) + // if err != 0 { + // panic(todo("")) + // } + + // return uint32(n) +} + +func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(347) + //TODO defer tls.Free(347) + + //TODO // var ptr [78]int8 at bp, 78 + + //TODO // var buf [256]int8 at bp+78, 256 + + //TODO // var num [13]int8 at bp+334, 13 + + //TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + //TODO var a uintptr + //TODO var scopeid uint32 + + //TODO switch af { + //TODO case 2: + //TODO a = (sa1 + 4 /* &.sin_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) { + //TODO return -6 + //TODO } + //TODO mkptr4(tls, bp /* &ptr[0] */, a) + //TODO scopeid = uint32(0) + //TODO break + //TODO case 10: + //TODO a = (sa1 + 8 /* &.sin6_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) { + //TODO return -6 + //TODO } + //TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 { + //TODO mkptr6(tls, bp /* &ptr[0] */, a) + //TODO } else { + //TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12))) + //TODO } + //TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + //TODO break + //TODO default: + //TODO return -6 + //TODO } + + //TODO if (node != 0) && (nodelen != 0) { + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x01) != 0) { + //TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) { + //TODO Xabort(tls) //TODO- + //TODO // unsigned char query[18+PTR_MAX], reply[512]; + //TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, + //TODO // 0, 0, 0, query, sizeof query); + //TODO // query[3] = 0; /* don't need AD flag */ + //TODO // int rlen = __res_send(query, qlen, reply, sizeof reply); + //TODO // buf[0] = 0; + //TODO // if (rlen > 0) + //TODO // __dns_parse(reply, rlen, dns_parse_callback, buf); + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) { + //TODO if (flags & 0x08) != 0 { + //TODO return -2 + //TODO } + //TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{}))) + //TODO if scopeid != 0 { + //TODO Xabort(tls) //TODO- + //TODO // char *p = 0, tmp[IF_NAMESIZE+1]; + //TODO // if (!(flags & NI_NUMERICSCOPE) && + //TODO // (IN6_IS_ADDR_LINKLOCAL(a) || + //TODO // IN6_IS_ADDR_MC_LINKLOCAL(a))) + //TODO // p = if_indextoname(scopeid, tmp+1); + //TODO // if (!p) + //TODO // p = itoa(num, scopeid); + //TODO // *--p = '%'; + //TODO // strcat(buf, p); + //TODO } + //TODO } + //TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */) + //TODO } + + //TODO if (serv != 0) && (servlen != 0) { + //TODO var p uintptr = bp + 78 /* buf */ + //TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x02) != 0) { + //TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10)) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) { + //TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port)) + //TODO } + //TODO if Xstrlen(tls, p) >= size_t(servlen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, serv, p) + //TODO } + + //TODO return 0 +} + +func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(28) + //TODO defer tls.Free(28) + + //TODO //TODO union { + //TODO //TODO struct sockaddr_in sin; + //TODO //TODO struct sockaddr_in6 sin6; + //TODO //TODO } sa = { .sin.sin_family = af }; + //TODO *(*struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO })(unsafe.Pointer(bp /* sa1 */)) = struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO }{} //TODO- + //TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO- + //TODO var sl socklen_t + //TODO if af == 10 { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{})) + //TODO } else { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in{})) + //TODO } + //TODO var i int32 + + //TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + + //TODO // Load address argument into sockaddr structure + //TODO if (af == 10) && (l == socklen_t(16)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16)) + //TODO } else if (af == 2) && (l == socklen_t(4)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4)) + //TODO } else { + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return 22 + //TODO } + + //TODO // Align buffer and check for space for pointers and ip address + //TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))) + //TODO if !(i != 0) { + //TODO i = int32(unsafe.Sizeof(uintptr(0))) + //TODO } + //TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) { + //TODO return 34 + //TODO } + //TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i))) + //TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) + + //TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + //TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf + //TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + //TODO buf += uintptr(l) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + + //TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { + //TODO case -3: + //TODO *(*int32)(unsafe.Pointer(err)) = 2 + //TODO return 11 + //TODO case -12: + //TODO return 34 + //TODO default: + //TODO fallthrough + //TODO case -10: + //TODO fallthrough + //TODO case -11: + //TODO fallthrough + //TODO case -4: + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + //TODO case 0: + //TODO break + //TODO } + + //TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af + //TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l) + //TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + //TODO *(*uintptr)(unsafe.Pointer(res)) = h + //TODO return 0 +} + +// int getrlimit(int resource, struct rlimit *rlim); +func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { + var statp uintptr + if stat != nil { + statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) + if statp == 0 { + panic("OOM") + } + + *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat + } + csp, errx := CString(path) + if errx != nil { + panic("OOM") + } + + return &fts.FTSENT{ + Ffts_info: uint16(info), + Ffts_path: csp, + Ffts_pathlen: uint32(len(path)), + Ffts_statp: statp, + Ffts_errno: int32(err), + } +} + +// DIR *opendir(const char *name); +func Xopendir(t *TLS, name uintptr) uintptr { + p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{}))) + if p == 0 { + panic("OOM") + } + + fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) + if fd < 0 { + if dmesgs { + dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) + } + Xfree(t, p) + return 0 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + (*darwinDir)(unsafe.Pointer(p)).fd = fd + (*darwinDir)(unsafe.Pointer(p)).h = 0 + (*darwinDir)(unsafe.Pointer(p)).l = 0 + (*darwinDir)(unsafe.Pointer(p)).eof = false + return p +} diff --git a/vendor/modernc.org/libc/libc_openbsd_amd64.go b/vendor/modernc.org/libc/libc_openbsd_amd64.go index 94432aef..8843f989 100644 --- a/vendor/modernc.org/libc/libc_openbsd_amd64.go +++ b/vendor/modernc.org/libc/libc_openbsd_amd64.go @@ -6,15 +6,22 @@ package libc // import "modernc.org/libc" import ( "strings" + "syscall" "unsafe" "golang.org/x/sys/unix" "modernc.org/libc/fcntl" + "modernc.org/libc/fts" "modernc.org/libc/sys/types" "modernc.org/libc/time" "modernc.org/libc/utime" ) +type ( + long = int64 + ulong = uint64 +) + // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { panic(todo("")) @@ -574,3 +581,53 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { return 0 } + +func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { + var statp uintptr + if stat != nil { + statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) + if statp == 0 { + panic("OOM") + } + + *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat + } + csp, errx := CString(path) + if errx != nil { + panic("OOM") + } + + return &fts.FTSENT{ + Ffts_info: uint16(info), + Ffts_path: csp, + Ffts_pathlen: uint64(len(path)), + Ffts_statp: statp, + Ffts_errno: int32(err), + } +} + +// DIR *opendir(const char *name); +func Xopendir(t *TLS, name uintptr) uintptr { + p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{}))) + if p == 0 { + panic("OOM") + } + + fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) + if fd < 0 { + if dmesgs { + dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) + } + Xfree(t, p) + return 0 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + (*darwinDir)(unsafe.Pointer(p)).fd = fd + (*darwinDir)(unsafe.Pointer(p)).h = 0 + (*darwinDir)(unsafe.Pointer(p)).l = 0 + (*darwinDir)(unsafe.Pointer(p)).eof = false + return p +} diff --git a/vendor/modernc.org/libc/libc_openbsd_arm64.go b/vendor/modernc.org/libc/libc_openbsd_arm64.go new file mode 100644 index 00000000..8843f989 --- /dev/null +++ b/vendor/modernc.org/libc/libc_openbsd_arm64.go @@ -0,0 +1,633 @@ +// Copyright 2021 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package libc // import "modernc.org/libc" + +import ( + "strings" + "syscall" + "unsafe" + + "golang.org/x/sys/unix" + "modernc.org/libc/fcntl" + "modernc.org/libc/fts" + "modernc.org/libc/sys/types" + "modernc.org/libc/time" + "modernc.org/libc/utime" +) + +type ( + long = int64 + ulong = uint64 +) + +// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// FILE *fopen64(const char *pathname, const char *mode); +func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { + m := strings.ReplaceAll(GoString(mode), "b", "") + var flags int + switch m { + case "r": + flags = fcntl.O_RDONLY + case "r+": + flags = fcntl.O_RDWR + case "w": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC + case "w+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC + case "a": + flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND + case "a+": + flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND + default: + panic(m) + } + fd, err := unix.Open(GoString(pathname), int(flags), 0666) + if err != nil { + if dmesgs { + dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) + } + t.setErrno(err) + return 0 + } + + if dmesgs { + dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) + } + if p := newFile(t, int32(fd)); p != 0 { + return p + } + + panic("OOM") +} + +// int lstat(const char *pathname, struct stat *statbuf); +func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int stat(const char *pathname, struct stat *statbuf); +func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { + if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(pathname)) + } + return 0 +} + +// int mkdir(const char *path, mode_t mode); +func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q: ok", origin(1), GoString(path)) + } + return 0 +} + +// int access(const char *pathname, int mode); +func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// int unlink(const char *pathname); +func Xunlink(t *TLS, pathname uintptr) int32 { + if err := unix.Unlink(GoString(pathname)); err != nil { + if dmesgs { + dmesg("%v: %q: %v", origin(1), GoString(pathname), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); +func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { + var n int + var err error + switch { + case buf == 0 || bufsize == 0: + n, err = unix.Readlink(GoString(path), nil) + default: + n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) + } + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok") + } + return types.Ssize_t(n) +} + +// int symlink(const char *target, const char *linkpath); +func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chmod(const char *pathname, mode_t mode) +func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { + if dmesgs { + dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + } + return 0 +} + +// time_t time(time_t *tloc); +func Xtime(t *TLS, tloc uintptr) time.Time_t { + panic(todo("")) + // n := time.Now().UTC().Unix() + // if tloc != 0 { + // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) + // } + // return types.Time_t(n) +} + +// int utimes(const char *filename, const struct timeval times[2]); +func Xutimes(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) + a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { + if dmesgs { + dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: fd %d: ok", origin(1), fd) + } + return 0 +} + +// off64_t lseek64(int fd, off64_t offset, int whence); +func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { + n, err := unix.Seek(int(fd), int64(offset), int(whence)) + if err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return types.Off_t(n) +} + +func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) + if err != 0 { + if dmesgs { + dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) + } + return int32(n) +} + +// int rename(const char *oldpath, const char *newpath); +func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int mknod(const char *pathname, mode_t mode, dev_t dev); +func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int utime(const char *filename, const struct utimbuf *times); +func Xutime(t *TLS, filename, times uintptr) int32 { + var a []unix.Timeval + if times != 0 { + a = make([]unix.Timeval, 2) + a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime + a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime + } + if err := unix.Utimes(GoString(filename), a); err != nil { + if dmesgs { + dmesg("%v: %v FAIL", origin(1), err) + } + t.setErrno(err) + return -1 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + return 0 +} + +// int chown(const char *pathname, uid_t owner, gid_t group); +func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { + if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +// int link(const char *oldpath, const char *newpath); +func Xlink(t *TLS, oldpath, newpath uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int dup2(int oldfd, int newfd); +func Xdup2(t *TLS, oldfd, newfd int32) int32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + // if err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return int32(n) +} + +// unsigned int alarm(unsigned int seconds); +func Xalarm(t *TLS, seconds uint32) uint32 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) + // if err != 0 { + // panic(todo("")) + // } + + // return uint32(n) +} + +// int getnameinfo(const struct sockaddr * restrict sa, socklen_t salen, char * restrict host, socklen_t hostlen, char * restrict serv, socklen_t servlen, int flags); +func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(347) + //TODO defer tls.Free(347) + + //TODO // var ptr [78]int8 at bp, 78 + + //TODO // var buf [256]int8 at bp+78, 256 + + //TODO // var num [13]int8 at bp+334, 13 + + //TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + //TODO var a uintptr + //TODO var scopeid uint32 + + //TODO switch af { + //TODO case 2: + //TODO a = (sa1 + 4 /* &.sin_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) { + //TODO return -6 + //TODO } + //TODO mkptr4(tls, bp /* &ptr[0] */, a) + //TODO scopeid = uint32(0) + //TODO break + //TODO case 10: + //TODO a = (sa1 + 8 /* &.sin6_addr */) + //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) { + //TODO return -6 + //TODO } + //TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 { + //TODO mkptr6(tls, bp /* &ptr[0] */, a) + //TODO } else { + //TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12))) + //TODO } + //TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + //TODO break + //TODO default: + //TODO return -6 + //TODO } + + //TODO if (node != 0) && (nodelen != 0) { + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x01) != 0) { + //TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) { + //TODO Xabort(tls) //TODO- + //TODO // unsigned char query[18+PTR_MAX], reply[512]; + //TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, + //TODO // 0, 0, 0, query, sizeof query); + //TODO // query[3] = 0; /* don't need AD flag */ + //TODO // int rlen = __res_send(query, qlen, reply, sizeof reply); + //TODO // buf[0] = 0; + //TODO // if (rlen > 0) + //TODO // __dns_parse(reply, rlen, dns_parse_callback, buf); + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) { + //TODO if (flags & 0x08) != 0 { + //TODO return -2 + //TODO } + //TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{}))) + //TODO if scopeid != 0 { + //TODO Xabort(tls) //TODO- + //TODO // char *p = 0, tmp[IF_NAMESIZE+1]; + //TODO // if (!(flags & NI_NUMERICSCOPE) && + //TODO // (IN6_IS_ADDR_LINKLOCAL(a) || + //TODO // IN6_IS_ADDR_MC_LINKLOCAL(a))) + //TODO // p = if_indextoname(scopeid, tmp+1); + //TODO // if (!p) + //TODO // p = itoa(num, scopeid); + //TODO // *--p = '%'; + //TODO // strcat(buf, p); + //TODO } + //TODO } + //TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */) + //TODO } + + //TODO if (serv != 0) && (servlen != 0) { + //TODO var p uintptr = bp + 78 /* buf */ + //TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) + //TODO if !((flags & 0x02) != 0) { + //TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10)) + //TODO } + //TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) { + //TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port)) + //TODO } + //TODO if Xstrlen(tls, p) >= size_t(servlen) { + //TODO return -12 + //TODO } + //TODO Xstrcpy(tls, serv, p) + //TODO } + + //TODO return 0 +} + +func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */ + panic(todo("")) + //TODO bp := tls.Alloc(28) + //TODO defer tls.Free(28) + + //TODO //TODO union { + //TODO //TODO struct sockaddr_in sin; + //TODO //TODO struct sockaddr_in6 sin6; + //TODO //TODO } sa = { .sin.sin_family = af }; + //TODO *(*struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO })(unsafe.Pointer(bp /* sa1 */)) = struct { + //TODO sin sockaddr_in + //TODO _ [12]byte + //TODO }{} //TODO- + //TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO- + //TODO var sl socklen_t + //TODO if af == 10 { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{})) + //TODO } else { + //TODO sl = uint32(unsafe.Sizeof(sockaddr_in{})) + //TODO } + //TODO var i int32 + + //TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + + //TODO // Load address argument into sockaddr structure + //TODO if (af == 10) && (l == socklen_t(16)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16)) + //TODO } else if (af == 2) && (l == socklen_t(4)) { + //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4)) + //TODO } else { + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return 22 + //TODO } + + //TODO // Align buffer and check for space for pointers and ip address + //TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))) + //TODO if !(i != 0) { + //TODO i = int32(unsafe.Sizeof(uintptr(0))) + //TODO } + //TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) { + //TODO return 34 + //TODO } + //TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i))) + //TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) + + //TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + //TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf + //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) + + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf + //TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + //TODO buf += uintptr(l) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf + //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + + //TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { + //TODO case -3: + //TODO *(*int32)(unsafe.Pointer(err)) = 2 + //TODO return 11 + //TODO case -12: + //TODO return 34 + //TODO default: + //TODO fallthrough + //TODO case -10: + //TODO fallthrough + //TODO case -11: + //TODO fallthrough + //TODO case -4: + //TODO *(*int32)(unsafe.Pointer(err)) = 3 + //TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + //TODO case 0: + //TODO break + //TODO } + + //TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af + //TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l) + //TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + //TODO *(*uintptr)(unsafe.Pointer(res)) = h + //TODO return 0 +} + +// int getrlimit(int resource, struct rlimit *rlim); +func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} + +func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) { + var statp uintptr + if stat != nil { + statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) + if statp == 0 { + panic("OOM") + } + + *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat + } + csp, errx := CString(path) + if errx != nil { + panic("OOM") + } + + return &fts.FTSENT{ + Ffts_info: uint16(info), + Ffts_path: csp, + Ffts_pathlen: uint64(len(path)), + Ffts_statp: statp, + Ffts_errno: int32(err), + } +} + +// DIR *opendir(const char *name); +func Xopendir(t *TLS, name uintptr) uintptr { + p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{}))) + if p == 0 { + panic("OOM") + } + + fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) + if fd < 0 { + if dmesgs { + dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) + } + Xfree(t, p) + return 0 + } + + if dmesgs { + dmesg("%v: ok", origin(1)) + } + (*darwinDir)(unsafe.Pointer(p)).fd = fd + (*darwinDir)(unsafe.Pointer(p)).h = 0 + (*darwinDir)(unsafe.Pointer(p)).l = 0 + (*darwinDir)(unsafe.Pointer(p)).eof = false + return p +} diff --git a/vendor/modernc.org/libc/libc_windows.go b/vendor/modernc.org/libc/libc_windows.go index 6a6e81f9..dc947a55 100644 --- a/vendor/modernc.org/libc/libc_windows.go +++ b/vendor/modernc.org/libc/libc_windows.go @@ -446,9 +446,11 @@ func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { } // int _wopen( -// const wchar_t *filename, -// int oflag [, -// int pmode] +// +// const wchar_t *filename, +// int oflag [, +// int pmode] +// // ); func X_wopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { var mode types.Mode_t @@ -617,9 +619,11 @@ func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 { } // int _read( // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/read?view=msvc-160 -// int const fd, -// void * const buffer, -// unsigned const buffer_size +// +// int const fd, +// void * const buffer, +// unsigned const buffer_size +// // ); func Xread(t *TLS, fd int32, buf uintptr, count uint32) int32 { f, ok := fdToFile(fd) @@ -643,9 +647,11 @@ func Xread(t *TLS, fd int32, buf uintptr, count uint32) int32 { } // int _write( // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/write?view=msvc-160 -// int fd, -// const void *buffer, -// unsigned int count +// +// int fd, +// const void *buffer, +// unsigned int count +// // ); func Xwrite(t *TLS, fd int32, buf uintptr, count uint32) int32 { f, ok := fdToFile(fd) @@ -1878,7 +1884,9 @@ func X__acrt_iob_func(t *TLS, fd uint32) uintptr { } // BOOL SetEvent( -// HANDLE hEvent +// +// HANDLE hEvent +// // ); func XSetEvent(t *TLS, hEvent uintptr) int32 { r0, _, err := syscall.Syscall(procSetEvent.Addr(), 1, hEvent, 0, 0) @@ -1889,8 +1897,10 @@ func XSetEvent(t *TLS, hEvent uintptr) int32 { } // int _stricmp( -// const char *string1, -// const char *string2 +// +// const char *string1, +// const char *string2 +// // ); func X_stricmp(t *TLS, string1, string2 uintptr) int32 { var s1 = strings.ToLower(GoString(string1)) @@ -1899,9 +1909,11 @@ func X_stricmp(t *TLS, string1, string2 uintptr) int32 { } // BOOL HeapFree( -// HANDLE hHeap, -// DWORD dwFlags, -// _Frees_ptr_opt_ LPVOID lpMem +// +// HANDLE hHeap, +// DWORD dwFlags, +// _Frees_ptr_opt_ LPVOID lpMem +// // ); func XHeapFree(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) int32 { r0, _, err := syscall.Syscall(procHeapFree.Addr(), 3, hHeap, uintptr(dwFlags), lpMem) @@ -1921,9 +1933,11 @@ func XGetProcessHeap(t *TLS) uintptr { } // LPVOID HeapAlloc( -// HANDLE hHeap, -// DWORD dwFlags, -// SIZE_T dwBytes +// +// HANDLE hHeap, +// DWORD dwFlags, +// SIZE_T dwBytes +// // ); func XHeapAlloc(t *TLS, hHeap uintptr, dwFlags uint32, dwBytes types.Size_t) uintptr { r0, _, err := syscall.Syscall(procHeapAlloc.Addr(), 3, hHeap, uintptr(dwFlags), uintptr(dwBytes)) @@ -1934,33 +1948,41 @@ func XHeapAlloc(t *TLS, hHeap uintptr, dwFlags uint32, dwBytes types.Size_t) uin } // WCHAR * gai_strerrorW( -// int ecode +// +// int ecode +// // ); func Xgai_strerrorW(t *TLS, _ ...interface{}) uintptr { panic(todo("")) } // servent * getservbyname( -// const char *name, -// const char *proto +// +// const char *name, +// const char *proto +// // ); func Xgetservbyname(t *TLS, _ ...interface{}) uintptr { panic(todo("")) } // INT WSAAPI getaddrinfo( -// PCSTR pNodeName, -// PCSTR pServiceName, -// const ADDRINFOA *pHints, -// PADDRINFOA *ppResult +// +// PCSTR pNodeName, +// PCSTR pServiceName, +// const ADDRINFOA *pHints, +// PADDRINFOA *ppResult +// // ); func XWspiapiGetAddrInfo(t *TLS, _ ...interface{}) int32 { panic(todo("")) } // int wcscmp( -// const wchar_t *string1, -// const wchar_t *string2 +// +// const wchar_t *string1, +// const wchar_t *string2 +// // ); func Xwcscmp(t *TLS, string1, string2 uintptr) int32 { var s1 = goWideString(string1) @@ -1978,7 +2000,9 @@ func XExitProcess(t *TLS, _ ...interface{}) int32 { } // BOOL GetVersionExW( -// LPOSVERSIONINFOW lpVersionInformation +// +// LPOSVERSIONINFOW lpVersionInformation +// // ); func XGetVersionExW(t *TLS, lpVersionInformation uintptr) int32 { r0, _, err := syscall.Syscall(procGetVersionExW.Addr(), 1, lpVersionInformation, 0, 0) @@ -1989,16 +2013,20 @@ func XGetVersionExW(t *TLS, lpVersionInformation uintptr) int32 { } // BOOL GetVolumeNameForVolumeMountPointW( -// LPCWSTR lpszVolumeMountPoint, -// LPWSTR lpszVolumeName, -// DWORD cchBufferLength +// +// LPCWSTR lpszVolumeMountPoint, +// LPWSTR lpszVolumeName, +// DWORD cchBufferLength +// // ); func XGetVolumeNameForVolumeMountPointW(t *TLS, _ ...interface{}) int32 { panic(todo("")) } // size_t wcslen( -// const wchar_t *str +// +// const wchar_t *str +// // ); func Xwcslen(t *TLS, str uintptr) types.Size_t { r0, _, _ := syscall.Syscall(procLstrlenW.Addr(), 1, str, 0, 0) @@ -2006,7 +2034,9 @@ func Xwcslen(t *TLS, str uintptr) types.Size_t { } // HANDLE WINAPI GetStdHandle( -// _In_ DWORD nStdHandle +// +// _In_ DWORD nStdHandle +// // ); func XGetStdHandle(t *TLS, nStdHandle uint32) uintptr { h, err := syscall.GetStdHandle(int(nStdHandle)) @@ -2017,7 +2047,9 @@ func XGetStdHandle(t *TLS, nStdHandle uint32) uintptr { } // BOOL CloseHandle( -// HANDLE hObject +// +// HANDLE hObject +// // ); func XCloseHandle(t *TLS, hObject uintptr) int32 { r := syscall.CloseHandle(syscall.Handle(hObject)) @@ -2037,10 +2069,12 @@ func XGetLastError(t *TLS) uint32 { } // DWORD SetFilePointer( -// HANDLE hFile, -// LONG lDistanceToMove, -// PLONG lpDistanceToMoveHigh, -// DWORD dwMoveMethod +// +// HANDLE hFile, +// LONG lDistanceToMove, +// PLONG lpDistanceToMoveHigh, +// DWORD dwMoveMethod +// // ); func XSetFilePointer(t *TLS, hFile uintptr, lDistanceToMove long, lpDistanceToMoveHigh uintptr, dwMoveMethod uint32) uint32 { r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, hFile, uintptr(lDistanceToMove), lpDistanceToMoveHigh, uintptr(dwMoveMethod), 0, 0) @@ -2056,7 +2090,9 @@ func XSetFilePointer(t *TLS, hFile uintptr, lDistanceToMove long, lpDistanceToMo } // BOOL SetEndOfFile( -// HANDLE hFile +// +// HANDLE hFile +// // ); func XSetEndOfFile(t *TLS, hFile uintptr) int32 { err := syscall.SetEndOfFile(syscall.Handle(hFile)) @@ -2068,11 +2104,13 @@ func XSetEndOfFile(t *TLS, hFile uintptr) int32 { } // BOOL ReadFile( -// HANDLE hFile, -// LPVOID lpBuffer, -// DWORD nNumberOfBytesToRead, -// LPDWORD lpNumberOfBytesRead, -// LPOVERLAPPED lpOverlapped +// +// HANDLE hFile, +// LPVOID lpBuffer, +// DWORD nNumberOfBytesToRead, +// LPDWORD lpNumberOfBytesRead, +// LPOVERLAPPED lpOverlapped +// // ); func XReadFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToRead uint32, lpNumberOfBytesRead, lpOverlapped uintptr) int32 { r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, @@ -2089,11 +2127,13 @@ func XReadFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToRead uint32, lpN } // BOOL WriteFile( -// HANDLE hFile, -// LPCVOID lpBuffer, -// DWORD nNumberOfBytesToWrite, -// LPDWORD lpNumberOfBytesWritten, -// LPOVERLAPPED lpOverlapped +// +// HANDLE hFile, +// LPCVOID lpBuffer, +// DWORD nNumberOfBytesToWrite, +// LPDWORD lpNumberOfBytesWritten, +// LPOVERLAPPED lpOverlapped +// // ); func XWriteFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToWrite uint32, lpNumberOfBytesWritten, lpOverlapped uintptr) int32 { r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, @@ -2110,7 +2150,9 @@ func XWriteFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToWrite uint32, l } // DWORD GetFileAttributesW( -// LPCWSTR lpFileName +// +// LPCWSTR lpFileName +// // ); func XGetFileAttributesW(t *TLS, lpFileName uintptr) uint32 { attrs, err := syscall.GetFileAttributes((*uint16)(unsafe.Pointer(lpFileName))) @@ -2125,13 +2167,15 @@ func XGetFileAttributesW(t *TLS, lpFileName uintptr) uint32 { } // HANDLE CreateFileW( -// LPCWSTR lpFileName, -// DWORD dwDesiredAccess, -// DWORD dwShareMode, -// LPSECURITY_ATTRIBUTES lpSecurityAttributes, -// DWORD dwCreationDisposition, -// DWORD dwFlagsAndAttributes, -// HANDLE hTemplateFile +// +// LPCWSTR lpFileName, +// DWORD dwDesiredAccess, +// DWORD dwShareMode, +// LPSECURITY_ATTRIBUTES lpSecurityAttributes, +// DWORD dwCreationDisposition, +// DWORD dwFlagsAndAttributes, +// HANDLE hTemplateFile +// // ); func XCreateFileW(t *TLS, lpFileName uintptr, dwDesiredAccess, dwShareMode uint32, lpSecurityAttributes uintptr, dwCreationDisposition, dwFlagsAndAttributes uint32, hTemplateFile uintptr) uintptr { @@ -2150,13 +2194,15 @@ func XCreateFileW(t *TLS, lpFileName uintptr, dwDesiredAccess, dwShareMode uint3 } // BOOL DuplicateHandle( -// HANDLE hSourceProcessHandle, -// HANDLE hSourceHandle, -// HANDLE hTargetProcessHandle, -// LPHANDLE lpTargetHandle, -// DWORD dwDesiredAccess, -// BOOL bInheritHandle, -// DWORD dwOptions +// +// HANDLE hSourceProcessHandle, +// HANDLE hSourceHandle, +// HANDLE hTargetProcessHandle, +// LPHANDLE lpTargetHandle, +// DWORD dwDesiredAccess, +// BOOL bInheritHandle, +// DWORD dwOptions +// // ); func XDuplicateHandle(t *TLS, hSourceProcessHandle, hSourceHandle, hTargetProcessHandle, lpTargetHandle uintptr, dwDesiredAccess uint32, bInheritHandle int32, dwOptions uint32) int32 { r0, _, err := syscall.Syscall9(procDuplicateHandle.Addr(), 7, hSourceProcessHandle, hSourceHandle, hTargetProcessHandle, @@ -2181,7 +2227,9 @@ func XGetCurrentProcess(t *TLS) uintptr { } // BOOL FlushFileBuffers( -// HANDLE hFile +// +// HANDLE hFile +// // ); func XFlushFileBuffers(t *TLS, hFile uintptr) int32 { err := syscall.FlushFileBuffers(syscall.Handle(hFile)) @@ -2194,7 +2242,9 @@ func XFlushFileBuffers(t *TLS, hFile uintptr) int32 { } // DWORD GetFileType( -// HANDLE hFile +// +// HANDLE hFile +// // ); func XGetFileType(t *TLS, hFile uintptr) uint32 { n, err := syscall.GetFileType(syscall.Handle(hFile)) @@ -2205,8 +2255,10 @@ func XGetFileType(t *TLS, hFile uintptr) uint32 { } // BOOL WINAPI GetConsoleMode( -// _In_ HANDLE hConsoleHandle, -// _Out_ LPDWORD lpMode +// +// _In_ HANDLE hConsoleHandle, +// _Out_ LPDWORD lpMode +// // ); func XGetConsoleMode(t *TLS, hConsoleHandle, lpMode uintptr) int32 { err := syscall.GetConsoleMode(syscall.Handle(hConsoleHandle), (*uint32)(unsafe.Pointer(lpMode))) @@ -2218,8 +2270,10 @@ func XGetConsoleMode(t *TLS, hConsoleHandle, lpMode uintptr) int32 { } // BOOL GetCommState( -// HANDLE hFile, -// LPDCB lpDCB +// +// HANDLE hFile, +// LPDCB lpDCB +// // ); func XGetCommState(t *TLS, hFile, lpDCB uintptr) int32 { r1, _, err := syscall.Syscall(procGetCommState.Addr(), 2, hFile, lpDCB, 0) @@ -2231,9 +2285,11 @@ func XGetCommState(t *TLS, hFile, lpDCB uintptr) int32 { } // int _wcsnicmp( -// const wchar_t *string1, -// const wchar_t *string2, -// size_t count +// +// const wchar_t *string1, +// const wchar_t *string2, +// size_t count +// // ); func X_wcsnicmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 { @@ -2259,11 +2315,13 @@ func X_wcsnicmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 { } // BOOL WINAPI ReadConsole( -// _In_ HANDLE hConsoleInput, -// _Out_ LPVOID lpBuffer, -// _In_ DWORD nNumberOfCharsToRead, -// _Out_ LPDWORD lpNumberOfCharsRead, -// _In_opt_ LPVOID pInputControl +// +// _In_ HANDLE hConsoleInput, +// _Out_ LPVOID lpBuffer, +// _In_ DWORD nNumberOfCharsToRead, +// _Out_ LPDWORD lpNumberOfCharsRead, +// _In_opt_ LPVOID pInputControl +// // ); func XReadConsoleW(t *TLS, hConsoleInput, lpBuffer uintptr, nNumberOfCharsToRead uint32, lpNumberOfCharsRead, pInputControl uintptr) int32 { @@ -2277,11 +2335,13 @@ func XReadConsoleW(t *TLS, hConsoleInput, lpBuffer uintptr, nNumberOfCharsToRead } // BOOL WINAPI WriteConsoleW( -// _In_ HANDLE hConsoleOutput, -// _In_ const VOID *lpBuffer, -// _In_ DWORD nNumberOfCharsToWrite, -// _Out_opt_ LPDWORD lpNumberOfCharsWritten, -// _Reserved_ LPVOID lpReserved +// +// _In_ HANDLE hConsoleOutput, +// _In_ const VOID *lpBuffer, +// _In_ DWORD nNumberOfCharsToWrite, +// _Out_opt_ LPDWORD lpNumberOfCharsWritten, +// _Reserved_ LPVOID lpReserved +// // ); func XWriteConsoleW(t *TLS, hConsoleOutput, lpBuffer uintptr, nNumberOfCharsToWrite uint32, lpNumberOfCharsWritten, lpReserved uintptr) int32 { rv, _, err := syscall.Syscall6(procWriteConsoleW.Addr(), 5, hConsoleOutput, @@ -2293,8 +2353,10 @@ func XWriteConsoleW(t *TLS, hConsoleOutput, lpBuffer uintptr, nNumberOfCharsToWr } // DWORD WaitForSingleObject( -// HANDLE hHandle, -// DWORD dwMilliseconds +// +// HANDLE hHandle, +// DWORD dwMilliseconds +// // ); func XWaitForSingleObject(t *TLS, hHandle uintptr, dwMilliseconds uint32) uint32 { rv, err := syscall.WaitForSingleObject(syscall.Handle(hHandle), dwMilliseconds) @@ -2305,7 +2367,9 @@ func XWaitForSingleObject(t *TLS, hHandle uintptr, dwMilliseconds uint32) uint32 } // BOOL ResetEvent( -// HANDLE hEvent +// +// HANDLE hEvent +// // ); func XResetEvent(t *TLS, hEvent uintptr) int32 { rv, _, err := syscall.Syscall(procResetEvent.Addr(), 1, hEvent, 0, 0) @@ -2316,10 +2380,12 @@ func XResetEvent(t *TLS, hEvent uintptr) int32 { } // BOOL WINAPI PeekConsoleInput( -// _In_ HANDLE hConsoleInput, -// _Out_ PINPUT_RECORD lpBuffer, -// _In_ DWORD nLength, -// _Out_ LPDWORD lpNumberOfEventsRead +// +// _In_ HANDLE hConsoleInput, +// _Out_ PINPUT_RECORD lpBuffer, +// _In_ DWORD nLength, +// _Out_ LPDWORD lpNumberOfEventsRead +// // ); func XPeekConsoleInputW(t *TLS, hConsoleInput, lpBuffer uintptr, nLength uint32, lpNumberOfEventsRead uintptr) int32 { r0, _, err := syscall.Syscall6(procPeekConsoleInputW.Addr(), 4, hConsoleInput, lpBuffer, uintptr(nLength), lpNumberOfEventsRead, 0, 0) @@ -2330,9 +2396,11 @@ func XPeekConsoleInputW(t *TLS, hConsoleInput, lpBuffer uintptr, nLength uint32, } // int WINAPIV wsprintfA( -// LPSTR , -// LPCSTR , -// ... +// +// LPSTR , +// LPCSTR , +// ... +// // ); func XwsprintfA(t *TLS, buf, format, args uintptr) int32 { return Xsprintf(t, buf, format, args) @@ -2358,10 +2426,12 @@ func XGetConsoleCP(t *TLS) uint32 { //} // HANDLE CreateEventW( -// LPSECURITY_ATTRIBUTES lpEventAttributes, -// BOOL bManualReset, -// BOOL bInitialState, -// LPCWSTR lpName +// +// LPSECURITY_ATTRIBUTES lpEventAttributes, +// BOOL bManualReset, +// BOOL bInitialState, +// LPCWSTR lpName +// // ); func XCreateEventW(t *TLS, lpEventAttributes uintptr, bManualReset, bInitialState int32, lpName uintptr) uintptr { r0, _, err := syscall.Syscall6(procCreateEventW.Addr(), 4, lpEventAttributes, uintptr(bManualReset), @@ -2395,12 +2465,14 @@ func ThreadProc(p uintptr) uintptr { } // HANDLE CreateThread( -// LPSECURITY_ATTRIBUTES lpThreadAttributes, -// SIZE_T dwStackSize, -// LPTHREAD_START_ROUTINE lpStartAddress, -// __drv_aliasesMem LPVOID lpParameter, -// DWORD dwCreationFlags, -// LPDWORD lpThreadId +// +// LPSECURITY_ATTRIBUTES lpThreadAttributes, +// SIZE_T dwStackSize, +// LPTHREAD_START_ROUTINE lpStartAddress, +// __drv_aliasesMem LPVOID lpParameter, +// DWORD dwCreationFlags, +// LPDWORD lpThreadId +// // ); func XCreateThread(t *TLS, lpThreadAttributes uintptr, dwStackSize types.Size_t, lpStartAddress, lpParameter uintptr, dwCreationFlags uint32, lpThreadId uintptr) uintptr { f := (*struct{ f func(*TLS, uintptr) uint32 })(unsafe.Pointer(&struct{ uintptr }{lpStartAddress})).f @@ -2416,8 +2488,10 @@ func XCreateThread(t *TLS, lpThreadAttributes uintptr, dwStackSize types.Size_t, } // BOOL SetThreadPriority( -// HANDLE hThread, -// int nPriority +// +// HANDLE hThread, +// int nPriority +// // ); func XSetThreadPriority(t *TLS, hThread uintptr, nPriority int32) int32 { @@ -2430,8 +2504,10 @@ func XSetThreadPriority(t *TLS, hThread uintptr, nPriority int32) int32 { } // BOOL WINAPI SetConsoleMode( -// _In_ HANDLE hConsoleHandle, -// _In_ DWORD dwMode +// +// _In_ HANDLE hConsoleHandle, +// _In_ DWORD dwMode +// // ); func XSetConsoleMode(t *TLS, hConsoleHandle uintptr, dwMode uint32) int32 { rv, _, err := syscall.Syscall(procSetConsoleMode.Addr(), 2, hConsoleHandle, uintptr(dwMode), 0) @@ -2450,21 +2526,27 @@ func XClearCommError(t *TLS, _ ...interface{}) int32 { } // void DeleteCriticalSection( -// LPCRITICAL_SECTION lpCriticalSection +// +// LPCRITICAL_SECTION lpCriticalSection +// // ); func XDeleteCriticalSection(t *TLS, lpCriticalSection uintptr) { syscall.Syscall(procDeleteCriticalSection.Addr(), 1, lpCriticalSection, 0, 0) } // void EnterCriticalSection( -// LPCRITICAL_SECTION lpCriticalSection +// +// LPCRITICAL_SECTION lpCriticalSection +// // ); func XEnterCriticalSection(t *TLS, lpCriticalSection uintptr) { syscall.Syscall(procEnterCriticalSection.Addr(), 1, lpCriticalSection, 0, 0) } // void LeaveCriticalSection( -// LPCRITICAL_SECTION lpCriticalSection +// +// LPCRITICAL_SECTION lpCriticalSection +// // ); func XLeaveCriticalSection(t *TLS, lpCriticalSection uintptr) { syscall.Syscall(procLeaveCriticalSection.Addr(), 1, lpCriticalSection, 0, 0) @@ -2483,7 +2565,9 @@ func XSetCommTimeouts(t *TLS, _ ...interface{}) int32 { } // void InitializeCriticalSection( -// LPCRITICAL_SECTION lpCriticalSection +// +// LPCRITICAL_SECTION lpCriticalSection +// // ); func XInitializeCriticalSection(t *TLS, lpCriticalSection uintptr) { // InitializeCriticalSection always succeeds, even in low memory situations. @@ -2511,8 +2595,10 @@ func XGetCommModemStatus(t *TLS, _ ...interface{}) int32 { } // BOOL MoveFileW( -// LPCWSTR lpExistingFileName, -// LPCWSTR lpNewFileName +// +// LPCWSTR lpExistingFileName, +// LPCWSTR lpNewFileName +// // ); func XMoveFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr) int32 { r0, _, err := syscall.Syscall(procMoveFileW.Addr(), 2, lpExistingFileName, lpNewFileName, 0) @@ -2523,10 +2609,12 @@ func XMoveFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr) int32 { } // DWORD GetFullPathNameW( -// LPCWSTR lpFileName, -// DWORD nBufferLength, -// LPWSTR lpBuffer, -// LPWSTR *lpFilePart +// +// LPCWSTR lpFileName, +// DWORD nBufferLength, +// LPWSTR lpBuffer, +// LPWSTR *lpFilePart +// // ); func XGetFullPathNameW(t *TLS, lpFileName uintptr, nBufferLength uint32, lpBuffer, lpFilePart uintptr) uint32 { r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, lpFileName, uintptr(nBufferLength), uintptr(lpBuffer), uintptr(lpFilePart), 0, 0) @@ -2542,15 +2630,19 @@ func XGetFullPathNameW(t *TLS, lpFileName uintptr, nBufferLength uint32, lpBuffe } // LPWSTR CharLowerW( -// LPWSTR lpsz +// +// LPWSTR lpsz +// // ); func XCharLowerW(t *TLS, lpsz uintptr) uintptr { panic(todo("")) } // BOOL CreateDirectoryW( -// LPCWSTR lpPathName, -// LPSECURITY_ATTRIBUTES lpSecurityAttributes +// +// LPCWSTR lpPathName, +// LPSECURITY_ATTRIBUTES lpSecurityAttributes +// // ); func XCreateDirectoryW(t *TLS, lpPathName, lpSecurityAttributes uintptr) int32 { err := syscall.CreateDirectory((*uint16)(unsafe.Pointer(lpPathName)), @@ -2563,8 +2655,10 @@ func XCreateDirectoryW(t *TLS, lpPathName, lpSecurityAttributes uintptr) int32 { } // BOOL SetFileAttributesW( -// LPCWSTR lpFileName, -// DWORD dwFileAttributes +// +// LPCWSTR lpFileName, +// DWORD dwFileAttributes +// // ); func XSetFileAttributesW(t *TLS, lpFileName uintptr, dwFileAttributes uint32) int32 { err := syscall.SetFileAttributes((*uint16)(unsafe.Pointer(lpFileName)), dwFileAttributes) @@ -2576,10 +2670,12 @@ func XSetFileAttributesW(t *TLS, lpFileName uintptr, dwFileAttributes uint32) in } // UINT GetTempFileNameW( -// LPCWSTR lpPathName, -// LPCWSTR lpPrefixString, -// UINT uUnique, -// LPWSTR lpTempFileName +// +// LPCWSTR lpPathName, +// LPCWSTR lpPrefixString, +// UINT uUnique, +// LPWSTR lpTempFileName +// // ); func XGetTempFileNameW(t *TLS, lpPathName, lpPrefixString uintptr, uUnique uint32, lpTempFileName uintptr) uint32 { r0, _, e1 := syscall.Syscall6(procGetTempFileNameW.Addr(), 4, lpPathName, lpPrefixString, uintptr(uUnique), lpTempFileName, 0, 0) @@ -2590,9 +2686,11 @@ func XGetTempFileNameW(t *TLS, lpPathName, lpPrefixString uintptr, uUnique uint3 } // BOOL CopyFileW( -// LPCWSTR lpExistingFileName, -// LPCWSTR lpNewFileName, -// BOOL bFailIfExists +// +// LPCWSTR lpExistingFileName, +// LPCWSTR lpNewFileName, +// BOOL bFailIfExists +// // ); func XCopyFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr, bFailIfExists int32) int32 { r0, _, e1 := syscall.Syscall(procCopyFileW.Addr(), 3, lpExistingFileName, lpNewFileName, uintptr(bFailIfExists)) @@ -2603,7 +2701,9 @@ func XCopyFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr, bFailIfExists } // BOOL DeleteFileW( -// LPCWSTR lpFileName +// +// LPCWSTR lpFileName +// // ); func XDeleteFileW(t *TLS, lpFileName uintptr) int32 { err := syscall.DeleteFile((*uint16)(unsafe.Pointer(lpFileName))) @@ -2615,7 +2715,9 @@ func XDeleteFileW(t *TLS, lpFileName uintptr) int32 { } // BOOL RemoveDirectoryW( -// LPCWSTR lpPathName +// +// LPCWSTR lpPathName +// // ); func XRemoveDirectoryW(t *TLS, lpPathName uintptr) int32 { err := syscall.RemoveDirectory((*uint16)(unsafe.Pointer(lpPathName))) @@ -2641,12 +2743,14 @@ func XFindFirstFileW(t *TLS, lpFileName, lpFindFileData uintptr) uintptr { } // HANDLE FindFirstFileExW( -// LPCWSTR lpFileName, -// FINDEX_INFO_LEVELS fInfoLevelId, -// LPVOID lpFindFileData, -// FINDEX_SEARCH_OPS fSearchOp, -// LPVOID lpSearchFilter, -// DWORD dwAdditionalFlags +// +// LPCWSTR lpFileName, +// FINDEX_INFO_LEVELS fInfoLevelId, +// LPVOID lpFindFileData, +// FINDEX_SEARCH_OPS fSearchOp, +// LPVOID lpSearchFilter, +// DWORD dwAdditionalFlags +// // ); func XFindFirstFileExW(t *TLS, lpFileName uintptr, fInfoLevelId int32, lpFindFileData uintptr, fSearchOp int32, lpSearchFilter uintptr, dwAdditionalFlags uint32) uintptr { r0, _, e1 := syscall.Syscall6(procFindFirstFileExW.Addr(), 6, lpFileName, uintptr(fInfoLevelId), lpFindFileData, uintptr(fSearchOp), lpSearchFilter, uintptr(dwAdditionalFlags)) @@ -2675,8 +2779,10 @@ func XFindClose(t *TLS, hFindFile uintptr) int32 { } // BOOL FindNextFileW( -// HANDLE hFindFile, -// LPWIN32_FIND_DATAW lpFindFileData +// +// HANDLE hFindFile, +// LPWIN32_FIND_DATAW lpFindFileData +// // ); func XFindNextFileW(t *TLS, hFindFile, lpFindFileData uintptr) int32 { r0, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, hFindFile, lpFindFileData, 0) @@ -2691,8 +2797,10 @@ func XFindNextFileW(t *TLS, hFindFile, lpFindFileData uintptr) int32 { } // DWORD GetLogicalDriveStringsA( -// DWORD nBufferLength, -// LPSTR lpBuffer +// +// DWORD nBufferLength, +// LPSTR lpBuffer +// // ); func XGetLogicalDriveStringsA(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 { r0, _, err := syscall.Syscall(procGetLogicalDriveStringsA.Addr(), 2, uintptr(nBufferLength), lpBuffer, 0) @@ -2703,14 +2811,16 @@ func XGetLogicalDriveStringsA(t *TLS, nBufferLength uint32, lpBuffer uintptr) ui } // BOOL GetVolumeInformationA( -// LPCSTR lpRootPathName, -// LPSTR lpVolumeNameBuffer, -// DWORD nVolumeNameSize, -// LPDWORD lpVolumeSerialNumber, -// LPDWORD lpMaximumComponentLength, -// LPDWORD lpFileSystemFlags, -// LPSTR lpFileSystemNameBuffer, -// DWORD nFileSystemNameSize +// +// LPCSTR lpRootPathName, +// LPSTR lpVolumeNameBuffer, +// DWORD nVolumeNameSize, +// LPDWORD lpVolumeSerialNumber, +// LPDWORD lpMaximumComponentLength, +// LPDWORD lpFileSystemFlags, +// LPSTR lpFileSystemNameBuffer, +// DWORD nFileSystemNameSize +// // ); func XGetVolumeInformationA(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr, nVolumeNameSize uint32, lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags, lpFileSystemNameBuffer uintptr, nFileSystemNameSize uint32) int32 { r0, _, err := syscall.Syscall9(procGetVolumeInformationA.Addr(), 8, @@ -2731,9 +2841,11 @@ func XGetVolumeInformationA(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr, } // BOOL CreateHardLinkW( -// LPCWSTR lpFileName, -// LPCWSTR lpExistingFileName, -// LPSECURITY_ATTRIBUTES lpSecurityAttributes +// +// LPCWSTR lpFileName, +// LPCWSTR lpExistingFileName, +// LPSECURITY_ATTRIBUTES lpSecurityAttributes +// // ); func XCreateHardLinkW(t *TLS, lpFileName, lpExistingFileName, lpSecurityAttributes uintptr) int32 { r0, _, err := syscall.Syscall(procCreateHardLinkW.Addr(), 1, lpFileName, lpExistingFileName, lpSecurityAttributes) @@ -2744,14 +2856,16 @@ func XCreateHardLinkW(t *TLS, lpFileName, lpExistingFileName, lpSecurityAttribut } // BOOL DeviceIoControl( -// HANDLE hDevice, -// DWORD dwIoControlCode, -// LPVOID lpInBuffer, -// DWORD nInBufferSize, -// LPVOID lpOutBuffer, -// DWORD nOutBufferSize, -// LPDWORD lpBytesReturned, -// LPOVERLAPPED lpOverlapped +// +// HANDLE hDevice, +// DWORD dwIoControlCode, +// LPVOID lpInBuffer, +// DWORD nInBufferSize, +// LPVOID lpOutBuffer, +// DWORD nOutBufferSize, +// LPDWORD lpBytesReturned, +// LPOVERLAPPED lpOverlapped +// // ); func XDeviceIoControl(t *TLS, hDevice uintptr, dwIoControlCode uint32, lpInBuffer uintptr, nInBufferSize uint32, lpOutBuffer uintptr, nOutBufferSize uint32, lpBytesReturned, lpOverlapped uintptr) int32 { r0, _, err := syscall.Syscall9(procDeviceIoControl.Addr(), 8, hDevice, uintptr(dwIoControlCode), lpInBuffer, @@ -2763,9 +2877,11 @@ func XDeviceIoControl(t *TLS, hDevice uintptr, dwIoControlCode uint32, lpInBuffe } // int wcsncmp( -// const wchar_t *string1, -// const wchar_t *string2, -// size_t count +// +// const wchar_t *string1, +// const wchar_t *string2, +// size_t count +// // ); func Xwcsncmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 { var s1 = goWideString(string1) @@ -2790,12 +2906,14 @@ func Xwcsncmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 { } // int MultiByteToWideChar( -// UINT CodePage, -// DWORD dwFlags, -// _In_NLS_string_(cbMultiByte)LPCCH lpMultiByteStr, -// int cbMultiByte, -// LPWSTR lpWideCharStr, -// int cchWideChar +// +// UINT CodePage, +// DWORD dwFlags, +// _In_NLS_string_(cbMultiByte)LPCCH lpMultiByteStr, +// int cbMultiByte, +// LPWSTR lpWideCharStr, +// int cchWideChar +// // ); func XMultiByteToWideChar(t *TLS, CodePage uint32, dwFlags uint32, lpMultiByteStr uintptr, cbMultiByte int32, lpWideCharStr uintptr, cchWideChar int32) int32 { r1, _, _ := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, @@ -2805,7 +2923,9 @@ func XMultiByteToWideChar(t *TLS, CodePage uint32, dwFlags uint32, lpMultiByteSt } // void OutputDebugStringW( -// LPCWSTR lpOutputString +// +// LPCWSTR lpOutputString +// // ); func XOutputDebugStringW(t *TLS, lpOutputString uintptr) { panic(todo("")) @@ -2818,9 +2938,11 @@ func XMessageBeep(t *TLS, _ ...interface{}) int32 { //==== // long _InterlockedCompareExchange( -// long volatile * Destination, -// long Exchange, -// long Comparand +// +// long volatile * Destination, +// long Exchange, +// long Comparand +// // ); func X_InterlockedCompareExchange(t *TLS, Destination uintptr, Exchange, Comparand long) long { @@ -2843,13 +2965,15 @@ func XAreFileApisANSI(t *TLS) int32 { } // HANDLE CreateFileA( -// LPCSTR lpFileName, -// DWORD dwDesiredAccess, -// DWORD dwShareMode, -// LPSECURITY_ATTRIBUTES lpSecurityAttributes, -// DWORD dwCreationDisposition, -// DWORD dwFlagsAndAttributes, -// HANDLE hTemplateFile +// +// LPCSTR lpFileName, +// DWORD dwDesiredAccess, +// DWORD dwShareMode, +// LPSECURITY_ATTRIBUTES lpSecurityAttributes, +// DWORD dwCreationDisposition, +// DWORD dwFlagsAndAttributes, +// HANDLE hTemplateFile +// // ); func XCreateFileA(t *TLS, lpFileName uintptr, dwDesiredAccess, dwShareMode uint32, lpSecurityAttributes uintptr, dwCreationDisposition, dwFlagsAndAttributes uint32, hTemplateFile uintptr) uintptr { @@ -2870,24 +2994,28 @@ func XCreateFileA(t *TLS, lpFileName uintptr, dwDesiredAccess, dwShareMode uint3 } // HANDLE CreateFileMappingA( -// HANDLE hFile, -// LPSECURITY_ATTRIBUTES lpFileMappingAttributes, -// DWORD flProtect, -// DWORD dwMaximumSizeHigh, -// DWORD dwMaximumSizeLow, -// LPCSTR lpName +// +// HANDLE hFile, +// LPSECURITY_ATTRIBUTES lpFileMappingAttributes, +// DWORD flProtect, +// DWORD dwMaximumSizeHigh, +// DWORD dwMaximumSizeLow, +// LPCSTR lpName +// // ); func XCreateFileMappingA(t *TLS, hFile, lpFileMappingAttributes uintptr, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow uint32, lpName uintptr) uintptr { panic(todo("")) } // HANDLE CreateFileMappingW( -// HANDLE hFile, -// LPSECURITY_ATTRIBUTES lpFileMappingAttributes, -// DWORD flProtect, -// DWORD dwMaximumSizeHigh, -// DWORD dwMaximumSizeLow, -// LPCWSTR lpName +// +// HANDLE hFile, +// LPSECURITY_ATTRIBUTES lpFileMappingAttributes, +// DWORD flProtect, +// DWORD dwMaximumSizeHigh, +// DWORD dwMaximumSizeLow, +// LPCWSTR lpName +// // ); func XCreateFileMappingW(t *TLS, hFile, lpFileMappingAttributes uintptr, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow uint32, lpName uintptr) uintptr { h, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, hFile, lpFileMappingAttributes, uintptr(flProtect), @@ -2903,42 +3031,50 @@ func XCreateFileMappingW(t *TLS, hFile, lpFileMappingAttributes uintptr, flProte } // HANDLE CreateMutexW( -// LPSECURITY_ATTRIBUTES lpMutexAttributes, -// BOOL bInitialOwner, -// LPCWSTR lpName +// +// LPSECURITY_ATTRIBUTES lpMutexAttributes, +// BOOL bInitialOwner, +// LPCWSTR lpName +// // ); func XCreateMutexW(t *TLS, lpMutexAttributes uintptr, bInitialOwner int32, lpName uintptr) uintptr { panic(todo("")) } // BOOL DeleteFileA( -// LPCSTR lpFileName +// +// LPCSTR lpFileName +// // ); func XDeleteFileA(t *TLS, lpFileName uintptr) int32 { panic(todo("")) } // DWORD FormatMessageA( -// DWORD dwFlags, -// LPCVOID lpSource, -// DWORD dwMessageId, -// DWORD dwLanguageId, -// LPSTR lpBuffer, -// DWORD nSize, -// va_list *Arguments +// +// DWORD dwFlags, +// LPCVOID lpSource, +// DWORD dwMessageId, +// DWORD dwLanguageId, +// LPSTR lpBuffer, +// DWORD nSize, +// va_list *Arguments +// // ); func XFormatMessageA(t *TLS, dwFlagsAndAttributes uint32, lpSource uintptr, dwMessageId, dwLanguageId uint32, lpBuffer uintptr, nSize uint32, Arguments uintptr) uint32 { panic(todo("")) } // DWORD FormatMessageW( -// DWORD dwFlags, -// LPCVOID lpSource, -// DWORD dwMessageId, -// DWORD dwLanguageId, -// LPWSTR lpBuffer, -// DWORD nSize, -// va_list *Arguments +// +// DWORD dwFlags, +// LPCVOID lpSource, +// DWORD dwMessageId, +// DWORD dwLanguageId, +// LPWSTR lpBuffer, +// DWORD nSize, +// va_list *Arguments +// // ); func XFormatMessageW(t *TLS, dwFlags uint32, lpSource uintptr, dwMessageId, dwLanguageId uint32, lpBuffer uintptr, nSize uint32, Arguments uintptr) uint32 { r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, @@ -2968,29 +3104,35 @@ func XGetCurrentProcessId(t *TLS) uint32 { } // BOOL GetDiskFreeSpaceA( -// LPCSTR lpRootPathName, -// LPDWORD lpSectorsPerCluster, -// LPDWORD lpBytesPerSector, -// LPDWORD lpNumberOfFreeClusters, -// LPDWORD lpTotalNumberOfClusters +// +// LPCSTR lpRootPathName, +// LPDWORD lpSectorsPerCluster, +// LPDWORD lpBytesPerSector, +// LPDWORD lpNumberOfFreeClusters, +// LPDWORD lpTotalNumberOfClusters +// // ); func XGetDiskFreeSpaceA(t *TLS, lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters uintptr) int32 { panic(todo("")) } // BOOL GetDiskFreeSpaceW( -// LPCWSTR lpRootPathName, -// LPDWORD lpSectorsPerCluster, -// LPDWORD lpBytesPerSector, -// LPDWORD lpNumberOfFreeClusters, -// LPDWORD lpTotalNumberOfClusters +// +// LPCWSTR lpRootPathName, +// LPDWORD lpSectorsPerCluster, +// LPDWORD lpBytesPerSector, +// LPDWORD lpNumberOfFreeClusters, +// LPDWORD lpTotalNumberOfClusters +// // ); func XGetDiskFreeSpaceW(t *TLS, lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters uintptr) int32 { panic(todo("")) } // DWORD GetFileAttributesA( -// LPCSTR lpFileName +// +// LPCSTR lpFileName +// // ); func XGetFileAttributesA(t *TLS, lpFileName uintptr) uint32 { r0, _, err := syscall.Syscall(procGetFileAttributesA.Addr(), 1, lpFileName, 0, 0) @@ -3001,9 +3143,11 @@ func XGetFileAttributesA(t *TLS, lpFileName uintptr) uint32 { } // BOOL GetFileAttributesExW( -// LPCWSTR lpFileName, -// GET_FILEEX_INFO_LEVELS fInfoLevelId, -// LPVOID lpFileInformation +// +// LPCWSTR lpFileName, +// GET_FILEEX_INFO_LEVELS fInfoLevelId, +// LPVOID lpFileInformation +// // ); func XGetFileAttributesExW(t *TLS, lpFileName uintptr, fInfoLevelId uint32, lpFileInformation uintptr) int32 { r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, lpFileName, uintptr(fInfoLevelId), lpFileInformation) @@ -3019,8 +3163,10 @@ func XGetFileAttributesExW(t *TLS, lpFileName uintptr, fInfoLevelId uint32, lpFi } // DWORD GetFileSize( -// HANDLE hFile, -// LPDWORD lpFileSizeHigh +// +// HANDLE hFile, +// LPDWORD lpFileSizeHigh +// // ); func XGetFileSize(t *TLS, hFile, lpFileSizeHigh uintptr) uint32 { r1, _, e1 := syscall.Syscall(procGetFileSize.Addr(), 2, hFile, lpFileSizeHigh, 0) @@ -3042,10 +3188,12 @@ func XGetFileSize(t *TLS, hFile, lpFileSizeHigh uintptr) uint32 { } // DWORD GetFullPathNameA( -// LPCSTR lpFileName, -// DWORD nBufferLength, -// LPSTR lpBuffer, -// LPSTR *lpFilePart +// +// LPCSTR lpFileName, +// DWORD nBufferLength, +// LPSTR lpBuffer, +// LPSTR *lpFilePart +// // ); func XGetFullPathNameA(t *TLS, lpFileName uintptr, nBufferLength uint32, lpBuffer, lpFilePart uintptr) uint32 { panic(todo("")) @@ -3066,14 +3214,18 @@ func XGetProcAddress(t *TLS, hModule, lpProcName uintptr) uintptr { } // NTSYSAPI NTSTATUS RtlGetVersion( // ntdll.dll -// PRTL_OSVERSIONINFOW lpVersionInformation +// +// PRTL_OSVERSIONINFOW lpVersionInformation +// // ); func XRtlGetVersion(t *TLS, lpVersionInformation uintptr) uintptr { panic(todo("")) } // void GetSystemInfo( -// LPSYSTEM_INFO lpSystemInfo +// +// LPSYSTEM_INFO lpSystemInfo +// // ); func XGetSystemInfo(t *TLS, lpSystemInfo uintptr) { syscall.Syscall(procGetSystemInfo.Addr(), 1, lpSystemInfo, 0, 0) @@ -3085,23 +3237,29 @@ func XGetSystemTime(t *TLS, lpSystemTime uintptr) { } // void GetSystemTimeAsFileTime( -// LPFILETIME lpSystemTimeAsFileTime +// +// LPFILETIME lpSystemTimeAsFileTime +// // ); func XGetSystemTimeAsFileTime(t *TLS, lpSystemTimeAsFileTime uintptr) { syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, lpSystemTimeAsFileTime, 0, 0) } // DWORD GetTempPathA( -// DWORD nBufferLength, -// LPSTR lpBuffer +// +// DWORD nBufferLength, +// LPSTR lpBuffer +// // ); func XGetTempPathA(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 { panic(todo("")) } // DWORD GetTempPathW( -// DWORD nBufferLength, -// LPWSTR lpBuffer +// +// DWORD nBufferLength, +// LPWSTR lpBuffer +// // ); func XGetTempPathW(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 { rv, err := syscall.GetTempPath(nBufferLength, (*uint16)(unsafe.Pointer(lpBuffer))) @@ -3118,7 +3276,9 @@ func XGetTickCount(t *TLS) uint32 { } // BOOL GetVersionExA( -// LPOSVERSIONINFOA lpVersionInformation +// +// LPOSVERSIONINFOA lpVersionInformation +// // ); func XGetVersionExA(t *TLS, lpVersionInformation uintptr) int32 { r0, _, err := syscall.Syscall(procGetVersionExA.Addr(), 1, lpVersionInformation, 0, 0) @@ -3129,52 +3289,64 @@ func XGetVersionExA(t *TLS, lpVersionInformation uintptr) int32 { } // HANDLE HeapCreate( -// DWORD flOptions, -// SIZE_T dwInitialSize, -// SIZE_T dwMaximumSize +// +// DWORD flOptions, +// SIZE_T dwInitialSize, +// SIZE_T dwMaximumSize +// // ); func XHeapCreate(t *TLS, flOptions uint32, dwInitialSize, dwMaximumSize types.Size_t) uintptr { panic(todo("")) } // BOOL HeapDestroy( -// HANDLE hHeap +// +// HANDLE hHeap +// // ); func XHeapDestroy(t *TLS, hHeap uintptr) int32 { panic(todo("")) } // LPVOID HeapReAlloc( -// HANDLE hHeap, -// DWORD dwFlags, -// _Frees_ptr_opt_ LPVOID lpMem, -// SIZE_T dwBytes +// +// HANDLE hHeap, +// DWORD dwFlags, +// _Frees_ptr_opt_ LPVOID lpMem, +// SIZE_T dwBytes +// // ); func XHeapReAlloc(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr, dwBytes types.Size_t) uintptr { panic(todo("")) } // SIZE_T HeapSize( -// HANDLE hHeap, -// DWORD dwFlags, -// LPCVOID lpMem +// +// HANDLE hHeap, +// DWORD dwFlags, +// LPCVOID lpMem +// // ); func XHeapSize(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) types.Size_t { panic(todo("")) } // BOOL HeapValidate( -// HANDLE hHeap, -// DWORD dwFlags, -// LPCVOID lpMem +// +// HANDLE hHeap, +// DWORD dwFlags, +// LPCVOID lpMem +// // ); func XHeapValidate(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) int32 { panic(todo("")) } // SIZE_T HeapCompact( -// HANDLE hHeap, -// DWORD dwFlags +// +// HANDLE hHeap, +// DWORD dwFlags +// // ); func XHeapCompact(t *TLS, hHeap uintptr, dwFlags uint32) types.Size_t { panic(todo("")) @@ -3186,14 +3358,18 @@ func XLoadLibraryA(t *TLS, lpLibFileName uintptr) uintptr { } // HMODULE LoadLibraryW( -// LPCWSTR lpLibFileName +// +// LPCWSTR lpLibFileName +// // ); func XLoadLibraryW(t *TLS, lpLibFileName uintptr) uintptr { panic(todo("")) } // HLOCAL LocalFree( -// HLOCAL hMem +// +// HLOCAL hMem +// // ); func XLocalFree(t *TLS, hMem uintptr) uintptr { h, err := syscall.LocalFree(syscall.Handle(hMem)) @@ -3209,11 +3385,13 @@ func XLocalFree(t *TLS, hMem uintptr) uintptr { } // BOOL LockFile( -// HANDLE hFile, -// DWORD dwFileOffsetLow, -// DWORD dwFileOffsetHigh, -// DWORD nNumberOfBytesToLockLow, -// DWORD nNumberOfBytesToLockHigh +// +// HANDLE hFile, +// DWORD dwFileOffsetLow, +// DWORD dwFileOffsetHigh, +// DWORD nNumberOfBytesToLockLow, +// DWORD nNumberOfBytesToLockHigh +// // ); func XLockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh uint32) int32 { @@ -3232,12 +3410,14 @@ func XLockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumber } // BOOL LockFileEx( -// HANDLE hFile, -// DWORD dwFlags, -// DWORD dwReserved, -// DWORD nNumberOfBytesToLockLow, -// DWORD nNumberOfBytesToLockHigh, -// LPOVERLAPPED lpOverlapped +// +// HANDLE hFile, +// DWORD dwFlags, +// DWORD dwReserved, +// DWORD nNumberOfBytesToLockLow, +// DWORD nNumberOfBytesToLockHigh, +// LPOVERLAPPED lpOverlapped +// // ); func XLockFileEx(t *TLS, hFile uintptr, dwFlags, dwReserved, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh uint32, lpOverlapped uintptr) int32 { r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, @@ -3254,11 +3434,13 @@ func XLockFileEx(t *TLS, hFile uintptr, dwFlags, dwReserved, nNumberOfBytesToLoc } // LPVOID MapViewOfFile( -// HANDLE hFileMappingObject, -// DWORD dwDesiredAccess, -// DWORD dwFileOffsetHigh, -// DWORD dwFileOffsetLow, -// SIZE_T dwNumberOfBytesToMap +// +// HANDLE hFileMappingObject, +// DWORD dwDesiredAccess, +// DWORD dwFileOffsetHigh, +// DWORD dwFileOffsetLow, +// SIZE_T dwNumberOfBytesToMap +// // ); func XMapViewOfFile(t *TLS, hFileMappingObject uintptr, dwDesiredAccess, dwFileOffsetHigh, dwFileOffsetLow uint32, dwNumberOfBytesToMap types.Size_t) uintptr { h, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, hFileMappingObject, uintptr(dwDesiredAccess), @@ -3274,7 +3456,9 @@ func XMapViewOfFile(t *TLS, hFileMappingObject uintptr, dwDesiredAccess, dwFileO } // BOOL QueryPerformanceCounter( -// LARGE_INTEGER *lpPerformanceCount +// +// LARGE_INTEGER *lpPerformanceCount +// // ); func XQueryPerformanceCounter(t *TLS, lpPerformanceCount uintptr) int32 { r0, _, _ := syscall.Syscall(procQueryPerformanceCounter.Addr(), 1, lpPerformanceCount, 0, 0) @@ -3282,7 +3466,9 @@ func XQueryPerformanceCounter(t *TLS, lpPerformanceCount uintptr) int32 { } // void Sleep( -// DWORD dwMilliseconds +// +// DWORD dwMilliseconds +// // ); func XSleep(t *TLS, dwMilliseconds uint32) { gotime.Sleep(gotime.Duration(dwMilliseconds) * gotime.Millisecond) @@ -3295,11 +3481,13 @@ func XSystemTimeToFileTime(t *TLS, lpSystemTime, lpFileTime uintptr) int32 { } // BOOL UnlockFile( -// HANDLE hFile, -// DWORD dwFileOffsetLow, -// DWORD dwFileOffsetHigh, -// DWORD nNumberOfBytesToUnlockLow, -// DWORD nNumberOfBytesToUnlockHigh +// +// HANDLE hFile, +// DWORD dwFileOffsetLow, +// DWORD dwFileOffsetHigh, +// DWORD nNumberOfBytesToUnlockLow, +// DWORD nNumberOfBytesToUnlockHigh +// // ); func XUnlockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh uint32) int32 { r1, _, e1 := syscall.Syscall6(procUnlockFile.Addr(), 5, @@ -3316,11 +3504,13 @@ func XUnlockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumb } // BOOL UnlockFileEx( -// HANDLE hFile, -// DWORD dwReserved, -// DWORD nNumberOfBytesToUnlockLow, -// DWORD nNumberOfBytesToUnlockHigh, -// LPOVERLAPPED lpOverlapped +// +// HANDLE hFile, +// DWORD dwReserved, +// DWORD nNumberOfBytesToUnlockLow, +// DWORD nNumberOfBytesToUnlockHigh, +// LPOVERLAPPED lpOverlapped +// // ); func XUnlockFileEx(t *TLS, hFile uintptr, dwReserved, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh uint32, lpOverlapped uintptr) int32 { r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, @@ -3337,7 +3527,9 @@ func XUnlockFileEx(t *TLS, hFile uintptr, dwReserved, nNumberOfBytesToUnlockLow, } // BOOL UnmapViewOfFile( -// LPCVOID lpBaseAddress +// +// LPCVOID lpBaseAddress +// // ); func XUnmapViewOfFile(t *TLS, lpBaseAddress uintptr) int32 { err := syscall.UnmapViewOfFile(lpBaseAddress) @@ -3349,14 +3541,16 @@ func XUnmapViewOfFile(t *TLS, lpBaseAddress uintptr) int32 { } // int WideCharToMultiByte( -// UINT CodePage, -// DWORD dwFlags, -// _In_NLS_string_(cchWideChar)LPCWCH lpWideCharStr, -// int cchWideChar, -// LPSTR lpMultiByteStr, -// int cbMultiByte, -// LPCCH lpDefaultChar, -// LPBOOL lpUsedDefaultChar +// +// UINT CodePage, +// DWORD dwFlags, +// _In_NLS_string_(cchWideChar)LPCWCH lpWideCharStr, +// int cchWideChar, +// LPSTR lpMultiByteStr, +// int cbMultiByte, +// LPCCH lpDefaultChar, +// LPBOOL lpUsedDefaultChar +// // ); func XWideCharToMultiByte(t *TLS, CodePage uint32, dwFlags uint32, lpWideCharStr uintptr, cchWideChar int32, lpMultiByteStr uintptr, cbMultiByte int32, lpDefaultChar, lpUsedDefaultChar uintptr) int32 { r1, _, _ := syscall.Syscall9(procWideCharToMultiByte.Addr(), 8, @@ -3367,15 +3561,19 @@ func XWideCharToMultiByte(t *TLS, CodePage uint32, dwFlags uint32, lpWideCharStr } // void OutputDebugStringA( -// LPCSTR lpOutputString +// +// LPCSTR lpOutputString +// // ) func XOutputDebugStringA(t *TLS, lpOutputString uintptr) { panic(todo("")) } // BOOL FlushViewOfFile( -// LPCVOID lpBaseAddress, -// SIZE_T dwNumberOfBytesToFlush +// +// LPCVOID lpBaseAddress, +// SIZE_T dwNumberOfBytesToFlush +// // ); func XFlushViewOfFile(t *TLS, lpBaseAddress uintptr, dwNumberOfBytesToFlush types.Size_t) int32 { err := syscall.FlushViewOfFile(lpBaseAddress, uintptr(dwNumberOfBytesToFlush)) @@ -3462,8 +3660,10 @@ func WindowsAttrbiutesToStat(fa uint32) uint16 { } // int _chsize( -// int fd, -// long size +// +// int fd, +// long size +// // ); func X_chsize(t *TLS, fd int32, size long) int32 { @@ -3513,8 +3713,10 @@ func win32FindDataToFileInfo(t *TLS, fdata *stat.X_finddata64i32_t, wfd *syscall } // intptr_t _findfirst64i32( -// const char *filespec, -// struct _finddata64i32_t *fileinfo +// +// const char *filespec, +// struct _finddata64i32_t *fileinfo +// // ); func X_findfirst64i32(t *TLS, filespec, fileinfo uintptr) types.Intptr_t { @@ -3546,8 +3748,10 @@ func X_findfirst64i32(t *TLS, filespec, fileinfo uintptr) types.Intptr_t { } // int _findnext64i32( -// intptr_t handle, -// struct _finddata64i32_t *fileinfo +// +// intptr_t handle, +// struct _finddata64i32_t *fileinfo +// // ); func X_findnext64i32(t *TLS, handle types.Intptr_t, fileinfo uintptr) int32 { @@ -3568,7 +3772,9 @@ func X_findnext64i32(t *TLS, handle types.Intptr_t, fileinfo uintptr) int32 { } // int _findclose( -// intptr_t handle +// +// intptr_t handle +// // ); func X_findclose(t *TLS, handle types.Intptr_t) int32 { @@ -3581,9 +3787,11 @@ func X_findclose(t *TLS, handle types.Intptr_t) int32 { } // DWORD GetEnvironmentVariableA( -// LPCSTR lpName, -// LPSTR lpBuffer, -// DWORD nSize +// +// LPCSTR lpName, +// LPSTR lpBuffer, +// DWORD nSize +// // ); func XGetEnvironmentVariableA(t *TLS, lpName, lpBuffer uintptr, nSize uint32) uint32 { r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableA.Addr(), 3, lpName, lpBuffer, uintptr(nSize)) @@ -3599,8 +3807,10 @@ func XGetEnvironmentVariableA(t *TLS, lpName, lpBuffer uintptr, nSize uint32) ui } // int _fstat64( -// int fd, -// struct __stat64 *buffer +// +// int fd, +// struct __stat64 *buffer +// // ); func X_fstat64(t *TLS, fd int32, buffer uintptr) int32 { @@ -3632,10 +3842,12 @@ func X_fstat64(t *TLS, fd int32, buffer uintptr) int32 { } // HANDLE CreateEventA( -// LPSECURITY_ATTRIBUTES lpEventAttributes, -// BOOL bManualReset, -// BOOL bInitialState, -// LPCSTR lpName +// +// LPSECURITY_ATTRIBUTES lpEventAttributes, +// BOOL bManualReset, +// BOOL bInitialState, +// LPCSTR lpName +// // ); func XCreateEventA(t *TLS, lpEventAttributes uintptr, bManualReset, bInitialState int32, lpName uintptr) uintptr { r0, _, err := syscall.Syscall6(procCreateEventA.Addr(), 4, lpEventAttributes, uintptr(bManualReset), @@ -3647,7 +3859,9 @@ func XCreateEventA(t *TLS, lpEventAttributes uintptr, bManualReset, bInitialStat } // BOOL WINAPI CancelSynchronousIo( -// _In_ HANDLE hThread +// +// _In_ HANDLE hThread +// // ); func XCancelSynchronousIo(t *TLS, hThread uintptr) int32 { panic(todo("")) @@ -3675,12 +3889,14 @@ func X_beginthread(t *TLS, procAddr uintptr, stack_sz uint32, args uintptr) int3 } // uintptr_t _beginthreadex( // NATIVE CODE -// void *security, -// unsigned stack_size, -// unsigned ( __stdcall *start_address )( void * ), -// void *arglist, -// unsigned initflag, -// unsigned *thrdaddr +// +// void *security, +// unsigned stack_size, +// unsigned ( __stdcall *start_address )( void * ), +// void *arglist, +// unsigned initflag, +// unsigned *thrdaddr +// // ); func X_beginthreadex(t *TLS, _ uintptr, stack_sz uint32, procAddr uintptr, args uintptr, initf uint32, thAddr uintptr) int32 { f := (*struct{ f func(*TLS, uintptr) uint32 })(unsafe.Pointer(&struct{ uintptr }{procAddr})).f @@ -3703,8 +3919,10 @@ func XGetCurrentThreadId(t *TLS) uint32 { } // BOOL GetExitCodeThread( -// HANDLE hThread, -// LPDWORD lpExitCode +// +// HANDLE hThread, +// LPDWORD lpExitCode +// // ); func XGetExitCodeThread(t *TLS, hThread, lpExitCode uintptr) int32 { r0, _, _ := syscall.Syscall(procGetExitCodeThread.Addr(), 2, hThread, lpExitCode, 0) @@ -3712,9 +3930,11 @@ func XGetExitCodeThread(t *TLS, hThread, lpExitCode uintptr) int32 { } // DWORD WaitForSingleObjectEx( -// HANDLE hHandle, -// DWORD dwMilliseconds, -// BOOL bAlertable +// +// HANDLE hHandle, +// DWORD dwMilliseconds, +// BOOL bAlertable +// // ); func XWaitForSingleObjectEx(t *TLS, hHandle uintptr, dwMilliseconds uint32, bAlertable int32) uint32 { rv, _, _ := syscall.Syscall(procWaitForSingleObjectEx.Addr(), 3, hHandle, uintptr(dwMilliseconds), uintptr(bAlertable)) @@ -3722,11 +3942,13 @@ func XWaitForSingleObjectEx(t *TLS, hHandle uintptr, dwMilliseconds uint32, bAle } // DWORD MsgWaitForMultipleObjectsEx( -// DWORD nCount, -// const HANDLE *pHandles, -// DWORD dwMilliseconds, -// DWORD dwWakeMask, -// DWORD dwFlags +// +// DWORD nCount, +// const HANDLE *pHandles, +// DWORD dwMilliseconds, +// DWORD dwWakeMask, +// DWORD dwFlags +// // ); func XMsgWaitForMultipleObjectsEx(t *TLS, nCount uint32, pHandles uintptr, dwMilliseconds, dwWakeMask, dwFlags uint32) uint32 { r0, _, err := syscall.Syscall6(procMsgWaitForMultipleObjectsEx.Addr(), 5, @@ -3748,9 +3970,11 @@ func XMessageBoxW(t *TLS, _ ...interface{}) int32 { } // DWORD GetModuleFileNameW( -// HMODULE hModule, -// LPWSTR lpFileName, -// DWORD nSize +// +// HMODULE hModule, +// LPWSTR lpFileName, +// DWORD nSize +// // ); func XGetModuleFileNameW(t *TLS, hModule, lpFileName uintptr, nSize uint32) uint32 { r0, _, err := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, hModule, lpFileName, uintptr(nSize)) @@ -3761,9 +3985,11 @@ func XGetModuleFileNameW(t *TLS, hModule, lpFileName uintptr, nSize uint32) uint } // NET_API_STATUS NET_API_FUNCTION NetGetDCName( -// LPCWSTR ServerName, -// LPCWSTR DomainName, -// LPBYTE *Buffer +// +// LPCWSTR ServerName, +// LPCWSTR DomainName, +// LPBYTE *Buffer +// // ); func XNetGetDCName(t *TLS, ServerName, DomainName, Buffer uintptr) int32 { r0, _, err := syscall.Syscall(procNetGetDCName.Addr(), 3, ServerName, DomainName, Buffer) @@ -3774,10 +4000,12 @@ func XNetGetDCName(t *TLS, ServerName, DomainName, Buffer uintptr) int32 { } // NET_API_STATUS NET_API_FUNCTION NetUserGetInfo( -// LPCWSTR servername, -// LPCWSTR username, -// DWORD level, -// LPBYTE *bufptr +// +// LPCWSTR servername, +// LPCWSTR username, +// DWORD level, +// LPBYTE *bufptr +// // ); func XNetUserGetInfo(t *TLS, servername, username uintptr, level uint32, bufptr uintptr) uint32 { r0, _, err := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, @@ -3799,8 +4027,10 @@ func XlstrlenW(t *TLS, _ ...interface{}) int32 { } // USERENVAPI BOOL GetProfilesDirectoryW( -// [out] LPWSTR lpProfileDir, -// [in, out] LPDWORD lpcchSize +// +// [out] LPWSTR lpProfileDir, +// [in, out] LPDWORD lpcchSize +// // ); func XGetProfilesDirectoryW(t *TLS, lpProfileDir, lpcchSize uintptr) int32 { r0, _, err := syscall.Syscall(procGetProfilesDirectoryW.Addr(), 2, lpProfileDir, lpcchSize, 0) @@ -3815,12 +4045,14 @@ func XNetApiBufferFree(t *TLS, _ ...interface{}) int32 { } // DWORD GetPrivateProfileStringA( -// LPCSTR lpAppName, -// LPCSTR lpKeyName, -// LPCSTR lpDefault, -// LPSTR lpReturnedString, -// DWORD nSize, -// LPCSTR lpFileName +// +// LPCSTR lpAppName, +// LPCSTR lpKeyName, +// LPCSTR lpDefault, +// LPSTR lpReturnedString, +// DWORD nSize, +// LPCSTR lpFileName +// // ); func XGetPrivateProfileStringA(t *TLS, lpAppName, lpKeyName, lpDefault, lpReturnedString uintptr, nSize uint32, lpFileName uintptr) uint32 { r0, _, err := syscall.Syscall6(procGetPrivateProfileStringA.Addr(), 4, @@ -3842,11 +4074,13 @@ func XGetWindowsDirectoryA(t *TLS, _ ...interface{}) int32 { } // BOOL GetFileSecurityW( -// LPCSTR lpFileName, -// SECURITY_INFORMATION RequestedInformation, -// PSECURITY_DESCRIPTOR pSecurityDescriptor, -// DWORD nLength, -// LPDWORD lpnLengthNeeded +// +// LPCSTR lpFileName, +// SECURITY_INFORMATION RequestedInformation, +// PSECURITY_DESCRIPTOR pSecurityDescriptor, +// DWORD nLength, +// LPDWORD lpnLengthNeeded +// // ); func XGetFileSecurityW(t *TLS, lpFileName uintptr, RequestedInformation uint32, pSecurityDescriptor uintptr, nLength uint32, lpnLengthNeeded uintptr) int32 { r0, _, err := syscall.Syscall6(procGetFileSecurityW.Addr(), 5, lpFileName, uintptr(RequestedInformation), pSecurityDescriptor, uintptr(nLength), lpnLengthNeeded, 0) @@ -3857,9 +4091,11 @@ func XGetFileSecurityW(t *TLS, lpFileName uintptr, RequestedInformation uint32, } // BOOL GetSecurityDescriptorOwner( -// PSECURITY_DESCRIPTOR pSecurityDescriptor, -// PSID *pOwner, -// LPBOOL lpbOwnerDefaulted +// +// PSECURITY_DESCRIPTOR pSecurityDescriptor, +// PSID *pOwner, +// LPBOOL lpbOwnerDefaulted +// // ); func XGetSecurityDescriptorOwner(t *TLS, pSecurityDescriptor, pOwner, lpbOwnerDefaulted uintptr) int32 { r0, _, err := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, pSecurityDescriptor, pOwner, lpbOwnerDefaulted) @@ -3871,7 +4107,9 @@ func XGetSecurityDescriptorOwner(t *TLS, pSecurityDescriptor, pOwner, lpbOwnerDe } // PSID_IDENTIFIER_AUTHORITY GetSidIdentifierAuthority( -// PSID pSid +// +// PSID pSid +// // ); func XGetSidIdentifierAuthority(t *TLS, pSid uintptr) uintptr { r0, _, err := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, pSid, 0, 0) @@ -3882,7 +4120,9 @@ func XGetSidIdentifierAuthority(t *TLS, pSid uintptr) uintptr { } // BOOL ImpersonateSelf( -// SECURITY_IMPERSONATION_LEVEL ImpersonationLevel +// +// SECURITY_IMPERSONATION_LEVEL ImpersonationLevel +// // ); func XImpersonateSelf(t *TLS, ImpersonationLevel int32) int32 { r0, _, err := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(ImpersonationLevel), 0, 0) @@ -3893,10 +4133,12 @@ func XImpersonateSelf(t *TLS, ImpersonationLevel int32) int32 { } // BOOL OpenThreadToken( -// HANDLE ThreadHandle, -// DWORD DesiredAccess, -// BOOL OpenAsSelf, -// PHANDLE TokenHandle +// +// HANDLE ThreadHandle, +// DWORD DesiredAccess, +// BOOL OpenAsSelf, +// PHANDLE TokenHandle +// // ); func XOpenThreadToken(t *TLS, ThreadHandle uintptr, DesiredAccess uint32, OpenAsSelf int32, TokenHandle uintptr) int32 { r0, _, err := syscall.Syscall6(procOpenThreadToken.Addr(), 4, ThreadHandle, uintptr(DesiredAccess), uintptr(OpenAsSelf), TokenHandle, 0, 0) @@ -3925,14 +4167,16 @@ func XRevertToSelf(t *TLS) int32 { } // BOOL AccessCheck( -// PSECURITY_DESCRIPTOR pSecurityDescriptor, -// HANDLE ClientToken, -// DWORD DesiredAccess, -// PGENERIC_MAPPING GenericMapping, -// PPRIVILEGE_SET PrivilegeSet, -// LPDWORD PrivilegeSetLength, -// LPDWORD GrantedAccess, -// LPBOOL AccessStatus +// +// PSECURITY_DESCRIPTOR pSecurityDescriptor, +// HANDLE ClientToken, +// DWORD DesiredAccess, +// PGENERIC_MAPPING GenericMapping, +// PPRIVILEGE_SET PrivilegeSet, +// LPDWORD PrivilegeSetLength, +// LPDWORD GrantedAccess, +// LPBOOL AccessStatus +// // ); func XAccessCheck(t *TLS, pSecurityDescriptor, ClientToken uintptr, DesiredAccess uint32, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus uintptr) int32 { r0, _, err := syscall.Syscall9(procAccessCheck.Addr(), 8, @@ -3953,8 +4197,10 @@ func XAccessCheck(t *TLS, pSecurityDescriptor, ClientToken uintptr, DesiredAcces } // int _wcsicmp( -// const wchar_t *string1, -// const wchar_t *string2 +// +// const wchar_t *string1, +// const wchar_t *string2 +// // ); func Xwcsicmp(t *TLS, string1, string2 uintptr) int32 { var s1 = strings.ToLower(goWideString(string1)) @@ -3963,7 +4209,9 @@ func Xwcsicmp(t *TLS, string1, string2 uintptr) int32 { } // BOOL SetCurrentDirectoryW( -// LPCTSTR lpPathName +// +// LPCTSTR lpPathName +// // ); func XSetCurrentDirectoryW(t *TLS, lpPathName uintptr) int32 { err := syscall.SetCurrentDirectory((*uint16)(unsafe.Pointer(lpPathName))) @@ -3975,8 +4223,10 @@ func XSetCurrentDirectoryW(t *TLS, lpPathName uintptr) int32 { } // DWORD GetCurrentDirectory( -// DWORD nBufferLength, -// LPWTSTR lpBuffer +// +// DWORD nBufferLength, +// LPWTSTR lpBuffer +// // ); func XGetCurrentDirectoryW(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 { n, err := syscall.GetCurrentDirectory(nBufferLength, (*uint16)(unsafe.Pointer(lpBuffer))) @@ -3987,8 +4237,10 @@ func XGetCurrentDirectoryW(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint3 } // BOOL GetFileInformationByHandle( -// HANDLE hFile, -// LPBY_HANDLE_FILE_INFORMATION lpFileInformation +// +// HANDLE hFile, +// LPBY_HANDLE_FILE_INFORMATION lpFileInformation +// // ); func XGetFileInformationByHandle(t *TLS, hFile, lpFileInformation uintptr) int32 { r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, hFile, lpFileInformation, 0) @@ -4003,14 +4255,16 @@ func XGetFileInformationByHandle(t *TLS, hFile, lpFileInformation uintptr) int32 } // BOOL GetVolumeInformationW( -// LPCWSTR lpRootPathName, -// LPWSTR lpVolumeNameBuffer, -// DWORD nVolumeNameSize, -// LPDWORD lpVolumeSerialNumber, -// LPDWORD lpMaximumComponentLength, -// LPDWORD lpFileSystemFlags, -// LPWSTR lpFileSystemNameBuffer, -// DWORD nFileSystemNameSize +// +// LPCWSTR lpRootPathName, +// LPWSTR lpVolumeNameBuffer, +// DWORD nVolumeNameSize, +// LPDWORD lpVolumeSerialNumber, +// LPDWORD lpMaximumComponentLength, +// LPDWORD lpFileSystemFlags, +// LPWSTR lpFileSystemNameBuffer, +// DWORD nFileSystemNameSize +// // ); func XGetVolumeInformationW(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr, nVolumeNameSize uint32, lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags, lpFileSystemNameBuffer uintptr, nFileSystemNameSize uint32) int32 { r0, _, err := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, @@ -4031,8 +4285,10 @@ func XGetVolumeInformationW(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr, } // wchar_t *wcschr( -// const wchar_t *str, -// wchar_t c +// +// const wchar_t *str, +// wchar_t c +// // ); func Xwcschr(t *TLS, str uintptr, c wchar_t) uintptr { var source = str @@ -4051,60 +4307,72 @@ func Xwcschr(t *TLS, str uintptr, c wchar_t) uintptr { } // BOOL SetFileTime( -// HANDLE hFile, -// const FILETIME *lpCreationTime, -// const FILETIME *lpLastAccessTime, -// const FILETIME *lpLastWriteTime +// +// HANDLE hFile, +// const FILETIME *lpCreationTime, +// const FILETIME *lpLastAccessTime, +// const FILETIME *lpLastWriteTime +// // ); func XSetFileTime(t *TLS, hFile uintptr, lpCreationTime, lpLastAccessTime, lpLastWriteTime uintptr) int32 { panic(todo("")) } // DWORD GetNamedSecurityInfoW( -// LPCWSTR pObjectName, -// SE_OBJECT_TYPE ObjectType, -// SECURITY_INFORMATION SecurityInfo, -// PSID *ppsidOwner, -// PSID *ppsidGroup, -// PACL *ppDacl, -// PACL *ppSacl, -// PSECURITY_DESCRIPTOR *ppSecurityDescriptor +// +// LPCWSTR pObjectName, +// SE_OBJECT_TYPE ObjectType, +// SECURITY_INFORMATION SecurityInfo, +// PSID *ppsidOwner, +// PSID *ppsidGroup, +// PACL *ppDacl, +// PACL *ppSacl, +// PSECURITY_DESCRIPTOR *ppSecurityDescriptor +// // ); func XGetNamedSecurityInfoW(t *TLS, pObjectName uintptr, ObjectType, SecurityInfo uint32, ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor uintptr) uint32 { panic(todo("")) } // BOOL OpenProcessToken( -// HANDLE ProcessHandle, -// DWORD DesiredAccess, -// PHANDLE TokenHandle +// +// HANDLE ProcessHandle, +// DWORD DesiredAccess, +// PHANDLE TokenHandle +// // ); func XOpenProcessToken(t *TLS, ProcessHandle uintptr, DesiredAccess uint32, TokenHandle uintptr) int32 { panic(todo("")) } // BOOL GetTokenInformation( -// HANDLE TokenHandle, -// TOKEN_INFORMATION_CLASS TokenInformationClass, -// LPVOID TokenInformation, -// DWORD TokenInformationLength, -// PDWORD ReturnLength +// +// HANDLE TokenHandle, +// TOKEN_INFORMATION_CLASS TokenInformationClass, +// LPVOID TokenInformation, +// DWORD TokenInformationLength, +// PDWORD ReturnLength +// // ); func XGetTokenInformation(t *TLS, TokenHandle uintptr, TokenInformationClass uint32, TokenInformation uintptr, TokenInformationLength uint32, ReturnLength uintptr) int32 { panic(todo("")) } // BOOL EqualSid( -// PSID pSid1, -// PSID pSid2 +// +// PSID pSid1, +// PSID pSid2 +// // ); func XEqualSid(t *TLS, pSid1, pSid2 uintptr) int32 { panic(todo("")) } // int WSAStartup( -// WORD wVersionRequired, -// LPWSADATA lpWSAData +// +// WORD wVersionRequired, +// LPWSADATA lpWSAData +// // ); func XWSAStartup(t *TLS, wVersionRequired uint16, lpWSAData uintptr) int32 { r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(wVersionRequired), lpWSAData, 0) @@ -4124,7 +4392,9 @@ func XGetModuleHandleA(t *TLS, lpModuleName uintptr) uintptr { } // HMODULE GetModuleHandleW( -// LPCWSTR lpModuleName +// +// LPCWSTR lpModuleName +// // ); func XGetModuleHandleW(t *TLS, lpModuleName uintptr) uintptr { r0, _, err := syscall.Syscall(procGetModuleHandleW.Addr(), 1, lpModuleName, 0, 0) @@ -4135,9 +4405,11 @@ func XGetModuleHandleW(t *TLS, lpModuleName uintptr) uintptr { } // DWORD GetEnvironmentVariableW( -// LPCWSTR lpName, -// LPWSTR lpBuffer, -// DWORD nSize +// +// LPCWSTR lpName, +// LPWSTR lpBuffer, +// DWORD nSize +// // ); func XGetEnvironmentVariableW(t *TLS, lpName, lpBuffer uintptr, nSize uint32) uint32 { r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, lpName, lpBuffer, uintptr(nSize)) @@ -4153,8 +4425,10 @@ func XGetEnvironmentVariableW(t *TLS, lpName, lpBuffer uintptr, nSize uint32) ui } // int lstrcmpiA( -// LPCSTR lpString1, -// LPCSTR lpString2 +// +// LPCSTR lpString1, +// LPCSTR lpString2 +// // ); func XlstrcmpiA(t *TLS, lpString1, lpString2 uintptr) int32 { var s1 = strings.ToLower(GoString(lpString1)) @@ -4173,8 +4447,10 @@ func XGetACP(t *TLS) uint32 { } // BOOL GetUserNameW( -// LPWSTR lpBuffer, -// LPDWORD pcbBuffer +// +// LPWSTR lpBuffer, +// LPDWORD pcbBuffer +// // ); func XGetUserNameW(t *TLS, lpBuffer, pcbBuffer uintptr) int32 { u, err := user.Current() @@ -4198,17 +4474,21 @@ func XGetUserNameW(t *TLS, lpBuffer, pcbBuffer uintptr) int32 { } // HMODULE LoadLibraryExW( -// LPCWSTR lpLibFileName, -// HANDLE hFile, -// DWORD dwFlags +// +// LPCWSTR lpLibFileName, +// HANDLE hFile, +// DWORD dwFlags +// // ); func XLoadLibraryExW(t *TLS, lpLibFileName, hFile uintptr, dwFlags uint32) uintptr { return 0 // If the function fails, the return value is NULL. } // wchar_t *wcscpy( -// wchar_t *strDestination, -// const wchar_t *strSource +// +// wchar_t *strDestination, +// const wchar_t *strSource +// // ); func Xwcscpy(t *TLS, strDestination, strSource uintptr) uintptr { if strSource == 0 { @@ -4232,7 +4512,9 @@ func XwsprintfW(t *TLS, _ ...interface{}) int32 { } // ATOM RegisterClassW( -// const WNDCLASSW *lpWndClass +// +// const WNDCLASSW *lpWndClass +// // ); func XRegisterClassW(t *TLS, lpWndClass uintptr) int32 { r0, _, err := syscall.Syscall(procRegisterClassW.Addr(), 1, lpWndClass, 0, 0) @@ -4251,8 +4533,10 @@ func XDestroyWindow(t *TLS, _ ...interface{}) int32 { } // BOOL UnregisterClassW( -// LPCWSTR lpClassName, -// HINSTANCE hInstance +// +// LPCWSTR lpClassName, +// HINSTANCE hInstance +// // ); func XUnregisterClassW(t *TLS, lpClassName, hInstance uintptr) int32 { r0, _, err := syscall.Syscall(procUnregisterClassW.Addr(), 2, lpClassName, hInstance, 0) @@ -4271,18 +4555,20 @@ func XSetTimer(t *TLS, _ ...interface{}) int32 { } // HWND CreateWindowExW( -// DWORD dwExStyle, -// LPCWSTR lpClassName, -// LPCWSTR lpWindowName, -// DWORD dwStyle, -// int X, -// int Y, -// int nWidth, -// int nHeight, -// HWND hWndParent, -// HMENU hMenu, -// HINSTANCE hInstance, -// LPVOID lpParam +// +// DWORD dwExStyle, +// LPCWSTR lpClassName, +// LPCWSTR lpWindowName, +// DWORD dwStyle, +// int X, +// int Y, +// int nWidth, +// int nHeight, +// HWND hWndParent, +// HMENU hMenu, +// HINSTANCE hInstance, +// LPVOID lpParam +// // ); func XCreateWindowExW(t *TLS, dwExStyle uint32, lpClassName, lpWindowName uintptr, dwStyle uint32, x, y, nWidth, nHeight int32, hWndParent, hMenu, hInstance, lpParam uintptr) uintptr { r0, _, err := syscall.Syscall12(procCreateWindowExW.Addr(), 12, @@ -4306,11 +4592,13 @@ func XCreateWindowExW(t *TLS, dwExStyle uint32, lpClassName, lpWindowName uintpt } // BOOL PeekMessageW( -// LPMSG lpMsg, -// HWND hWnd, -// UINT wMsgFilterMin, -// UINT wMsgFilterMax, -// UINT wRemoveMsg +// +// LPMSG lpMsg, +// HWND hWnd, +// UINT wMsgFilterMin, +// UINT wMsgFilterMax, +// UINT wRemoveMsg +// // ); func XPeekMessageW(t *TLS, lpMsg, hWnd uintptr, wMsgFilterMin, wMsgFilterMax, wRemoveMsg uint32) int32 { r0, _, err := syscall.Syscall6(procPeekMessageW.Addr(), 5, @@ -4344,8 +4632,10 @@ func XDispatchMessageW(t *TLS, _ ...interface{}) int32 { } // DWORD SleepEx( -// DWORD dwMilliseconds, -// BOOL bAlertable +// +// DWORD dwMilliseconds, +// BOOL bAlertable +// // ); func XSleepEx(t *TLS, dwMilliseconds uint32, bAlertable int32) uint32 { r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(dwMilliseconds), uintptr(bAlertable), 0) @@ -4353,10 +4643,12 @@ func XSleepEx(t *TLS, dwMilliseconds uint32, bAlertable int32) uint32 { } // BOOL CreatePipe( -// PHANDLE hReadPipe, -// PHANDLE hWritePipe, -// LPSECURITY_ATTRIBUTES lpPipeAttributes, -// DWORD nSize +// +// PHANDLE hReadPipe, +// PHANDLE hWritePipe, +// LPSECURITY_ATTRIBUTES lpPipeAttributes, +// DWORD nSize +// // ); func XCreatePipe(t *TLS, hReadPipe, hWritePipe, lpPipeAttributes uintptr, nSize uint32) int32 { r0, _, err := syscall.Syscall6(procCreatePipe.Addr(), 4, hReadPipe, hWritePipe, lpPipeAttributes, uintptr(nSize), 0, 0) @@ -4367,16 +4659,18 @@ func XCreatePipe(t *TLS, hReadPipe, hWritePipe, lpPipeAttributes uintptr, nSize } // BOOL CreateProcessW( -// LPCWSTR lpApplicationName, -// LPWSTR lpCommandLine, -// LPSECURITY_ATTRIBUTES lpProcessAttributes, -// LPSECURITY_ATTRIBUTES lpThreadAttributes, -// BOOL bInheritHandles, -// DWORD dwCreationFlags, -// LPVOID lpEnvironment, -// LPCWSTR lpCurrentDirectory, -// LPSTARTUPINFOW lpStartupInfo, -// LPPROCESS_INFORMATION lpProcessInformation +// +// LPCWSTR lpApplicationName, +// LPWSTR lpCommandLine, +// LPSECURITY_ATTRIBUTES lpProcessAttributes, +// LPSECURITY_ATTRIBUTES lpThreadAttributes, +// BOOL bInheritHandles, +// DWORD dwCreationFlags, +// LPVOID lpEnvironment, +// LPCWSTR lpCurrentDirectory, +// LPSTARTUPINFOW lpStartupInfo, +// LPPROCESS_INFORMATION lpProcessInformation +// // ); func XCreateProcessW(t *TLS, lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes uintptr, bInheritHandles int32, dwCreationFlags uint32, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation uintptr) int32 { @@ -4395,8 +4689,10 @@ func XCreateProcessW(t *TLS, lpApplicationName, lpCommandLine, lpProcessAttribut } // DWORD WaitForInputIdle( -// HANDLE hProcess, -// DWORD dwMilliseconds +// +// HANDLE hProcess, +// DWORD dwMilliseconds +// // ); func XWaitForInputIdle(t *TLS, hProcess uintptr, dwMilliseconds uint32) int32 { r0, _, _ := syscall.Syscall(procWaitForInputIdle.Addr(), 2, hProcess, uintptr(dwMilliseconds), 0) @@ -4404,12 +4700,14 @@ func XWaitForInputIdle(t *TLS, hProcess uintptr, dwMilliseconds uint32) int32 { } // DWORD SearchPathW( -// LPCWSTR lpPath, -// LPCWSTR lpFileName, -// LPCWSTR lpExtension, -// DWORD nBufferLength, -// LPWSTR lpBuffer, -// LPWSTR *lpFilePart +// +// LPCWSTR lpPath, +// LPCWSTR lpFileName, +// LPCWSTR lpExtension, +// DWORD nBufferLength, +// LPWSTR lpBuffer, +// LPWSTR *lpFilePart +// // ); func XSearchPathW(t *TLS, lpPath, lpFileName, lpExtension uintptr, nBufferLength uint32, lpBuffer, lpFilePart uintptr) int32 { r0, _, err := syscall.Syscall6(procSearchPathW.Addr(), 6, lpPath, lpFileName, lpExtension, uintptr(nBufferLength), lpBuffer, lpFilePart) @@ -4424,8 +4722,10 @@ func XGetShortPathNameW(t *TLS, _ ...interface{}) int32 { } // BOOL GetExitCodeProcess( -// HANDLE hProcess, -// LPDWORD lpExitCode +// +// HANDLE hProcess, +// LPDWORD lpExitCode +// // ); func XGetExitCodeProcess(t *TLS, hProcess, lpExitCode uintptr) int32 { r0, _, err := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, hProcess, lpExitCode, 0) @@ -4436,12 +4736,14 @@ func XGetExitCodeProcess(t *TLS, hProcess, lpExitCode uintptr) int32 { } // BOOL PeekNamedPipe( -// HANDLE hNamedPipe, -// LPVOID lpBuffer, -// DWORD nBufferSize, -// LPDWORD lpBytesRead, -// LPDWORD lpTotalBytesAvail, -// LPDWORD lpBytesLeftThisMessage +// +// HANDLE hNamedPipe, +// LPVOID lpBuffer, +// DWORD nBufferSize, +// LPDWORD lpBytesRead, +// LPDWORD lpTotalBytesAvail, +// LPDWORD lpBytesLeftThisMessage +// // ); func XPeekNamedPipe(t *TLS, hNamedPipe, lpBuffer uintptr, nBufferSize uint32, lpBytesRead, lpTotalBytesAvail, lpBytesLeftThisMessage uintptr) int32 { r0, _, err := syscall.Syscall6(procPeekNamedPipe.Addr(), 6, hNamedPipe, lpBuffer, uintptr(nBufferSize), lpBytesRead, lpTotalBytesAvail, lpBytesLeftThisMessage) @@ -4452,8 +4754,10 @@ func XPeekNamedPipe(t *TLS, hNamedPipe, lpBuffer uintptr, nBufferSize uint32, lp } // long _InterlockedExchange( -// long volatile * Target, -// long Value +// +// long volatile * Target, +// long Value +// // ); func X_InterlockedExchange(t *TLS, Target uintptr, Value long) long { old := atomic.SwapInt32((*int32)(unsafe.Pointer(Target)), Value) @@ -4461,8 +4765,10 @@ func X_InterlockedExchange(t *TLS, Target uintptr, Value long) long { } // BOOL TerminateThread( -// [in, out] HANDLE hThread, -// [in] DWORD dwExitCode +// +// [in, out] HANDLE hThread, +// [in] DWORD dwExitCode +// // ); func XTerminateThread(t *TLS, hThread uintptr, dwExitCode uint32) int32 { r0, _, err := syscall.Syscall(procTerminateThread.Addr(), 2, hThread, uintptr(dwExitCode), 0) @@ -4473,8 +4779,10 @@ func XTerminateThread(t *TLS, hThread uintptr, dwExitCode uint32) int32 { } // BOOL GetComputerNameW( -// LPWSTR lpBuffer, -// LPDWORD nSize +// +// LPWSTR lpBuffer, +// LPDWORD nSize +// // ); func XGetComputerNameW(t *TLS, lpBuffer, nSize uintptr) int32 { panic(todo("")) @@ -4545,7 +4853,9 @@ func X_controlfp(t *TLS, _ ...interface{}) uint32 { } // BOOL QueryPerformanceFrequency( -// LARGE_INTEGER *lpFrequency +// +// LARGE_INTEGER *lpFrequency +// // ); func XQueryPerformanceFrequency(t *TLS, lpFrequency uintptr) int32 { @@ -4605,8 +4915,10 @@ func XDdeQueryStringW(t *TLS, _ ...interface{}) int32 { } // int _wcsicmp( -// const wchar_t *string1, -// const wchar_t *string2 +// +// const wchar_t *string1, +// const wchar_t *string2 +// // ); func X_wcsicmp(t *TLS, string1, string2 uintptr) int32 { return Xwcsicmp(t, string1, string2) @@ -4665,14 +4977,16 @@ func XDdeGetLastError(t *TLS, _ ...interface{}) uint32 { } // HDDEDATA DdeClientTransaction( -// LPBYTE pData, -// DWORD cbData, -// HCONV hConv, -// HSZ hszItem, -// UINT wFmt, -// UINT wType, -// DWORD dwTimeout, -// LPDWORD pdwResult +// +// LPBYTE pData, +// DWORD cbData, +// HCONV hConv, +// HSZ hszItem, +// UINT wFmt, +// UINT wType, +// DWORD dwTimeout, +// LPDWORD pdwResult +// // ); func XDdeClientTransaction(t *TLS, pData uintptr, cbData uint32, hConv uintptr, hszItem uintptr, wFmt, wType, dwTimeout uint32, pdwResult uintptr) uintptr { panic(todo("")) @@ -4735,10 +5049,12 @@ func XRegSetValueExW(t *TLS, _ ...interface{}) int32 { } // int _vsnwprintf( -// wchar_t *buffer, -// size_t count, -// const wchar_t *format, -// va_list argptr +// +// wchar_t *buffer, +// size_t count, +// const wchar_t *format, +// va_list argptr +// // ); func X__mingw_vsnwprintf(t *TLS, buffer uintptr, count types.Size_t, format, va uintptr) int32 { panic(todo("")) @@ -4772,7 +5088,7 @@ func X__mingw_vsnprintf(t *TLS, str uintptr, size types.Size_t, format, ap uintp panic(todo("")) } -//int putchar(int char) +// int putchar(int char) func X_putchar(t *TLS, c int32) int32 { if _, err := fwrite(unistd.STDOUT_FILENO, []byte{byte(c)}); err != nil { return -1 @@ -4801,9 +5117,11 @@ func Xputchar(t *TLS, c int32) int32 { } // void _assert( -// char const* message, -// char const* filename, -// unsigned line +// +// char const* message, +// char const* filename, +// unsigned line +// // ); func X_assert(t *TLS, message, filename uintptr, line uint32) { panic(todo("")) @@ -4815,8 +5133,10 @@ func X_strdup(t *TLS, s uintptr) uintptr { } // int _access( -// const char *path, -// int mode +// +// const char *path, +// int mode +// // ); func X_access(t *TLS, pathname uintptr, mode int32) int32 { @@ -4859,8 +5179,10 @@ func X_access(t *TLS, pathname uintptr, mode int32) int32 { } // BOOL WINAPI SetConsoleCtrlHandler( -// _In_opt_ PHANDLER_ROUTINE HandlerRoutine, -// _In_ BOOL Add +// +// _In_opt_ PHANDLER_ROUTINE HandlerRoutine, +// _In_ BOOL Add +// // ); func XSetConsoleCtrlHandler(t *TLS, HandlerRoutine uintptr, Add int32) int32 { @@ -4913,8 +5235,10 @@ func X_isatty(t *TLS, fd int32) int32 { } // BOOL WINAPI SetConsoleTextAttribute( -// _In_ HANDLE hConsoleOutput, -// _In_ WORD wAttributes +// +// _In_ HANDLE hConsoleOutput, +// _In_ WORD wAttributes +// // ); func XSetConsoleTextAttribute(t *TLS, hConsoleOutput uintptr, wAttributes uint16) int32 { r1, _, _ := syscall.Syscall(procSetConsoleTextAttribute.Addr(), 2, hConsoleOutput, uintptr(wAttributes), 0) @@ -4922,8 +5246,10 @@ func XSetConsoleTextAttribute(t *TLS, hConsoleOutput uintptr, wAttributes uint16 } // BOOL WINAPI GetConsoleScreenBufferInfo( -// _In_ HANDLE hConsoleOutput, -// _Out_ PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo +// +// _In_ HANDLE hConsoleOutput, +// _Out_ PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo +// // ); func XGetConsoleScreenBufferInfo(t *TLS, hConsoleOutput, lpConsoleScreenBufferInfo uintptr) int32 { r1, _, _ := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, hConsoleOutput, lpConsoleScreenBufferInfo, 0) @@ -4931,15 +5257,19 @@ func XGetConsoleScreenBufferInfo(t *TLS, hConsoleOutput, lpConsoleScreenBufferIn } // FILE *_popen( -// const char *command, -// const char *mode +// +// const char *command, +// const char *mode +// // ); func X_popen(t *TLS, command, mode uintptr) uintptr { panic(todo("")) } // int _wunlink( -// const wchar_t *filename +// +// const wchar_t *filename +// // ); func X_wunlink(t *TLS, filename uintptr) int32 { panic(todo("")) @@ -4958,7 +5288,9 @@ func Xreaddir(tls *TLS, dir uintptr) uintptr { } // int _unlink( -// const char *filename +// +// const char *filename +// // ); func X_unlink(t *TLS, filename uintptr) int32 { panic(todo("")) @@ -5106,40 +5438,48 @@ func XGetCommandLineW(t *TLS) uintptr { } // BOOL AddAccessDeniedAce( -// PACL pAcl, -// DWORD dwAceRevision, -// DWORD AccessMask, -// PSID pSid +// +// PACL pAcl, +// DWORD dwAceRevision, +// DWORD AccessMask, +// PSID pSid +// // ); func XAddAccessDeniedAce(t *TLS, pAcl uintptr, dwAceRevision, AccessMask uint32, pSid uintptr) int32 { panic(todo("")) } // BOOL AddAce( -// PACL pAcl, -// DWORD dwAceRevision, -// DWORD dwStartingAceIndex, -// LPVOID pAceList, -// DWORD nAceListLength +// +// PACL pAcl, +// DWORD dwAceRevision, +// DWORD dwStartingAceIndex, +// LPVOID pAceList, +// DWORD nAceListLength +// // ); func XAddAce(t *TLS, pAcl uintptr, dwAceRevision, dwStartingAceIndex uint32, pAceList uintptr, nAceListLength uint32) int32 { panic(todo("")) } // BOOL GetAce( -// PACL pAcl, -// DWORD dwAceIndex, -// LPVOID *pAce +// +// PACL pAcl, +// DWORD dwAceIndex, +// LPVOID *pAce +// // ); func XGetAce(t *TLS, pAcl uintptr, dwAceIndex uint32, pAce uintptr) int32 { panic(todo("")) } // BOOL GetAclInformation( -// PACL pAcl, -// LPVOID pAclInformation, -// DWORD nAclInformationLength, -// ACL_INFORMATION_CLASS dwAclInformationClass +// +// PACL pAcl, +// LPVOID pAclInformation, +// DWORD nAclInformationLength, +// ACL_INFORMATION_CLASS dwAclInformationClass +// // ); func XGetAclInformation(t *TLS, pAcl, pAclInformation uintptr, nAclInformationLength, dwAclInformationClass uint32) int32 { r0, _, err := syscall.Syscall6(procGetAclInformation.Addr(), 4, @@ -5157,11 +5497,13 @@ func XGetAclInformation(t *TLS, pAcl, pAclInformation uintptr, nAclInformationLe } // BOOL GetFileSecurityA( -// LPCSTR lpFileName, -// SECURITY_INFORMATION RequestedInformation, -// PSECURITY_DESCRIPTOR pSecurityDescriptor, -// DWORD nLength, -// LPDWORD lpnLengthNeeded +// +// LPCSTR lpFileName, +// SECURITY_INFORMATION RequestedInformation, +// PSECURITY_DESCRIPTOR pSecurityDescriptor, +// DWORD nLength, +// LPDWORD lpnLengthNeeded +// // ); func XGetFileSecurityA(t *TLS, lpFileName uintptr, RequestedInformation uint32, pSecurityDescriptor uintptr, nLength uint32, lpnLengthNeeded uintptr) int32 { r0, _, err := syscall.Syscall6(procGetFileSecurityA.Addr(), 5, @@ -5179,17 +5521,21 @@ func XGetFileSecurityA(t *TLS, lpFileName uintptr, RequestedInformation uint32, } // DWORD GetLengthSid( -// PSID pSid +// +// PSID pSid +// // ); func XGetLengthSid(t *TLS, pSid uintptr) uint32 { panic(todo("")) } // BOOL GetSecurityDescriptorDacl( -// PSECURITY_DESCRIPTOR pSecurityDescriptor, -// LPBOOL lpbDaclPresent, -// PACL *pDacl, -// LPBOOL lpbDaclDefaulted +// +// PSECURITY_DESCRIPTOR pSecurityDescriptor, +// LPBOOL lpbDaclPresent, +// PACL *pDacl, +// LPBOOL lpbDaclDefaulted +// // ); func XGetSecurityDescriptorDacl(t *TLS, pSecurityDescriptor, lpbDaclPresent, pDacl, lpbDaclDefaulted uintptr) int32 { r0, _, err := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, @@ -5207,7 +5553,9 @@ func XGetSecurityDescriptorDacl(t *TLS, pSecurityDescriptor, lpbDaclPresent, pDa } // DWORD GetSidLengthRequired( -// UCHAR nSubAuthorityCount +// +// UCHAR nSubAuthorityCount +// // ); func XGetSidLengthRequired(t *TLS, nSubAuthorityCount uint8) int32 { r0, _, err := syscall.Syscall(procGetSidLengthRequired.Addr(), 1, uintptr(nSubAuthorityCount), 0, 0) @@ -5218,8 +5566,10 @@ func XGetSidLengthRequired(t *TLS, nSubAuthorityCount uint8) int32 { } // PDWORD GetSidSubAuthority( -// PSID pSid, -// DWORD nSubAuthority +// +// PSID pSid, +// DWORD nSubAuthority +// // ); func XGetSidSubAuthority(t *TLS, pSid uintptr, nSubAuthority uint32) uintptr { r0, _, err := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, pSid, uintptr(nSubAuthority), 0) @@ -5230,18 +5580,22 @@ func XGetSidSubAuthority(t *TLS, pSid uintptr, nSubAuthority uint32) uintptr { } // BOOL InitializeAcl( -// PACL pAcl, -// DWORD nAclLength, -// DWORD dwAclRevision +// +// PACL pAcl, +// DWORD nAclLength, +// DWORD dwAclRevision +// // ); func XInitializeAcl(t *TLS, pAcl uintptr, nAclLength, dwAclRevision uint32) int32 { panic(todo("")) } // BOOL InitializeSid( -// PSID Sid, -// PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, -// BYTE nSubAuthorityCount +// +// PSID Sid, +// PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, +// BYTE nSubAuthorityCount +// // ); func XInitializeSid(t *TLS, Sid, pIdentifierAuthority uintptr, nSubAuthorityCount uint8) int32 { r0, _, err := syscall.Syscall(procInitializeSid.Addr(), 3, Sid, pIdentifierAuthority, uintptr(nSubAuthorityCount)) @@ -5252,46 +5606,54 @@ func XInitializeSid(t *TLS, Sid, pIdentifierAuthority uintptr, nSubAuthorityCoun } // VOID RaiseException( -// DWORD dwExceptionCode, -// DWORD dwExceptionFlags, -// DWORD nNumberOfArguments, -// const ULONG_PTR *lpArguments +// +// DWORD dwExceptionCode, +// DWORD dwExceptionFlags, +// DWORD nNumberOfArguments, +// const ULONG_PTR *lpArguments +// // ); func XRaiseException(t *TLS, dwExceptionCode, dwExceptionFlags, nNumberOfArguments uint32, lpArguments uintptr) { panic(todo("")) } // UINT SetErrorMode( -// UINT uMode +// +// UINT uMode +// // ); func XSetErrorMode(t *TLS, uMode uint32) int32 { panic(todo("")) } // DWORD SetNamedSecurityInfoA( -// LPSTR pObjectName, -// SE_OBJECT_TYPE ObjectType, -// SECURITY_INFORMATION SecurityInfo, -// PSID psidOwner, -// PSID psidGroup, -// PACL pDacl, -// PACL pSacl +// +// LPSTR pObjectName, +// SE_OBJECT_TYPE ObjectType, +// SECURITY_INFORMATION SecurityInfo, +// PSID psidOwner, +// PSID psidGroup, +// PACL pDacl, +// PACL pSacl +// // ); func XSetNamedSecurityInfoA(t *TLS, pObjectName uintptr, ObjectType, SecurityInfo uint32, psidOwner, psidGroup, pDacl, pSacl uintptr) uint32 { panic(todo("")) } // BOOL CreateProcessA( -// LPCSTR lpApplicationName, -// LPSTR lpCommandLine, -// LPSECURITY_ATTRIBUTES lpProcessAttributes, -// LPSECURITY_ATTRIBUTES lpThreadAttributes, -// BOOL bInheritHandles, -// DWORD dwCreationFlags, -// LPVOID lpEnvironment, -// LPCSTR lpCurrentDirectory, -// LPSTARTUPINFOA lpStartupInfo, -// LPPROCESS_INFORMATION lpProcessInformation +// +// LPCSTR lpApplicationName, +// LPSTR lpCommandLine, +// LPSECURITY_ATTRIBUTES lpProcessAttributes, +// LPSECURITY_ATTRIBUTES lpThreadAttributes, +// BOOL bInheritHandles, +// DWORD dwCreationFlags, +// LPVOID lpEnvironment, +// LPCSTR lpCurrentDirectory, +// LPSTARTUPINFOA lpStartupInfo, +// LPPROCESS_INFORMATION lpProcessInformation +// // ); func XCreateProcessA(t *TLS, lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes uintptr, bInheritHandles int32, dwCreationFlags uint32, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation uintptr) int32 { @@ -5308,17 +5670,21 @@ func XCreateProcessA(t *TLS, lpApplicationName, lpCommandLine, lpProcessAttribut } // unsigned int _set_abort_behavior( -// unsigned int flags, -// unsigned int mask +// +// unsigned int flags, +// unsigned int mask +// // ); func X_set_abort_behavior(t *TLS, _ ...interface{}) uint32 { panic(todo("")) } // HANDLE OpenEventA( -// DWORD dwDesiredAccess, -// BOOL bInheritHandle, -// LPCSTR lpName +// +// DWORD dwDesiredAccess, +// BOOL bInheritHandle, +// LPCSTR lpName +// // ); func XOpenEventA(t *TLS, dwDesiredAccess uint32, bInheritHandle uint32, lpName uintptr) uintptr { r0, _, err := syscall.Syscall(procOpenEventA.Addr(), 3, uintptr(dwDesiredAccess), uintptr(bInheritHandle), lpName) @@ -5329,7 +5695,9 @@ func XOpenEventA(t *TLS, dwDesiredAccess uint32, bInheritHandle uint32, lpName u } // size_t _msize( -// void *memblock +// +// void *memblock +// // ); func X_msize(t *TLS, memblock uintptr) types.Size_t { return types.Size_t(UsableSize(memblock)) @@ -5346,39 +5714,49 @@ func X_byteswap_uint64(t *TLS, val uint64) uint64 { } // int _commit( -// int fd +// +// int fd +// // ); func X_commit(t *TLS, fd int32) int32 { return Xfsync(t, fd) } // int _stati64( -// const char *path, -// struct _stati64 *buffer +// +// const char *path, +// struct _stati64 *buffer +// // ); func X_stati64(t *TLS, path, buffer uintptr) int32 { panic(todo("")) } // int _fstati64( -// int fd, -// struct _stati64 *buffer +// +// int fd, +// struct _stati64 *buffer +// // ); func X_fstati64(t *TLS, fd int32, buffer uintptr) int32 { panic(todo("")) } // int _findnext32( -// intptr_t handle, -// struct _finddata32_t *fileinfo +// +// intptr_t handle, +// struct _finddata32_t *fileinfo +// // ); func X_findnext32(t *TLS, handle types.Intptr_t, buffer uintptr) int32 { panic(todo("")) } // intptr_t _findfirst32( -// const char *filespec, -// struct _finddata32_t *fileinfo +// +// const char *filespec, +// struct _finddata32_t *fileinfo +// // ); func X_findfirst32(t *TLS, filespec, fileinfo uintptr) types.Intptr_t { panic(todo("")) @@ -5765,9 +6143,11 @@ func Xchmod(t *TLS, pathname uintptr, mode int32) int32 { // } COMPUTER_NAME_FORMAT; // BOOL GetComputerNameExW( -// [in] COMPUTER_NAME_FORMAT NameType, -// [out] LPWSTR lpBuffer, -// [in, out] LPDWORD nSize +// +// [in] COMPUTER_NAME_FORMAT NameType, +// [out] LPWSTR lpBuffer, +// [in, out] LPDWORD nSize +// // ); func XGetComputerNameExW(t *TLS, nameType int32, lpBuffer, nSize uintptr) int32 { r0, _, err := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nameType), lpBuffer, nSize) @@ -5778,13 +6158,17 @@ func XGetComputerNameExW(t *TLS, nameType int32, lpBuffer, nSize uintptr) int32 } // double _copysign( -// double x, -// double y +// +// double x, +// double y +// // ); func X_copysign(t *TLS, x, y float64) float64 { return Xcopysign(t, x, y) } // int _wtoi( -// const wchar_t *str +// +// const wchar_t *str +// // ); func X_wtoi(t *TLS, str uintptr) int32 { panic(todo("")) @@ -5806,7 +6190,9 @@ func allocW(t *TLS, v string) (r uintptr) { } // wchar_t *_wgetenv( -// const wchar_t *varname +// +// const wchar_t *varname +// // ); func X_wgetenv(t *TLS, varname uintptr) uintptr { if !wenvValid { @@ -5827,7 +6213,9 @@ func X_wgetenv(t *TLS, varname uintptr) uintptr { } // int _wputenv( -// const wchar_t *envstring +// +// const wchar_t *envstring +// // ); func X_wputenv(t *TLS, envstring uintptr) int32 { if !wenvValid { diff --git a/vendor/modernc.org/libc/libc_windows_386.go b/vendor/modernc.org/libc/libc_windows_386.go index 268ba5bd..d48e6f65 100644 --- a/vendor/modernc.org/libc/libc_windows_386.go +++ b/vendor/modernc.org/libc/libc_windows_386.go @@ -11,6 +11,7 @@ import ( "unsafe" "modernc.org/libc/errno" + "modernc.org/libc/sys/stat" "modernc.org/libc/sys/types" ) @@ -511,27 +512,33 @@ func X_gmtime32(t *TLS, sourceTime uintptr) uintptr { } // LONG SetWindowLongW( -// HWND hWnd, -// int nIndex, -// LONG dwNewLong +// +// HWND hWnd, +// int nIndex, +// LONG dwNewLong +// // ); func XSetWindowLongW(t *TLS, hwnd uintptr, nIndex int32, dwNewLong long) long { panic(todo("")) } // LONG GetWindowLongW( -// HWND hWnd, -// int nIndex +// +// HWND hWnd, +// int nIndex +// // ); func XGetWindowLongW(t *TLS, hwnd uintptr, nIndex int32) long { panic(todo("")) } // LRESULT LRESULT DefWindowProcW( -// HWND hWnd, -// UINT Msg, -// WPARAM wParam, -// LPARAM lParam +// +// HWND hWnd, +// UINT Msg, +// WPARAM wParam, +// LPARAM lParam +// // ); func XDefWindowProcW(t *TLS, _ ...interface{}) int32 { panic(todo("")) @@ -540,3 +547,37 @@ func XDefWindowProcW(t *TLS, _ ...interface{}) int32 { func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int32 { panic(todo("")) } + +// int _fstat( +// +// int fd, +// struct __stat *buffer +// +// ); +func X_fstat(t *TLS, fd int32, buffer uintptr) int32 { + f, ok := fdToFile(fd) + if !ok { + t.setErrno(EBADF) + return -1 + } + + var d syscall.ByHandleFileInformation + err := syscall.GetFileInformationByHandle(f.Handle, &d) + if err != nil { + t.setErrno(EBADF) + return -1 + } + + var bStat32 = (*stat.X_stat32)(unsafe.Pointer(buffer)) + var accessTime = int64(d.LastAccessTime.HighDateTime)<<32 + int64(d.LastAccessTime.LowDateTime) + bStat32.Fst_atime = int32(WindowsTickToUnixSeconds(accessTime)) + var modTime = int64(d.LastWriteTime.HighDateTime)<<32 + int64(d.LastWriteTime.LowDateTime) + bStat32.Fst_mtime = int32(WindowsTickToUnixSeconds(modTime)) + var crTime = int64(d.CreationTime.HighDateTime)<<32 + int64(d.CreationTime.LowDateTime) + bStat32.Fst_ctime = int32(WindowsTickToUnixSeconds(crTime)) + var fSz = int64(d.FileSizeHigh)<<32 + int64(d.FileSizeLow) + bStat32.Fst_size = int32(fSz) + bStat32.Fst_mode = WindowsAttrbiutesToStat(d.FileAttributes) + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_windows_amd64.go b/vendor/modernc.org/libc/libc_windows_amd64.go index 10cdf904..2b73ab4c 100644 --- a/vendor/modernc.org/libc/libc_windows_amd64.go +++ b/vendor/modernc.org/libc/libc_windows_amd64.go @@ -499,10 +499,12 @@ func Xaccept(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) uint64 { } // LRESULT LRESULT DefWindowProcW( -// HWND hWnd, -// UINT Msg, -// WPARAM wParam, -// LPARAM lParam +// +// HWND hWnd, +// UINT Msg, +// WPARAM wParam, +// LPARAM lParam +// // ); func XDefWindowProcW(t *TLS, _ ...interface{}) int64 { panic(todo("")) diff --git a/vendor/modernc.org/libc/libc_windows_arm64.go b/vendor/modernc.org/libc/libc_windows_arm64.go index 10cdf904..2b73ab4c 100644 --- a/vendor/modernc.org/libc/libc_windows_arm64.go +++ b/vendor/modernc.org/libc/libc_windows_arm64.go @@ -499,10 +499,12 @@ func Xaccept(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) uint64 { } // LRESULT LRESULT DefWindowProcW( -// HWND hWnd, -// UINT Msg, -// WPARAM wParam, -// LPARAM lParam +// +// HWND hWnd, +// UINT Msg, +// WPARAM wParam, +// LPARAM lParam +// // ); func XDefWindowProcW(t *TLS, _ ...interface{}) int64 { panic(todo("")) diff --git a/vendor/modernc.org/libc/limits/capi_darwin_amd64.go b/vendor/modernc.org/libc/limits/capi_darwin_amd64.go index 5f13594d..92b08b34 100644 --- a/vendor/modernc.org/libc/limits/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/limits/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o limits/limits_darwin_amd64.go -pkgname limits', DO NOT EDIT. +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_darwin_amd64.go -pkgname limits', DO NOT EDIT. package limits diff --git a/vendor/modernc.org/libc/limits/capi_freebsd_arm.go b/vendor/modernc.org/libc/limits/capi_freebsd_arm.go new file mode 100644 index 00000000..6cd02b3b --- /dev/null +++ b/vendor/modernc.org/libc/limits/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_freebsd_arm.go -pkgname limits', DO NOT EDIT. + +package limits + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/limits/capi_freebsd_arm64.go b/vendor/modernc.org/libc/limits/capi_freebsd_arm64.go new file mode 100644 index 00000000..ed2bf479 --- /dev/null +++ b/vendor/modernc.org/libc/limits/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_freebsd_amd64.go -pkgname limits', DO NOT EDIT. + +package limits + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/limits/capi_netbsd_arm.go b/vendor/modernc.org/libc/limits/capi_netbsd_arm.go new file mode 100644 index 00000000..889a2e57 --- /dev/null +++ b/vendor/modernc.org/libc/limits/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_netbsd_arm.go -pkgname limits', DO NOT EDIT. + +package limits + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/limits/capi_openbsd_386.go b/vendor/modernc.org/libc/limits/capi_openbsd_386.go new file mode 100644 index 00000000..e4858389 --- /dev/null +++ b/vendor/modernc.org/libc/limits/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_openbsd_386.go -pkgname limits', DO NOT EDIT. + +package limits + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/limits/capi_openbsd_arm64.go b/vendor/modernc.org/libc/limits/capi_openbsd_arm64.go new file mode 100644 index 00000000..eed11e7c --- /dev/null +++ b/vendor/modernc.org/libc/limits/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_openbsd_arm64.go -pkgname limits', DO NOT EDIT. + +package limits + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/limits/capi_windows_386.go b/vendor/modernc.org/libc/limits/capi_windows_386.go index 80740cb5..190a6fd6 100644 --- a/vendor/modernc.org/libc/limits/capi_windows_386.go +++ b/vendor/modernc.org/libc/limits/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo limits\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o limits\limits_windows_386.go -pkgname limits', DO NOT EDIT. +// Code generated by 'ccgo limits/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_windows_386.go -pkgname limits', DO NOT EDIT. package limits diff --git a/vendor/modernc.org/libc/limits/limits_freebsd_amd64.go b/vendor/modernc.org/libc/limits/limits_freebsd_amd64.go index 7f72a888..917b3fee 100644 --- a/vendor/modernc.org/libc/limits/limits_freebsd_amd64.go +++ b/vendor/modernc.org/libc/limits/limits_freebsd_amd64.go @@ -76,9 +76,9 @@ const ( X_LIMITS_H_ = 0 // limits.h:36:1: X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_POSIX2_BC_BASE_MAX = 99 // limits.h:75:1: X_POSIX2_BC_DIM_MAX = 2048 // limits.h:76:1: X_POSIX2_BC_SCALE_MAX = 99 // limits.h:77:1: @@ -133,7 +133,7 @@ const ( X_XOPEN_IOV_MAX = 16 // limits.h:132:1: X_XOPEN_NAME_MAX = 255 // limits.h:133:1: X_XOPEN_PATH_MAX = 1024 // limits.h:134:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -403,12 +403,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-3-Clause // diff --git a/vendor/modernc.org/libc/limits/limits_freebsd_arm.go b/vendor/modernc.org/libc/limits/limits_freebsd_arm.go new file mode 100644 index 00000000..ac40c040 --- /dev/null +++ b/vendor/modernc.org/libc/limits/limits_freebsd_arm.go @@ -0,0 +1,564 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_freebsd_arm.go -pkgname limits', DO NOT EDIT. + +package limits + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ARG_MAX = 262144 // syslimits.h:54:1: + BC_BASE_MAX = 99 // limits.h:65:1: + BC_DIM_MAX = 2048 // limits.h:66:1: + BC_SCALE_MAX = 99 // limits.h:67:1: + BC_STRING_MAX = 1000 // limits.h:68:1: + CHARCLASS_NAME_MAX = 14 // limits.h:69:1: + CHAR_BIT = 8 // limits.h:40:1: + CHAR_MAX = 255 // limits.h:48:1: + CHAR_MIN = 0 // limits.h:49:1: + CHILD_MAX = 40 // syslimits.h:57:1: + COLL_WEIGHTS_MAX = 10 // limits.h:70:1: + EXPR_NEST_MAX = 32 // limits.h:71:1: + GID_MAX = 4294967295 // limits.h:85:1: + INT_MAX = 2147483647 // limits.h:60:1: + INT_MIN = -2147483648 // limits.h:61:1: + IOV_MAX = 1024 // syslimits.h:70:1: + LINE_MAX = 2048 // limits.h:72:1: + LLONG_MAX = 9223372036854775807 // limits.h:69:1: + LLONG_MIN = -9223372036854775808 // limits.h:70:1: + LONG_BIT = 32 // limits.h:94:1: + LONG_MAX = 2147483647 // limits.h:64:1: + LONG_MIN = -2147483648 // limits.h:65:1: + MAX_CANON = 255 // syslimits.h:59:1: + MAX_INPUT = 255 // syslimits.h:60:1: + MB_LEN_MAX = 6 // limits.h:141:1: + MQ_PRIO_MAX = 64 // limits.h:99:1: + NAME_MAX = 255 // syslimits.h:61:1: + NGROUPS_MAX = 1023 // syslimits.h:63:1: + NL_ARGMAX = 4096 // limits.h:125:1: + NL_LANGMAX = 31 // limits.h:137:1: + NL_MSGMAX = 32767 // limits.h:126:1: + NL_NMAX = 1 // limits.h:138:1: + NL_SETMAX = 255 // limits.h:127:1: + NL_TEXTMAX = 2048 // limits.h:128:1: + OFF_MAX = 9223372036854775807 // limits.h:80:1: + OFF_MIN = -9223372036854775808 // limits.h:81:1: + OPEN_MAX = 64 // syslimits.h:66:1: + PASS_MAX = 128 // limits.h:135:1: + PATH_MAX = 1024 // syslimits.h:68:1: + PIPE_BUF = 512 // syslimits.h:69:1: + QUAD_MAX = 9223372036854775807 // limits.h:89:1: + QUAD_MIN = -9223372036854775808 // limits.h:90:1: + RE_DUP_MAX = 255 // limits.h:73:1: + SCHAR_MAX = 127 // limits.h:42:1: + SCHAR_MIN = -128 // limits.h:43:1: + SHRT_MAX = 32767 // limits.h:56:1: + SHRT_MIN = -32768 // limits.h:57:1: + SIZE_T_MAX = 4294967295 // limits.h:78:1: + SSIZE_MAX = 2147483647 // limits.h:74:1: + UCHAR_MAX = 255 // limits.h:45:1: + UID_MAX = 4294967295 // limits.h:86:1: + UINT_MAX = 4294967295 // limits.h:59:1: + ULLONG_MAX = 18446744073709551615 // limits.h:68:1: + ULONG_MAX = 4294967295 // limits.h:63:1: + UQUAD_MAX = 18446744073709551615 // limits.h:88:1: + USHRT_MAX = 65535 // limits.h:55:1: + WORD_BIT = 32 // limits.h:95:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LIMITS_H_ = 0 // limits.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:75:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:76:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:77:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:78:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:80:1: + X_POSIX2_EQUIV_CLASS_MAX = 2 // limits.h:81:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:82:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:83:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:84:1: + X_POSIX_AIO_LISTIO_MAX = 2 // limits.h:89:1: + X_POSIX_AIO_MAX = 1 // limits.h:90:1: + X_POSIX_ARG_MAX = 4096 // limits.h:41:1: + X_POSIX_CHILD_MAX = 25 // limits.h:51:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:100:1: + X_POSIX_DELAYTIMER_MAX = 32 // limits.h:91:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:110:1: + X_POSIX_LINK_MAX = 8 // limits.h:42:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:111:1: + X_POSIX_MAX_CANON = 255 // limits.h:43:1: + X_POSIX_MAX_INPUT = 255 // limits.h:44:1: + X_POSIX_MQ_OPEN_MAX = 8 // limits.h:92:1: + X_POSIX_MQ_PRIO_MAX = 32 // limits.h:93:1: + X_POSIX_NAME_MAX = 14 // limits.h:45:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:52:1: + X_POSIX_OPEN_MAX = 20 // limits.h:53:1: + X_POSIX_PATH_MAX = 256 // limits.h:54:1: + X_POSIX_PIPE_BUF = 512 // limits.h:46:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:121:1: + X_POSIX_RTSIG_MAX = 8 // limits.h:94:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:95:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:96:1: + X_POSIX_SIGQUEUE_MAX = 32 // limits.h:97:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:47:1: + X_POSIX_SS_REPL_MAX = 4 // limits.h:112:1: + X_POSIX_STREAM_MAX = 8 // limits.h:48:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:113:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:114:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:104:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:105:1: + X_POSIX_THREAD_THREADS_MAX = 64 // limits.h:106:1: + X_POSIX_TIMER_MAX = 32 // limits.h:98:1: + X_POSIX_TRACE_EVENT_NAME_MAX = 30 // limits.h:115:1: + X_POSIX_TRACE_NAME_MAX = 8 // limits.h:116:1: + X_POSIX_TRACE_SYS_MAX = 8 // limits.h:117:1: + X_POSIX_TRACE_USER_EVENT_MAX = 32 // limits.h:118:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:119:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:55:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_LIMITS_H_ = 0 // limits.h:35:1: + X_SYS_SYSLIMITS_H_ = 0 // syslimits.h:36:1: + X_XOPEN_IOV_MAX = 16 // limits.h:132:1: + X_XOPEN_NAME_MAX = 255 // limits.h:133:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:134:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.2 (Berkeley) 1/4/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and long longs are the same size. Ensure they stay in sync. + +// Minimum signal stack size. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)syslimits.h 8.1 (Berkeley) 6/2/93 +// $FreeBSD$ + +// Do not add any new variables here. (See the comment at the end of +// the file for why.) + +// We leave the following values undefined to force applications to either +// assume conservative values or call sysconf() to get the current value. +// +// HOST_NAME_MAX +// +// (We should do this for most of the values currently defined here, +// but many programs are not prepared to deal with this yet.) + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/limits/limits_freebsd_arm64.go b/vendor/modernc.org/libc/limits/limits_freebsd_arm64.go new file mode 100644 index 00000000..917b3fee --- /dev/null +++ b/vendor/modernc.org/libc/limits/limits_freebsd_arm64.go @@ -0,0 +1,577 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_freebsd_amd64.go -pkgname limits', DO NOT EDIT. + +package limits + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ARG_MAX = 524288 // syslimits.h:52:1: + BC_BASE_MAX = 99 // limits.h:65:1: + BC_DIM_MAX = 2048 // limits.h:66:1: + BC_SCALE_MAX = 99 // limits.h:67:1: + BC_STRING_MAX = 1000 // limits.h:68:1: + CHARCLASS_NAME_MAX = 14 // limits.h:69:1: + CHAR_BIT = 8 // limits.h:40:1: + CHAR_MAX = 127 // limits.h:51:1: + CHAR_MIN = -128 // limits.h:52:1: + CHILD_MAX = 40 // syslimits.h:57:1: + COLL_WEIGHTS_MAX = 10 // limits.h:70:1: + EXPR_NEST_MAX = 32 // limits.h:71:1: + GID_MAX = 4294967295 // limits.h:85:1: + INT_MAX = 2147483647 // limits.h:60:1: + INT_MIN = -2147483648 // limits.h:61:1: + IOV_MAX = 1024 // syslimits.h:70:1: + LINE_MAX = 2048 // limits.h:72:1: + LLONG_MAX = 9223372036854775807 // limits.h:69:1: + LLONG_MIN = -9223372036854775808 // limits.h:70:1: + LONG_BIT = 64 // limits.h:94:1: + LONG_MAX = 9223372036854775807 // limits.h:64:1: + LONG_MIN = -9223372036854775808 // limits.h:65:1: + MAX_CANON = 255 // syslimits.h:59:1: + MAX_INPUT = 255 // syslimits.h:60:1: + MB_LEN_MAX = 6 // limits.h:141:1: + MQ_PRIO_MAX = 64 // limits.h:99:1: + NAME_MAX = 255 // syslimits.h:61:1: + NGROUPS_MAX = 1023 // syslimits.h:63:1: + NL_ARGMAX = 4096 // limits.h:125:1: + NL_LANGMAX = 31 // limits.h:137:1: + NL_MSGMAX = 32767 // limits.h:126:1: + NL_NMAX = 1 // limits.h:138:1: + NL_SETMAX = 255 // limits.h:127:1: + NL_TEXTMAX = 2048 // limits.h:128:1: + OFF_MAX = 9223372036854775807 // limits.h:80:1: + OFF_MIN = -9223372036854775808 // limits.h:81:1: + OPEN_MAX = 64 // syslimits.h:66:1: + PASS_MAX = 128 // limits.h:135:1: + PATH_MAX = 1024 // syslimits.h:68:1: + PIPE_BUF = 512 // syslimits.h:69:1: + QUAD_MAX = 9223372036854775807 // limits.h:89:1: + QUAD_MIN = -9223372036854775808 // limits.h:90:1: + RE_DUP_MAX = 255 // limits.h:73:1: + SCHAR_MAX = 127 // limits.h:42:1: + SCHAR_MIN = -128 // limits.h:43:1: + SHRT_MAX = 32767 // limits.h:56:1: + SHRT_MIN = -32768 // limits.h:57:1: + SIZE_T_MAX = 18446744073709551615 // limits.h:78:1: + SSIZE_MAX = 9223372036854775807 // limits.h:74:1: + UCHAR_MAX = 255 // limits.h:45:1: + UID_MAX = 4294967295 // limits.h:86:1: + UINT_MAX = 4294967295 // limits.h:59:1: + ULLONG_MAX = 18446744073709551615 // limits.h:68:1: + ULONG_MAX = 18446744073709551615 // limits.h:63:1: + UQUAD_MAX = 18446744073709551615 // limits.h:88:1: + USHRT_MAX = 65535 // limits.h:55:1: + WORD_BIT = 32 // limits.h:95:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIMITS_H_ = 0 // limits.h:36:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:75:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:76:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:77:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:78:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:80:1: + X_POSIX2_EQUIV_CLASS_MAX = 2 // limits.h:81:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:82:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:83:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:84:1: + X_POSIX_AIO_LISTIO_MAX = 2 // limits.h:89:1: + X_POSIX_AIO_MAX = 1 // limits.h:90:1: + X_POSIX_ARG_MAX = 4096 // limits.h:41:1: + X_POSIX_CHILD_MAX = 25 // limits.h:51:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:100:1: + X_POSIX_DELAYTIMER_MAX = 32 // limits.h:91:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:110:1: + X_POSIX_LINK_MAX = 8 // limits.h:42:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:111:1: + X_POSIX_MAX_CANON = 255 // limits.h:43:1: + X_POSIX_MAX_INPUT = 255 // limits.h:44:1: + X_POSIX_MQ_OPEN_MAX = 8 // limits.h:92:1: + X_POSIX_MQ_PRIO_MAX = 32 // limits.h:93:1: + X_POSIX_NAME_MAX = 14 // limits.h:45:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:52:1: + X_POSIX_OPEN_MAX = 20 // limits.h:53:1: + X_POSIX_PATH_MAX = 256 // limits.h:54:1: + X_POSIX_PIPE_BUF = 512 // limits.h:46:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:121:1: + X_POSIX_RTSIG_MAX = 8 // limits.h:94:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:95:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:96:1: + X_POSIX_SIGQUEUE_MAX = 32 // limits.h:97:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:47:1: + X_POSIX_SS_REPL_MAX = 4 // limits.h:112:1: + X_POSIX_STREAM_MAX = 8 // limits.h:48:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:113:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:114:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:104:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:105:1: + X_POSIX_THREAD_THREADS_MAX = 64 // limits.h:106:1: + X_POSIX_TIMER_MAX = 32 // limits.h:98:1: + X_POSIX_TRACE_EVENT_NAME_MAX = 30 // limits.h:115:1: + X_POSIX_TRACE_NAME_MAX = 8 // limits.h:116:1: + X_POSIX_TRACE_SYS_MAX = 8 // limits.h:117:1: + X_POSIX_TRACE_USER_EVENT_MAX = 32 // limits.h:118:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:119:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:55:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_LIMITS_H_ = 0 // limits.h:35:1: + X_SYS_SYSLIMITS_H_ = 0 // syslimits.h:36:1: + X_XOPEN_IOV_MAX = 16 // limits.h:132:1: + X_XOPEN_NAME_MAX = 255 // limits.h:133:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:134:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.2 (Berkeley) 1/4/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)syslimits.h 8.1 (Berkeley) 6/2/93 +// $FreeBSD$ + +// Do not add any new variables here. (See the comment at the end of +// the file for why.) + +// We leave the following values undefined to force applications to either +// assume conservative values or call sysconf() to get the current value. +// +// HOST_NAME_MAX +// +// (We should do this for most of the values currently defined here, +// but many programs are not prepared to deal with this yet.) + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/limits/limits_netbsd_arm.go b/vendor/modernc.org/libc/limits/limits_netbsd_arm.go new file mode 100644 index 00000000..5d4b54de --- /dev/null +++ b/vendor/modernc.org/libc/limits/limits_netbsd_arm.go @@ -0,0 +1,450 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_netbsd_arm.go -pkgname limits', DO NOT EDIT. + +package limits + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ARG_MAX = 262144 // syslimits.h:45:1: + BC_BASE_MAX = 2147483647 // syslimits.h:63:1: + BC_DIM_MAX = 65535 // syslimits.h:64:1: + BC_SCALE_MAX = 2147483647 // syslimits.h:65:1: + BC_STRING_MAX = 2147483647 // syslimits.h:66:1: + CHARCLASS_NAME_MAX = 14 // limits.h:125:1: + CHAR_BIT = 8 // limits.h:39:1: + CHAR_MAX = 255 // limits.h:160:1: + CHAR_MIN = 0 // limits.h:159:1: + CHILD_MAX = 160 // syslimits.h:47:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:67:1: + DBL_DIG = 15 // limits.h:93:1: + EXPR_NEST_MAX = 32 // syslimits.h:68:1: + FLT_DIG = 6 // limits.h:97:1: + GID_MAX = 2147483647 // syslimits.h:49:1: + INT_MAX = 0x7fffffff // limits.h:50:1: + INT_MIN = -2147483648 // limits.h:51:1: + IOV_MAX = 1024 // syslimits.h:84:1: + LINE_MAX = 2048 // syslimits.h:69:1: + LINK_MAX = 32767 // syslimits.h:50:1: + LLONG_MAX = 0x7fffffffffffffff // limits.h:66:1: + LLONG_MIN = -9223372036854775808 // limits.h:67:1: + LOGIN_NAME_MAX = 17 // syslimits.h:77:1: + LONG_BIT = 32 // limits.h:89:1: + LONG_MAX = 0x7fffffff // limits.h:59:1: + LONG_MIN = -2147483648 // limits.h:60:1: + MAX_CANON = 255 // syslimits.h:51:1: + MAX_INPUT = 255 // syslimits.h:52:1: + MB_LEN_MAX = 32 // limits.h:145:1: + NAME_MAX = 511 // syslimits.h:53:1: + NGROUPS_MAX = 16 // syslimits.h:55:1: + NL_ARGMAX = 9 // limits.h:126:1: + NL_LANGMAX = 14 // limits.h:127:1: + NL_MSGMAX = 32767 // limits.h:128:1: + NL_NMAX = 1 // limits.h:129:1: + NL_SETMAX = 255 // limits.h:130:1: + NL_TEXTMAX = 2048 // limits.h:131:1: + NZERO = 20 // syslimits.h:85:1: + OPEN_MAX = 128 // syslimits.h:58:1: + PASS_MAX = 128 // limits.h:123:1: + PATH_MAX = 1024 // syslimits.h:60:1: + PIPE_BUF = 512 // syslimits.h:61:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:90:1: + PTHREAD_KEYS_MAX = 256 // limits.h:91:1: + PTHREAD_THREADS_MAX = 64 // limits.h:93:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:79:1: + QUAD_MIN = -9223372036854775808 // limits.h:80:1: + RE_DUP_MAX = 255 // syslimits.h:70:1: + SCHAR_MAX = 0x7f // limits.h:42:1: + SCHAR_MIN = -128 // limits.h:43:1: + SHRT_MAX = 0x7fff // limits.h:46:1: + SHRT_MIN = -32768 // limits.h:47:1: + SIZE_T_MAX = 4294967295 // limits.h:76:1: + SSIZE_MAX = 2147483647 // limits.h:72:1: + SSIZE_MIN = -2147483648 // limits.h:75:1: + TMP_MAX = 308915776 // limits.h:139:1: + UCHAR_MAX = 0xff // limits.h:41:1: + UID_MAX = 2147483647 // syslimits.h:56:1: + UINT_MAX = 0xffffffff // limits.h:49:1: + ULLONG_MAX = 0xffffffffffffffff // limits.h:65:1: + ULONG_MAX = 0xffffffff // limits.h:58:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:78:1: + USHRT_MAX = 0xffff // limits.h:45:1: + WORD_BIT = 32 // limits.h:91:1: + X_ARM_LIMITS_H_ = 0 // limits.h:35:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GETGR_R_SIZE_MAX = 1024 // limits.h:134:1: + X_GETPW_R_SIZE_MAX = 1024 // limits.h:135:1: + X_LIMITS_H_ = 0 // limits.h:35:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:103:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:104:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:105:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:106:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:107:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:108:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:109:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:110:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:111:1: + X_POSIX_AIO_LISTIO_MAX = 2 // limits.h:41:1: + X_POSIX_AIO_MAX = 1 // limits.h:42:1: + X_POSIX_ARG_MAX = 4096 // limits.h:43:1: + X_POSIX_CHILD_MAX = 25 // limits.h:44:1: + X_POSIX_DELAYTIMER_MAX = 32 // limits.h:99:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:45:1: + X_POSIX_LINK_MAX = 8 // limits.h:46:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:47:1: + X_POSIX_MAX_CANON = 255 // limits.h:48:1: + X_POSIX_MAX_INPUT = 255 // limits.h:49:1: + X_POSIX_MQ_OPEN_MAX = 8 // limits.h:50:1: + X_POSIX_MQ_PRIO_MAX = 32 // limits.h:51:1: + X_POSIX_NAME_MAX = 14 // limits.h:52:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:53:1: + X_POSIX_OPEN_MAX = 20 // limits.h:54:1: + X_POSIX_PATH_MAX = 256 // limits.h:55:1: + X_POSIX_PIPE_BUF = 512 // limits.h:56:1: + X_POSIX_REALTIME_SIGNALS = 200112 // limits.h:98:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:57:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:96:1: + X_POSIX_SIGQUEUE_MAX = 32 // limits.h:97:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:58:1: + X_POSIX_STREAM_MAX = 8 // limits.h:59:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:60:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:61:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:81:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:82:1: + X_POSIX_THREAD_THREADS_MAX = 64 // limits.h:83:1: + X_POSIX_TIMER_MAX = 32 // limits.h:95:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:100:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:101:1: + X_SYS_SYSLIMITS_H_ = 0 // syslimits.h:35:1: + X_XOPEN_IOV_MAX = 16 // limits.h:119:1: + X_XOPEN_NAME_MAX = 256 // limits.h:120:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:121:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// 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 + +// 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. +// Not yet: PTHREAD_STACK_MIN + +// X/Open CAE Specifications, +// adopted in IEEE Std 1003.1-2001 XSI. + +// IEEE Std 1003.1-2001 TSF + +// Always ensure that this is consistent with <stdio.h> + +// X/Open Extended API set 2 (a.k.a. C063) +// This hides unimplemented functions from GNU configure until +// we are done implementing them. + +// $NetBSD: limits.h,v 1.19 2019/01/21 20:28:17 dholland 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. +// +// from: @(#)limits.h 7.2 (Berkeley) 6/28/90 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// kept in sync with MAXNAMLEN + +// IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version 2 + +// X/Open CAE Specification Issue 5 Version 2 + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/limits/limits_openbsd_386.go b/vendor/modernc.org/libc/limits/limits_openbsd_386.go new file mode 100644 index 00000000..91a50738 --- /dev/null +++ b/vendor/modernc.org/libc/limits/limits_openbsd_386.go @@ -0,0 +1,529 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_openbsd_386.go -pkgname limits', DO NOT EDIT. + +package limits + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ARG_MAX = 524288 // syslimits.h:38:1: + BC_BASE_MAX = 2147483647 // syslimits.h:51:1: + BC_DIM_MAX = 65535 // syslimits.h:52:1: + BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: + BC_STRING_MAX = 2147483647 // syslimits.h:54:1: + CHAR_BIT = 8 // limits.h:36:1: + CHAR_MAX = 0x7f // limits.h:46:1: + CHAR_MIN = -128 // limits.h:47:1: + CHILD_MAX = 80 // syslimits.h:39:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: + EXPR_NEST_MAX = 32 // syslimits.h:56:1: + GID_MAX = 4294967295 // limits.h:84:1: + HOST_NAME_MAX = 255 // syslimits.h:76:1: + INT_MAX = 0x7fffffff // limits.h:57:1: + INT_MIN = -2147483648 // limits.h:58:1: + IOV_MAX = 1024 // syslimits.h:64:1: + LINE_MAX = 2048 // syslimits.h:57:1: + LINK_MAX = 32767 // syslimits.h:40:1: + LLONG_MAX = 0x7fffffffffffffff // limits.h:76:1: + LLONG_MIN = -9223372036854775808 // limits.h:78:1: + LOGIN_NAME_MAX = 32 // syslimits.h:72:1: + LONG_BIT = 32 // limits.h:91:1: + LONG_MAX = 0x7fffffff // limits.h:69:1: + LONG_MIN = -2147483648 // limits.h:70:1: + MAX_CANON = 255 // syslimits.h:41:1: + MAX_INPUT = 255 // syslimits.h:42:1: + MB_LEN_MAX = 4 // limits.h:50:1: + NAME_MAX = 255 // syslimits.h:43:1: + NGROUPS_MAX = 16 // syslimits.h:44:1: + NL_ARGMAX = 9 // limits.h:89:1: + NL_LANGMAX = 14 // limits.h:90:1: + NL_MSGMAX = 32767 // limits.h:91:1: + NL_SETMAX = 255 // limits.h:92:1: + NL_TEXTMAX = 255 // limits.h:93:1: + NZERO = 20 // syslimits.h:65:1: + OPEN_MAX = 64 // syslimits.h:45:1: + PATH_MAX = 1024 // syslimits.h:46:1: + PIPE_BUF = 512 // syslimits.h:47:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:48:1: + QUAD_MIN = -9223372036854775808 // limits.h:49:1: + RE_DUP_MAX = 255 // syslimits.h:59:1: + SCHAR_MAX = 0x7f // limits.h:38:1: + SCHAR_MIN = -128 // limits.h:39:1: + SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: + SHRT_MAX = 0x7fff // limits.h:53:1: + SHRT_MIN = -32768 // limits.h:54:1: + SIZE_T_MAX = 4294967295 // limits.h:45:1: + SSIZE_MAX = 2147483647 // limits.h:41:1: + SYMLINK_MAX = 1024 // syslimits.h:48:1: + SYMLOOP_MAX = 32 // syslimits.h:49:1: + TTY_NAME_MAX = 260 // syslimits.h:71:1: + UCHAR_MAX = 0xff // limits.h:41:1: + UID_MAX = 4294967295 // limits.h:83:1: + UINT_MAX = 0xffffffff // limits.h:56:1: + ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: + ULONG_MAX = 0xffffffff // limits.h:68:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:47:1: + USHRT_MAX = 0xffff // limits.h:52:1: + WORD_BIT = 32 // limits.h:93:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LIMITS_H_ = 0 // limits.h:36:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:74:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:75:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:76:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:77:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:78:1: + X_POSIX_ARG_MAX = 4096 // limits.h:41:1: + X_POSIX_CHILD_MAX = 25 // limits.h:42:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:61:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:82:1: + X_POSIX_LINK_MAX = 8 // limits.h:43:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:83:1: + X_POSIX_MAX_CANON = 255 // limits.h:44:1: + X_POSIX_MAX_INPUT = 255 // limits.h:45:1: + X_POSIX_NAME_MAX = 14 // limits.h:46:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:62:1: + X_POSIX_OPEN_MAX = 20 // limits.h:63:1: + X_POSIX_PATH_MAX = 256 // limits.h:47:1: + X_POSIX_PIPE_BUF = 512 // limits.h:48:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:49:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:50:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:51:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:52:1: + X_POSIX_STREAM_MAX = 8 // limits.h:53:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:54:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:55:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:56:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:57:1: + X_POSIX_THREAD_THREADS_MAX = 4 // limits.h:58:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:84:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:64:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_LIMITS_H_ = 0 // limits.h:27:1: + X_XOPEN_IOV_MAX = 16 // limits.h:106:1: + X_XOPEN_NAME_MAX = 255 // limits.h:107:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ +// $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd 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 5.9 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ +// Copyright (c) 2002 Marc Espie. +// +// 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 OPENBSD PROJECT 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 OPENBSD +// PROJECT 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// Common definitions for limits.h. + +// Legacy +// $OpenBSD: limits.h,v 1.14 2015/04/30 13:42:08 millert Exp $ +// $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// max value for unsigned long long +// max value for a signed long long +// min value for a signed long long + +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ +// $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go b/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go index 082e9f0c..897fff01 100644 --- a/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go +++ b/vendor/modernc.org/libc/limits/limits_openbsd_amd64.go @@ -79,6 +79,7 @@ const ( X_LP64 = 1 // <predefined>:1:1: X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: X_MACHINE_LIMITS_H_ = 0 // limits.h:35:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: @@ -119,7 +120,7 @@ const ( X_XOPEN_IOV_MAX = 16 // limits.h:106:1: X_XOPEN_NAME_MAX = 255 // limits.h:107:1: X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -470,7 +471,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // max value for a signed long long // min value for a signed long long -// $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ // Copyright (c) 1988, 1993 diff --git a/vendor/modernc.org/libc/limits/limits_openbsd_arm64.go b/vendor/modernc.org/libc/limits/limits_openbsd_arm64.go new file mode 100644 index 00000000..20efc358 --- /dev/null +++ b/vendor/modernc.org/libc/limits/limits_openbsd_arm64.go @@ -0,0 +1,540 @@ +// Code generated by 'ccgo limits/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_openbsd_arm64.go -pkgname limits', DO NOT EDIT. + +package limits + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ARG_MAX = 524288 // syslimits.h:38:1: + BC_BASE_MAX = 2147483647 // syslimits.h:51:1: + BC_DIM_MAX = 65535 // syslimits.h:52:1: + BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: + BC_STRING_MAX = 2147483647 // syslimits.h:54:1: + CHAR_BIT = 8 // limits.h:36:1: + CHAR_MAX = 0xff // limits.h:44:1: + CHAR_MIN = 0 // limits.h:43:1: + CHILD_MAX = 80 // syslimits.h:39:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: + EXPR_NEST_MAX = 32 // syslimits.h:56:1: + GID_MAX = 4294967295 // limits.h:84:1: + HOST_NAME_MAX = 255 // syslimits.h:76:1: + INT_MAX = 0x7fffffff // limits.h:57:1: + INT_MIN = -2147483648 // limits.h:58:1: + IOV_MAX = 1024 // syslimits.h:64:1: + LINE_MAX = 2048 // syslimits.h:57:1: + LINK_MAX = 32767 // syslimits.h:40:1: + LLONG_MAX = 0x7fffffffffffffff // limits.h:76:1: + LLONG_MIN = -9223372036854775808 // limits.h:78:1: + LOGIN_NAME_MAX = 32 // syslimits.h:72:1: + LONG_BIT = 64 // limits.h:89:1: + LONG_MAX = 0x7fffffffffffffff // limits.h:63:1: + LONG_MIN = -9223372036854775808 // limits.h:65:1: + MAX_CANON = 255 // syslimits.h:41:1: + MAX_INPUT = 255 // syslimits.h:42:1: + MB_LEN_MAX = 4 // limits.h:50:1: + NAME_MAX = 255 // syslimits.h:43:1: + NGROUPS_MAX = 16 // syslimits.h:44:1: + NL_ARGMAX = 9 // limits.h:89:1: + NL_LANGMAX = 14 // limits.h:90:1: + NL_MSGMAX = 32767 // limits.h:91:1: + NL_SETMAX = 255 // limits.h:92:1: + NL_TEXTMAX = 255 // limits.h:93:1: + NZERO = 20 // syslimits.h:65:1: + OPEN_MAX = 64 // syslimits.h:45:1: + PATH_MAX = 1024 // syslimits.h:46:1: + PIPE_BUF = 512 // syslimits.h:47:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:51:1: + QUAD_MIN = -9223372036854775808 // limits.h:52:1: + RE_DUP_MAX = 255 // syslimits.h:59:1: + SCHAR_MAX = 0x7f // limits.h:38:1: + SCHAR_MIN = -128 // limits.h:39:1: + SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: + SHRT_MAX = 0x7fff // limits.h:53:1: + SHRT_MIN = -32768 // limits.h:54:1: + SIZE_MAX = 18446744073709551615 // limits.h:42:1: + SIZE_T_MAX = 18446744073709551615 // limits.h:48:1: + SSIZE_MAX = 9223372036854775807 // limits.h:44:1: + SYMLINK_MAX = 1024 // syslimits.h:48:1: + SYMLOOP_MAX = 32 // syslimits.h:49:1: + TTY_NAME_MAX = 260 // syslimits.h:71:1: + UCHAR_MAX = 0xff // limits.h:41:1: + UID_MAX = 4294967295 // limits.h:83:1: + UINT_MAX = 0xffffffff // limits.h:56:1: + ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: + ULONG_MAX = 0xffffffffffffffff // limits.h:61:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:50:1: + USHRT_MAX = 0xffff // limits.h:52:1: + WORD_BIT = 32 // limits.h:93:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIMITS_H_ = 0 // limits.h:36:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:74:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:75:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:76:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:77:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:78:1: + X_POSIX_ARG_MAX = 4096 // limits.h:41:1: + X_POSIX_CHILD_MAX = 25 // limits.h:42:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:61:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:82:1: + X_POSIX_LINK_MAX = 8 // limits.h:43:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:83:1: + X_POSIX_MAX_CANON = 255 // limits.h:44:1: + X_POSIX_MAX_INPUT = 255 // limits.h:45:1: + X_POSIX_NAME_MAX = 14 // limits.h:46:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:62:1: + X_POSIX_OPEN_MAX = 20 // limits.h:63:1: + X_POSIX_PATH_MAX = 256 // limits.h:47:1: + X_POSIX_PIPE_BUF = 512 // limits.h:48:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:49:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:50:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:51:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:52:1: + X_POSIX_STREAM_MAX = 8 // limits.h:53:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:54:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:55:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:56:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:57:1: + X_POSIX_THREAD_THREADS_MAX = 4 // limits.h:58:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:84:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:64:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_LIMITS_H_ = 0 // limits.h:27:1: + X_XOPEN_IOV_MAX = 16 // limits.h:106:1: + X_XOPEN_NAME_MAX = 255 // limits.h:107:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ +// $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd 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 5.9 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ +// Copyright (c) 2002 Marc Espie. +// +// 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 OPENBSD PROJECT 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 OPENBSD +// PROJECT 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// Common definitions for limits.h. + +// Legacy +// $OpenBSD: limits.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ +// $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 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. +// +// from: @(#)limits.h 7.2 (Berkeley) 6/28/90 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// max value for unsigned long +// max value for a signed long +// min value for a signed long + +// max value for unsigned long long +// max value for a signed long long +// min value for a signed long long + +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ +// $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/limits/limits_windows_386.go b/vendor/modernc.org/libc/limits/limits_windows_386.go index 1be004f8..93811235 100644 --- a/vendor/modernc.org/libc/limits/limits_windows_386.go +++ b/vendor/modernc.org/libc/limits/limits_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo limits\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o limits\limits_windows_386.go -pkgname limits', DO NOT EDIT. +// Code generated by 'ccgo limits/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o limits/limits_windows_386.go -pkgname limits', DO NOT EDIT. package limits @@ -15,124 +15,124 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CHAR_BIT = 8 - CHAR_MAX = 127 - CHAR_MIN = -128 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - INT_MAX = 2147483647 - INT_MIN = -2147483648 - LLONG_MAX = 9223372036854775807 - LLONG_MIN = -9223372036854775808 - LONG_LONG_MAX = 9223372036854775807 - LONG_LONG_MIN = -9223372036854775808 - LONG_MAX = 2147483647 - LONG_MIN = -2147483648 - MB_LEN_MAX = 5 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - PATH_MAX = 260 - SCHAR_MAX = 127 - SCHAR_MIN = -128 - SHRT_MAX = 32767 - SHRT_MIN = -32768 - SIZE_MAX = 4294967295 - SSIZE_MAX = 2147483647 - UCHAR_MAX = 255 - UINT_MAX = 4294967295 - ULLONG_MAX = 18446744073709551615 - ULONG_LONG_MAX = 18446744073709551615 - ULONG_MAX = 4294967295 - UNALIGNED = 0 - USE___UUIDOF = 0 - USHRT_MAX = 65535 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_GCC_LIMITS_H_ = 0 - X_I16_MAX = 32767 - X_I16_MIN = -32768 - X_I32_MAX = 2147483647 - X_I32_MIN = -2147483648 - X_I64_MAX = 9223372036854775807 - X_I64_MIN = -9223372036854775808 - X_I8_MAX = 127 - X_I8_MIN = -128 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_LIMITS = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LIMITS_H___ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UI16_MAX = 0xffff - X_UI32_MAX = 0xffffffff - X_UI64_MAX = 0xffffffffffffffff - X_UI8_MAX = 0xff - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + CHAR_BIT = 8 // limits.h:64:1: + CHAR_MAX = 127 // limits.h:99:1: + CHAR_MIN = -128 // limits.h:97:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + INT_MAX = 2147483647 // limits.h:120:1: + INT_MIN = -2147483648 // limits.h:118:1: + LLONG_MAX = 9223372036854775807 // limits.h:142:1: + LLONG_MIN = -9223372036854775808 // limits.h:140:1: + LONG_LONG_MAX = 9223372036854775807 // limits.h:154:1: + LONG_LONG_MIN = -9223372036854775808 // limits.h:152:1: + LONG_MAX = 2147483647 // limits.h:131:1: + LONG_MIN = -2147483648 // limits.h:129:1: + MB_LEN_MAX = 5 // limits.h:35:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + PATH_MAX = 260 // limits.h:20:1: + SCHAR_MAX = 127 // limits.h:75:1: + SCHAR_MIN = -128 // limits.h:73:1: + SHRT_MAX = 32767 // limits.h:106:1: + SHRT_MIN = -32768 // limits.h:104:1: + SIZE_MAX = 4294967295 // limits.h:78:1: + SSIZE_MAX = 2147483647 // limits.h:86:1: + UCHAR_MAX = 255 // limits.h:82:1: + UINT_MAX = 4294967295 // limits.h:124:1: + ULLONG_MAX = 18446744073709551615 // limits.h:146:1: + ULONG_LONG_MAX = 18446744073709551615 // limits.h:158:1: + ULONG_MAX = 4294967295 // limits.h:135:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + USHRT_MAX = 65535 // limits.h:113:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_LIMITS_H_ = 0 // limits.h:30:1: + X_I16_MAX = 32767 // limits.h:54:1: + X_I16_MIN = -32768 // limits.h:53:1: + X_I32_MAX = 2147483647 // limits.h:58:1: + X_I32_MIN = -2147483648 // limits.h:57:1: + X_I64_MAX = 9223372036854775807 // limits.h:71:1: + X_I64_MIN = -9223372036854775808 // limits.h:70:1: + X_I8_MAX = 127 // limits.h:50:1: + X_I8_MIN = -128 // limits.h:49:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_LIMITS = 0 // limits.h:9:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LIMITS_H___ = 0 // limits.h:60:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UI16_MAX = 0xffff // limits.h:55:1: + X_UI32_MAX = 0xffffffff // limits.h:59:1: + X_UI64_MAX = 0xffffffffffffffff // limits.h:72:1: + X_UI8_MAX = 0xff // limits.h:51:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -146,7 +146,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ -// Copyright (C) 1992-2018 Free Software Foundation, Inc. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -200,6 +200,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -220,6 +225,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -260,26 +271,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -305,29 +318,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // File system limits // @@ -337,7 +350,7 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. -// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. // // This file is part of GCC. // diff --git a/vendor/modernc.org/libc/mem_brk.go b/vendor/modernc.org/libc/mem_brk.go index 860a1a0a..00f35043 100644 --- a/vendor/modernc.org/libc/mem_brk.go +++ b/vendor/modernc.org/libc/mem_brk.go @@ -20,7 +20,6 @@ import ( ) const ( - heapSize = 20 << 30 // Adjust for your debugging session requirements and system RAM size. heapAlign = 16 memgrind = false ) diff --git a/vendor/modernc.org/libc/musl_darwin_amd64.go b/vendor/modernc.org/libc/musl_darwin_amd64.go index c967a27d..350e8def 100644 --- a/vendor/modernc.org/libc/musl_darwin_amd64.go +++ b/vendor/modernc.org/libc/musl_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT. +// Code generated by 'ccgo -D__environ=environ -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT. package libc @@ -362,55 +362,55 @@ var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */ // pthread opaque structures type __darwin_pthread_handler_rec = struct { - __routine uintptr - __arg uintptr - __next uintptr + F__routine uintptr + F__arg uintptr + F__next uintptr } /* table.c:1396:1 */ type _opaque_pthread_attr_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1402:1 */ type _opaque_pthread_cond_t = struct { - __sig int64 - __opaque [40]int8 + F__sig int64 + F__opaque [40]int8 } /* table.c:1407:1 */ type _opaque_pthread_condattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1412:1 */ type _opaque_pthread_mutex_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1417:1 */ type _opaque_pthread_mutexattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1422:1 */ type _opaque_pthread_once_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1427:1 */ type _opaque_pthread_rwlock_t = struct { - __sig int64 - __opaque [192]int8 + F__sig int64 + F__opaque [192]int8 } /* table.c:1432:1 */ type _opaque_pthread_rwlockattr_t = struct { - __sig int64 - __opaque [16]int8 + F__sig int64 + F__opaque [16]int8 } /* table.c:1437:1 */ type _opaque_pthread_t = struct { - __sig int64 - __cleanup_stack uintptr - __opaque [8176]int8 + F__sig int64 + F__cleanup_stack uintptr + F__opaque [8176]int8 } /* table.c:1442:1 */ type ct_rune_t = int32 /* table.c:1527:28 */ @@ -420,42 +420,42 @@ type rune_t = int32 /* table.c:1536:25 */ type wint_t = int32 /* table.c:1558:25 */ type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr + F__min int32 + F__max int32 + F__map int32 + F__ccgo_pad1 [4]byte + F__types uintptr } /* table.c:1575:3 */ type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr + F__nranges int32 + F__ccgo_pad1 [4]byte + F__ranges uintptr } /* table.c:1580:3 */ type _RuneCharClass = struct { - __name [14]int8 - _ [2]byte - __mask uint32 + F__name [14]int8 + F__ccgo_pad1 [2]byte + F__mask uint32 } /* table.c:1585:3 */ type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - __runetype [256]uint32 - __maplower [256]int32 - __mapupper [256]int32 - _ [4]byte - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - __ncharclasses int32 - __charclasses uintptr + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__runetype [256]uint32 + F__maplower [256]int32 + F__mapupper [256]int32 + F__ccgo_pad1 [4]byte + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 + F__ncharclasses int32 + F__charclasses uintptr } /* table.c:1616:3 */ func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */ @@ -584,7 +584,7 @@ func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */ return Xtolower(tls, c) } -var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, __encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, __invalid_rune: 0xfffd, __runetype: [256]uint32{ +var X_DefaultRuneLocale = _RuneLocale{F__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, F__encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, F__invalid_rune: 0xfffd, F__runetype: [256]uint32{ uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x24200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x64000), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), @@ -601,7 +601,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), -}, __maplower: [256]int32{ +}, F__maplower: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -618,7 +618,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, -}, __mapupper: [256]int32{ +}, F__mapupper: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -641,16 +641,16 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 var X_CurrentRuneLocale uintptr = 0 /* table.c:1940:13 */ type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type locale_t = uintptr /* alltypes.h:343:32 */ @@ -877,39 +877,39 @@ type uint_fast16_t = uint32_t /* stdint.h:3:18 */ type uint_fast32_t = uint32_t /* stdint.h:4:18 */ type _IO_FILE = struct { - flags uint32 - _ [4]byte - rpos uintptr - rend uintptr - close uintptr - wend uintptr - wpos uintptr - mustbezero_1 uintptr - wbase uintptr - read uintptr - write uintptr - seek uintptr - buf uintptr - buf_size size_t - prev uintptr - next uintptr - fd int32 - pipe_pid int32 - lockcount int64 - mode int32 - lock int32 - lbf int32 - _ [4]byte - cookie uintptr - off off_t - getln_buf uintptr - mustbezero_2 uintptr - shend uintptr - shlim off_t - shcnt off_t - prev_locked uintptr - next_locked uintptr - locale uintptr + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:320:9 */ type FILE = _IO_FILE /* alltypes.h:320:25 */ @@ -917,8 +917,8 @@ type FILE = _IO_FILE /* alltypes.h:320:25 */ type va_list = uintptr /* alltypes.h:326:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -931,7 +931,7 @@ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) - // var __u struct {__f float32;} at bp, 4 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -941,7 +941,7 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) - // var __u struct {__f float64;} at bp, 8 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -960,58 +960,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var neg int32 = 0 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -1050,8 +1050,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1060,13 +1060,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if c == '.' { gotrad = 1 for c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1077,8 +1077,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1119,8 +1119,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1131,8 +1131,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1374,16 +1374,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 var c int32 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() // Skip leading zeros for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1393,8 +1393,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 if c == '.' { gotrad = 1 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1408,8 +1408,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 goto __2 __2: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1420,8 +1420,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1450,18 +1450,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1481,8 +1481,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = scanexp(tls, f, pok) if e2 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1492,8 +1492,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1573,8 +1573,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } for __isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -1583,8 +1583,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '+' || c == '-' { sign = sign - 2*Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1593,8 +1593,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { if i < uint64(7) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1602,14 +1602,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { if i != uint64(8) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1621,8 +1621,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { if i < uint64(2) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1631,21 +1631,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) { if func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return float64(X__builtin_nanf(tls, ts+13)) } for i = uint64(1); ; i++ { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1655,8 +1655,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == ')' { return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -1665,8 +1665,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1676,8 +1676,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -1687,16 +1687,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '0' { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c|32 == 'x' { return hexfloat(tls, f, bits, emin, sign, pok) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -1743,8 +1743,8 @@ __1: ; __2: if !(__isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -1758,8 +1758,8 @@ __3: } neg = -Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1769,8 +1769,8 @@ __4: goto __5 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1778,23 +1778,23 @@ __4: goto __7 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { goto __9 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -1827,8 +1827,8 @@ __13: if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { goto __14 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -1850,8 +1850,8 @@ __17: goto __18 __18: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1868,8 +1868,8 @@ __20: goto __21 __21: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1898,8 +1898,8 @@ __26: goto __27 __27: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1916,8 +1916,8 @@ __29: goto __30 __30: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1936,8 +1936,8 @@ __32: goto __33 __33: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1954,8 +1954,8 @@ __35: goto __36 __36: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1977,8 +1977,8 @@ __39: goto __40 __40: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1997,8 +1997,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -2031,64 +2031,64 @@ __43: // the actual count. func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ - (*FILE)(unsafe.Pointer(f)).shlim = lim - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 1 // If lim is nonzero, rend must be a valid pointer. - if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > lim { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ var c int32 - var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos - (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) return -1 } cnt++ - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > (*FILE)(unsafe.Pointer(f)).shlim-cnt { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf { - *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } type lconv = struct { - decimal_point uintptr - thousands_sep uintptr - grouping uintptr - int_curr_symbol uintptr - currency_symbol uintptr - mon_decimal_point uintptr - mon_thousands_sep uintptr - mon_grouping uintptr - positive_sign uintptr - negative_sign uintptr - int_frac_digits int8 - frac_digits int8 - p_cs_precedes int8 - p_sep_by_space int8 - n_cs_precedes int8 - n_sep_by_space int8 - p_sign_posn int8 - n_sign_posn int8 - int_p_cs_precedes int8 - int_p_sep_by_space int8 - int_n_cs_precedes int8 - int_n_sep_by_space int8 - int_p_sign_posn int8 - int_n_sign_posn int8 - _ [2]byte + Fdecimal_point uintptr + Fthousands_sep uintptr + Fgrouping uintptr + Fint_curr_symbol uintptr + Fcurrency_symbol uintptr + Fmon_decimal_point uintptr + Fmon_thousands_sep uintptr + Fmon_grouping uintptr + Fpositive_sign uintptr + Fnegative_sign uintptr + Fint_frac_digits int8 + Ffrac_digits int8 + Fp_cs_precedes int8 + Fp_sep_by_space int8 + Fn_cs_precedes int8 + Fn_sep_by_space int8 + Fp_sign_posn int8 + Fn_sign_posn int8 + Fint_p_cs_precedes int8 + Fint_p_sep_by_space int8 + Fint_n_cs_precedes int8 + Fint_n_sep_by_space int8 + Fint_p_sign_posn int8 + Fint_n_sign_posn int8 + F__ccgo_pad1 [2]byte } /* locale.h:24:1 */ // Support signed or unsigned plain-char @@ -2100,7 +2100,7 @@ type lconv = struct { // POSIX/SUS requirements follow. These numbers come directly // from SUS and have nothing to do with the host system. -var posix_lconv = lconv{decimal_point: ts + 23, thousands_sep: ts + 13, grouping: ts + 13, int_curr_symbol: ts + 13, currency_symbol: ts + 13, mon_decimal_point: ts + 13, mon_thousands_sep: ts + 13, mon_grouping: ts + 13, positive_sign: ts + 13, negative_sign: ts + 13, int_frac_digits: Int8FromInt32(255), frac_digits: Int8FromInt32(255), p_cs_precedes: Int8FromInt32(255), p_sep_by_space: Int8FromInt32(255), n_cs_precedes: Int8FromInt32(255), n_sep_by_space: Int8FromInt32(255), p_sign_posn: Int8FromInt32(255), n_sign_posn: Int8FromInt32(255), int_p_cs_precedes: Int8FromInt32(255), int_p_sep_by_space: Int8FromInt32(255), int_n_cs_precedes: Int8FromInt32(255), int_n_sep_by_space: Int8FromInt32(255), int_p_sign_posn: Int8FromInt32(255), int_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ +var posix_lconv = lconv{Fdecimal_point: ts + 23, Fthousands_sep: ts + 13, Fgrouping: ts + 13, Fint_curr_symbol: ts + 13, Fcurrency_symbol: ts + 13, Fmon_decimal_point: ts + 13, Fmon_thousands_sep: ts + 13, Fmon_grouping: ts + 13, Fpositive_sign: ts + 13, Fnegative_sign: ts + 13, Fint_frac_digits: Int8FromInt32(255), Ffrac_digits: Int8FromInt32(255), Fp_cs_precedes: Int8FromInt32(255), Fp_sep_by_space: Int8FromInt32(255), Fn_cs_precedes: Int8FromInt32(255), Fn_sep_by_space: Int8FromInt32(255), Fp_sign_posn: Int8FromInt32(255), Fn_sign_posn: Int8FromInt32(255), Fint_p_cs_precedes: Int8FromInt32(255), Fint_p_sep_by_space: Int8FromInt32(255), Fint_n_cs_precedes: Int8FromInt32(255), Fint_n_sep_by_space: Int8FromInt32(255), Fint_p_sign_posn: Int8FromInt32(255), Fint_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */ return uintptr(unsafe.Pointer(&posix_lconv)) @@ -2110,7 +2110,7 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2134,7 +2134,7 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */ bp := tls.Alloc(4) defer tls.Free(4) - *(*struct{ f float32 })(unsafe.Pointer(bp)) = func() (r struct{ f float32 }) { + *(*struct{ Ff float32 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float32 }) { *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2184,7 +2184,7 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2213,7 +2213,7 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ bp := tls.Alloc(8) defer tls.Free(8) - // var u struct {f float64;} at bp, 8 + // var u struct {Ff float64;} at bp, 8 var y double_t = x @@ -2250,18 +2250,18 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:41:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:355:1 */ type socklen_t = uint32 /* alltypes.h:361:18 */ @@ -2269,311 +2269,311 @@ type socklen_t = uint32 /* alltypes.h:361:18 */ type sa_family_t = uint16 /* alltypes.h:366:24 */ type msghdr = struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } /* socket.h:372:1 */ -type in_port_t = uint16_t /* in.h:12:18 */ -type in_addr_t = uint32_t /* in.h:13:18 */ -type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ type sockaddr_in = struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } /* in.h:23:1 */ type sockaddr_in6 = struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } /* in.h:34:1 */ type ipv6_mreq = struct { - ipv6mr_multiaddr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } } /* in.h:247:1 */ type ip_mreqn = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_address struct{ s_addr in_addr_t } - imr_ifindex int32 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 } /* in.h:252:1 */ type ip_mreq_source = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } - imr_sourceaddr struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } } /* in.h:258:1 */ type ip_msfilter = struct { - imsf_multiaddr struct{ s_addr in_addr_t } - imsf_interface struct{ s_addr in_addr_t } - imsf_fmode uint32_t - imsf_numsrc uint32_t - imsf_slist [1]struct{ s_addr in_addr_t } + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } } /* in.h:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:275:1 */ type group_source_req = struct { - gsr_interface uint32_t - _ [4]byte - gsr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:280:1 */ type group_filter = struct { - gf_interface uint32_t - _ [4]byte - gf_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:286:1 */ type in_pktinfo = struct { - ipi_ifindex int32 - ipi_spec_dst struct{ s_addr in_addr_t } - ipi_addr struct{ s_addr in_addr_t } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } } /* in.h:297:1 */ type in6_pktinfo = struct { - ipi6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_ifindex uint32 } /* in.h:303:1 */ type ip6_mtuinfo = struct { - ip6m_addr struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_mtu uint32_t } /* in.h:308:1 */ type addrinfo = struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr } /* netdb.h:16:1 */ // Legacy functions follow (marked OBsolete in SUS) type netent = struct { - n_name uintptr - n_aliases uintptr - n_addrtype int32 - n_net uint32_t + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t } /* netdb.h:62:1 */ type hostent = struct { - h_name uintptr - h_aliases uintptr - h_addrtype int32 - h_length int32 - h_addr_list uintptr + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte } /* netdb.h:85:1 */ type aibuf = struct { - ai struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr - } - sa struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - _ [12]byte - } - lock [1]int32 - slot int16 - ref int16 - _ [4]byte + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [4]byte } /* lookup.h:10:1 */ type sa = struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype uint8 } /* lookup.h:27:1 */ type resolvconf = struct { - ns [3]struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 - } - nns uint32 - attempts uint32 - ndots uint32 - timeout uint32 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 } /* lookup.h:34:1 */ func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ var cnt size_t cnt = uint64(1) __1: - if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -2586,8 +2586,8 @@ type time_t = int64 /* alltypes.h:85:16 */ type clockid_t = int32 /* alltypes.h:214:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:229:1 */ type pthread_t = uintptr /* alltypes.h:273:26 */ @@ -2598,62 +2598,62 @@ type pthread_key_t = uint32 /* alltypes.h:284:18 */ type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */ type sigset_t = __sigset_t /* alltypes.h:349:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:372:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:377:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:387:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:397:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:402:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:209:14 */ @@ -2661,35 +2661,35 @@ type timer_t = uintptr /* alltypes.h:209:14 */ type clock_t = int64 /* alltypes.h:219:14 */ type tm = struct { - tm_sec int32 - tm_min int32 - tm_hour int32 - tm_mday int32 - tm_mon int32 - tm_year int32 - tm_wday int32 - tm_yday int32 - tm_isdst int32 - _ [4]byte - tm_gmtoff int64 - tm_zone uintptr + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ @@ -2721,10 +2721,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } if hint != 0 { - family = (*addrinfo)(unsafe.Pointer(hint)).ai_family - flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags - proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol - socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -2820,7 +2820,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -2830,30 +2830,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //TODO : sizeof(struct sockaddr_in6), //TODO .ai_addr = (void *)&out[k].sa, //TODO .ai_canonname = outcanon }; - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 { - if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { return uint32(unsafe.Sizeof(sockaddr_in{})) } return uint32(unsafe.Sizeof(sockaddr_in6{})) }() - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48 - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { case 2: - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2) - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) break case 10: - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -2867,33 +2867,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid gid_t } /* socket.h:57:1 */ type mmsghdr = struct { - msg_hdr struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte - } - msg_len uint32 - _ [4]byte + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -2931,13 +2931,13 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf //TODO struct sockaddr_in6 sin6; //TODO } sa = { .sin.sin_family = af }; *(*struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte })(unsafe.Pointer(bp)) = struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte }{} //TODO- - (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO- + (*sockaddr_in)(unsafe.Pointer(bp)).Fsin_family = sa_family_t(af) //TODO- var sl socklen_t if af == 10 { sl = uint32(unsafe.Sizeof(sockaddr_in6{})) @@ -2969,17 +2969,17 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf buf += uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i)) buflen = buflen - (uint64(5)*uint64(unsafe.Sizeof(uintptr(0))) - uint64(i) + uint64(l)) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list)) = buf + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list)), a, uint64(l)) buf += uintptr(l) - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) = buf + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { case -3: @@ -3000,9 +3000,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf break } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = int32(l) - (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*hostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } @@ -3076,8 +3076,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -3088,7 +3088,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) - need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -3098,117 +3098,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) for i = 0; i < cnt; i++ { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf - buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0) - (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) - Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) - buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1)) - if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf - Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name) - buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1)) } else { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_next uintptr } /* if.h:51:1 */ type ifmap = struct { - mem_start uint64 - mem_end uint64 - base_addr uint16 - irq uint8 - dma uint8 - port uint8 - _ [3]byte + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_buf uintptr } } /* if.h:116:1 */ type ns_sect = uint32 /* nameser.h:37:3 */ type __ns_msg = struct { - _msg uintptr - _eom uintptr - _id uint16_t - _flags uint16_t - _counts [4]uint16_t - _ [4]byte - _sections [4]uintptr - _sect ns_sect - _rrnum int32 - _msg_ptr uintptr + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -3222,24 +3222,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:123:1 */ type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ type ns_tcp_tsig_state1 = struct { - counter int32 - _ [4]byte - key uintptr - ctx uintptr - sig [512]uint8 - siglen int32 - _ [4]byte + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -3253,45 +3253,45 @@ type ns_key_types = uint32 /* nameser.h:226:3 */ type ns_cert_types = uint32 /* nameser.h:234:3 */ type HEADER = struct { - _ [0]uint32 - id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ - qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ - nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ } /* nameser.h:353:3 */ // unused; purely for broken apps type __res_state = struct { - retrans int32 - retry int32 - options uint64 - nscount int32 - nsaddr_list [3]struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - id uint16 - _ [2]byte - dnsrch [7]uintptr - defdname [256]int8 - pfcode uint64 - ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ - _ [4]byte - sort_list [10]struct { - addr struct{ s_addr in_addr_t } - mask uint32_t - } - qhook uintptr - rhook uintptr - res_h_errno int32 - _vcsock int32 - _flags uint32 - _ [4]byte - _u struct { - _ [0]uint64 - pad [52]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -3299,10 +3299,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -3373,13 +3373,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) Xmemcpy(tls, bp+528+8, ts+90, uint64(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -3433,7 +3433,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc // var num [13]int8 at bp+334, 13 - var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).Fsa_family) var a uintptr var scopeid uint32 @@ -3456,7 +3456,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc } else { mkptr4(tls, bp, a+uintptr(12)) } - scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).Fsin6_scope_id break default: return -6 @@ -3504,7 +3504,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc if serv != 0 && servlen != 0 { var p uintptr = bp + 78 /* buf */ - var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).Fsin_port)) *(*int8)(unsafe.Pointer(bp + 78)) = int8(0) if !(flags&0x02 != 0) { reverse_services(tls, bp+78, port, flags&0x10) @@ -3762,8 +3762,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 2 - (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -3786,7 +3786,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -3810,20 +3810,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:152:18 */ type flock = struct { - l_type int16 - l_whence int16 - _ [4]byte - l_start off_t - l_len off_t - l_pid pid_t - _ [4]byte + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -3849,14 +3849,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 2 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } //TODO if (family != AF_INET) //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; if family != 2 { var x = Xzero_struct_address - x.family = 10 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -3949,10 +3949,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [4]byte } /* lookup_name.c:112:1 */ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ @@ -4002,31 +4002,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), Fprec: uint8(40), Flabel: uint8(1)}, } /* lookup_name.c:241:3 */ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ var i int32 for i = 0; ; i++ { - if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 { continue } - if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != - int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -4035,7 +4035,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -4068,7 +4068,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ var a uintptr = _a var b uintptr = _b - return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -4148,7 +4148,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -4165,12 +4165,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -4197,8 +4197,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -4226,7 +4226,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -4278,9 +4278,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if name != 0 { return -8 } - (*service)(unsafe.Pointer(buf)).port = uint16_t(0) - (*service)(unsafe.Pointer(buf)).proto = uint8(proto) - (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -4295,14 +4295,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -8 } if proto != 17 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) } if proto != 6 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -4375,19 +4375,19 @@ func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */ } func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ - *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 - if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0)) } - (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { *(*uint32)(unsafe.Pointer(f)) |= uint32(32) return -1 } - (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -4409,7 +4409,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ if !(X__toread(tls, f) != 0) && (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -4441,11 +4441,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y float64 = X__floatscan(tls, bp, prec, 1) - var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -4475,12 +4475,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) if p != 0 { - var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y diff --git a/vendor/modernc.org/libc/musl_darwin_arm64.go b/vendor/modernc.org/libc/musl_darwin_arm64.go index b5f72685..e6fc642a 100644 --- a/vendor/modernc.org/libc/musl_darwin_arm64.go +++ b/vendor/modernc.org/libc/musl_darwin_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT. +// Code generated by 'ccgo -D__environ=environ -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT. package libc @@ -362,55 +362,55 @@ var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */ // pthread opaque structures type __darwin_pthread_handler_rec = struct { - __routine uintptr - __arg uintptr - __next uintptr + F__routine uintptr + F__arg uintptr + F__next uintptr } /* table.c:1396:1 */ type _opaque_pthread_attr_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1402:1 */ type _opaque_pthread_cond_t = struct { - __sig int64 - __opaque [40]int8 + F__sig int64 + F__opaque [40]int8 } /* table.c:1407:1 */ type _opaque_pthread_condattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1412:1 */ type _opaque_pthread_mutex_t = struct { - __sig int64 - __opaque [56]int8 + F__sig int64 + F__opaque [56]int8 } /* table.c:1417:1 */ type _opaque_pthread_mutexattr_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1422:1 */ type _opaque_pthread_once_t = struct { - __sig int64 - __opaque [8]int8 + F__sig int64 + F__opaque [8]int8 } /* table.c:1427:1 */ type _opaque_pthread_rwlock_t = struct { - __sig int64 - __opaque [192]int8 + F__sig int64 + F__opaque [192]int8 } /* table.c:1432:1 */ type _opaque_pthread_rwlockattr_t = struct { - __sig int64 - __opaque [16]int8 + F__sig int64 + F__opaque [16]int8 } /* table.c:1437:1 */ type _opaque_pthread_t = struct { - __sig int64 - __cleanup_stack uintptr - __opaque [8176]int8 + F__sig int64 + F__cleanup_stack uintptr + F__opaque [8176]int8 } /* table.c:1442:1 */ type ct_rune_t = int32 /* table.c:1527:28 */ @@ -420,42 +420,42 @@ type rune_t = int32 /* table.c:1536:25 */ type wint_t = int32 /* table.c:1558:25 */ type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr + F__min int32 + F__max int32 + F__map int32 + F__ccgo_pad1 [4]byte + F__types uintptr } /* table.c:1575:3 */ type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr + F__nranges int32 + F__ccgo_pad1 [4]byte + F__ranges uintptr } /* table.c:1580:3 */ type _RuneCharClass = struct { - __name [14]int8 - _ [2]byte - __mask uint32 + F__name [14]int8 + F__ccgo_pad1 [2]byte + F__mask uint32 } /* table.c:1585:3 */ type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - __runetype [256]uint32 - __maplower [256]int32 - __mapupper [256]int32 - _ [4]byte - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - __ncharclasses int32 - __charclasses uintptr + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__runetype [256]uint32 + F__maplower [256]int32 + F__mapupper [256]int32 + F__ccgo_pad1 [4]byte + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 + F__ncharclasses int32 + F__charclasses uintptr } /* table.c:1616:3 */ func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */ @@ -584,7 +584,7 @@ func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */ return Xtolower(tls, c) } -var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, __encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, __invalid_rune: 0xfffd, __runetype: [256]uint32{ +var X_DefaultRuneLocale = _RuneLocale{F__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, F__encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, F__invalid_rune: 0xfffd, F__runetype: [256]uint32{ uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x24200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x64000), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), @@ -601,7 +601,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), -}, __maplower: [256]int32{ +}, F__maplower: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -618,7 +618,7 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, -}, __mapupper: [256]int32{ +}, F__mapupper: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, @@ -641,16 +641,16 @@ var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8 var X_CurrentRuneLocale uintptr = 0 /* table.c:1940:13 */ type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type locale_t = uintptr /* alltypes.h:351:32 */ @@ -877,39 +877,39 @@ type uint_fast16_t = uint32_t /* stdint.h:3:18 */ type uint_fast32_t = uint32_t /* stdint.h:4:18 */ type _IO_FILE = struct { - flags uint32 - _ [4]byte - rpos uintptr - rend uintptr - close uintptr - wend uintptr - wpos uintptr - mustbezero_1 uintptr - wbase uintptr - read uintptr - write uintptr - seek uintptr - buf uintptr - buf_size size_t - prev uintptr - next uintptr - fd int32 - pipe_pid int32 - lockcount int64 - mode int32 - lock int32 - lbf int32 - _ [4]byte - cookie uintptr - off off_t - getln_buf uintptr - mustbezero_2 uintptr - shend uintptr - shlim off_t - shcnt off_t - prev_locked uintptr - next_locked uintptr - locale uintptr + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:328:9 */ type FILE = _IO_FILE /* alltypes.h:328:25 */ @@ -917,8 +917,8 @@ type FILE = _IO_FILE /* alltypes.h:328:25 */ type va_list = uintptr /* alltypes.h:334:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -931,7 +931,7 @@ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) - // var __u struct {__f float32;} at bp, 4 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -941,7 +941,7 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) - // var __u struct {__f float64;} at bp, 8 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -960,58 +960,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var neg int32 = 0 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -1050,8 +1050,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1060,13 +1060,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if c == '.' { gotrad = 1 for c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1077,8 +1077,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1119,8 +1119,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1131,8 +1131,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1374,16 +1374,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 var c int32 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() // Skip leading zeros for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1393,8 +1393,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 if c == '.' { gotrad = 1 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1408,8 +1408,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 goto __2 __2: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1420,8 +1420,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1450,18 +1450,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1481,8 +1481,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = scanexp(tls, f, pok) if e2 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1492,8 +1492,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1573,8 +1573,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } for __isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -1583,8 +1583,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '+' || c == '-' { sign = sign - 2*Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1593,8 +1593,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { if i < uint64(7) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1602,14 +1602,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { if i != uint64(8) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1621,8 +1621,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { if i < uint64(2) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1631,21 +1631,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) { if func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return float64(X__builtin_nanf(tls, ts+13)) } for i = uint64(1); ; i++ { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1655,8 +1655,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == ')' { return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -1665,8 +1665,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1676,8 +1676,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -1687,16 +1687,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '0' { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c|32 == 'x' { return hexfloat(tls, f, bits, emin, sign, pok) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -1743,8 +1743,8 @@ __1: ; __2: if !(__isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -1758,8 +1758,8 @@ __3: } neg = -Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1769,8 +1769,8 @@ __4: goto __5 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1778,23 +1778,23 @@ __4: goto __7 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { goto __9 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -1827,8 +1827,8 @@ __13: if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { goto __14 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -1850,8 +1850,8 @@ __17: goto __18 __18: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1868,8 +1868,8 @@ __20: goto __21 __21: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1898,8 +1898,8 @@ __26: goto __27 __27: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1916,8 +1916,8 @@ __29: goto __30 __30: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1936,8 +1936,8 @@ __32: goto __33 __33: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1954,8 +1954,8 @@ __35: goto __36 __36: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1977,8 +1977,8 @@ __39: goto __40 __40: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1997,8 +1997,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -2031,64 +2031,64 @@ __43: // the actual count. func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ - (*FILE)(unsafe.Pointer(f)).shlim = lim - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 1 // If lim is nonzero, rend must be a valid pointer. - if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > lim { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ var c int32 - var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos - (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) return -1 } cnt++ - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > (*FILE)(unsafe.Pointer(f)).shlim-cnt { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf { - *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } type lconv = struct { - decimal_point uintptr - thousands_sep uintptr - grouping uintptr - int_curr_symbol uintptr - currency_symbol uintptr - mon_decimal_point uintptr - mon_thousands_sep uintptr - mon_grouping uintptr - positive_sign uintptr - negative_sign uintptr - int_frac_digits int8 - frac_digits int8 - p_cs_precedes int8 - p_sep_by_space int8 - n_cs_precedes int8 - n_sep_by_space int8 - p_sign_posn int8 - n_sign_posn int8 - int_p_cs_precedes int8 - int_p_sep_by_space int8 - int_n_cs_precedes int8 - int_n_sep_by_space int8 - int_p_sign_posn int8 - int_n_sign_posn int8 - _ [2]byte + Fdecimal_point uintptr + Fthousands_sep uintptr + Fgrouping uintptr + Fint_curr_symbol uintptr + Fcurrency_symbol uintptr + Fmon_decimal_point uintptr + Fmon_thousands_sep uintptr + Fmon_grouping uintptr + Fpositive_sign uintptr + Fnegative_sign uintptr + Fint_frac_digits int8 + Ffrac_digits int8 + Fp_cs_precedes int8 + Fp_sep_by_space int8 + Fn_cs_precedes int8 + Fn_sep_by_space int8 + Fp_sign_posn int8 + Fn_sign_posn int8 + Fint_p_cs_precedes int8 + Fint_p_sep_by_space int8 + Fint_n_cs_precedes int8 + Fint_n_sep_by_space int8 + Fint_p_sign_posn int8 + Fint_n_sign_posn int8 + F__ccgo_pad1 [2]byte } /* locale.h:24:1 */ // Support signed or unsigned plain-char @@ -2100,7 +2100,7 @@ type lconv = struct { // POSIX/SUS requirements follow. These numbers come directly // from SUS and have nothing to do with the host system. -var posix_lconv = lconv{decimal_point: ts + 23, thousands_sep: ts + 13, grouping: ts + 13, int_curr_symbol: ts + 13, currency_symbol: ts + 13, mon_decimal_point: ts + 13, mon_thousands_sep: ts + 13, mon_grouping: ts + 13, positive_sign: ts + 13, negative_sign: ts + 13, int_frac_digits: Int8FromInt32(255), frac_digits: Int8FromInt32(255), p_cs_precedes: Int8FromInt32(255), p_sep_by_space: Int8FromInt32(255), n_cs_precedes: Int8FromInt32(255), n_sep_by_space: Int8FromInt32(255), p_sign_posn: Int8FromInt32(255), n_sign_posn: Int8FromInt32(255), int_p_cs_precedes: Int8FromInt32(255), int_p_sep_by_space: Int8FromInt32(255), int_n_cs_precedes: Int8FromInt32(255), int_n_sep_by_space: Int8FromInt32(255), int_p_sign_posn: Int8FromInt32(255), int_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ +var posix_lconv = lconv{Fdecimal_point: ts + 23, Fthousands_sep: ts + 13, Fgrouping: ts + 13, Fint_curr_symbol: ts + 13, Fcurrency_symbol: ts + 13, Fmon_decimal_point: ts + 13, Fmon_thousands_sep: ts + 13, Fmon_grouping: ts + 13, Fpositive_sign: ts + 13, Fnegative_sign: ts + 13, Fint_frac_digits: Int8FromInt32(255), Ffrac_digits: Int8FromInt32(255), Fp_cs_precedes: Int8FromInt32(255), Fp_sep_by_space: Int8FromInt32(255), Fn_cs_precedes: Int8FromInt32(255), Fn_sep_by_space: Int8FromInt32(255), Fp_sign_posn: Int8FromInt32(255), Fn_sign_posn: Int8FromInt32(255), Fint_p_cs_precedes: Int8FromInt32(255), Fint_p_sep_by_space: Int8FromInt32(255), Fint_n_cs_precedes: Int8FromInt32(255), Fint_n_sep_by_space: Int8FromInt32(255), Fint_p_sign_posn: Int8FromInt32(255), Fint_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */ func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */ return uintptr(unsafe.Pointer(&posix_lconv)) @@ -2110,7 +2110,7 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2134,7 +2134,7 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */ bp := tls.Alloc(4) defer tls.Free(4) - *(*struct{ f float32 })(unsafe.Pointer(bp)) = func() (r struct{ f float32 }) { + *(*struct{ Ff float32 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float32 }) { *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2184,7 +2184,7 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2213,7 +2213,7 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ bp := tls.Alloc(8) defer tls.Free(8) - // var u struct {f float64;} at bp, 8 + // var u struct {Ff float64;} at bp, 8 var y double_t = x @@ -2250,18 +2250,18 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:49:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:363:1 */ type socklen_t = uint32 /* alltypes.h:369:18 */ @@ -2269,311 +2269,311 @@ type socklen_t = uint32 /* alltypes.h:369:18 */ type sa_family_t = uint16 /* alltypes.h:374:24 */ type msghdr = struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } /* socket.h:372:1 */ -type in_port_t = uint16_t /* in.h:12:18 */ -type in_addr_t = uint32_t /* in.h:13:18 */ -type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ type sockaddr_in = struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } /* in.h:23:1 */ type sockaddr_in6 = struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } /* in.h:34:1 */ type ipv6_mreq = struct { - ipv6mr_multiaddr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } } /* in.h:247:1 */ type ip_mreqn = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_address struct{ s_addr in_addr_t } - imr_ifindex int32 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 } /* in.h:252:1 */ type ip_mreq_source = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } - imr_sourceaddr struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } } /* in.h:258:1 */ type ip_msfilter = struct { - imsf_multiaddr struct{ s_addr in_addr_t } - imsf_interface struct{ s_addr in_addr_t } - imsf_fmode uint32_t - imsf_numsrc uint32_t - imsf_slist [1]struct{ s_addr in_addr_t } + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } } /* in.h:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:275:1 */ type group_source_req = struct { - gsr_interface uint32_t - _ [4]byte - gsr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:280:1 */ type group_filter = struct { - gf_interface uint32_t - _ [4]byte - gf_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:286:1 */ type in_pktinfo = struct { - ipi_ifindex int32 - ipi_spec_dst struct{ s_addr in_addr_t } - ipi_addr struct{ s_addr in_addr_t } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } } /* in.h:297:1 */ type in6_pktinfo = struct { - ipi6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_ifindex uint32 } /* in.h:303:1 */ type ip6_mtuinfo = struct { - ip6m_addr struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_mtu uint32_t } /* in.h:308:1 */ type addrinfo = struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr } /* netdb.h:16:1 */ // Legacy functions follow (marked OBsolete in SUS) type netent = struct { - n_name uintptr - n_aliases uintptr - n_addrtype int32 - n_net uint32_t + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t } /* netdb.h:62:1 */ type hostent = struct { - h_name uintptr - h_aliases uintptr - h_addrtype int32 - h_length int32 - h_addr_list uintptr + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte } /* netdb.h:85:1 */ type aibuf = struct { - ai struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr - } - sa struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - _ [12]byte - } - lock [1]int32 - slot int16 - ref int16 - _ [4]byte + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [4]byte } /* lookup.h:10:1 */ type sa = struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype uint8 } /* lookup.h:27:1 */ type resolvconf = struct { - ns [3]struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 - } - nns uint32 - attempts uint32 - ndots uint32 - timeout uint32 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 } /* lookup.h:34:1 */ func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ var cnt size_t cnt = uint64(1) __1: - if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -2586,8 +2586,8 @@ type time_t = int64 /* alltypes.h:93:16 */ type clockid_t = int32 /* alltypes.h:222:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:237:1 */ type pthread_t = uintptr /* alltypes.h:281:26 */ @@ -2598,62 +2598,62 @@ type pthread_key_t = uint32 /* alltypes.h:292:18 */ type pthread_spinlock_t = int32 /* alltypes.h:297:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:302:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:302:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:307:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:307:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:312:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:312:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:317:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:317:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:357:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:357:9 */ type sigset_t = __sigset_t /* alltypes.h:357:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:380:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:385:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:395:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:405:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:410:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:217:14 */ @@ -2661,35 +2661,35 @@ type timer_t = uintptr /* alltypes.h:217:14 */ type clock_t = int64 /* alltypes.h:227:14 */ type tm = struct { - tm_sec int32 - tm_min int32 - tm_hour int32 - tm_mday int32 - tm_mon int32 - tm_year int32 - tm_wday int32 - tm_yday int32 - tm_isdst int32 - _ [4]byte - tm_gmtoff int64 - tm_zone uintptr + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ @@ -2721,10 +2721,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } if hint != 0 { - family = (*addrinfo)(unsafe.Pointer(hint)).ai_family - flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags - proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol - socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -2820,7 +2820,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -2830,30 +2830,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //TODO : sizeof(struct sockaddr_in6), //TODO .ai_addr = (void *)&out[k].sa, //TODO .ai_canonname = outcanon }; - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 { - if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { return uint32(unsafe.Sizeof(sockaddr_in{})) } return uint32(unsafe.Sizeof(sockaddr_in6{})) }() - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48 - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { case 2: - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2) - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) break case 10: - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -2867,33 +2867,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid gid_t } /* socket.h:57:1 */ type mmsghdr = struct { - msg_hdr struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte - } - msg_len uint32 - _ [4]byte + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -2931,13 +2931,13 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf //TODO struct sockaddr_in6 sin6; //TODO } sa = { .sin.sin_family = af }; *(*struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte })(unsafe.Pointer(bp)) = struct { - sin sockaddr_in - _ [12]byte + Fsin sockaddr_in + F__ccgo_pad1 [12]byte }{} //TODO- - (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO- + (*sockaddr_in)(unsafe.Pointer(bp)).Fsin_family = sa_family_t(af) //TODO- var sl socklen_t if af == 10 { sl = uint32(unsafe.Sizeof(sockaddr_in6{})) @@ -2969,17 +2969,17 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf buf += uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i)) buflen = buflen - (uint64(5)*uint64(unsafe.Sizeof(uintptr(0))) - uint64(i) + uint64(l)) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list)) = buf + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list)), a, uint64(l)) buf += uintptr(l) - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) = buf + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { case -3: @@ -3000,9 +3000,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf break } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = int32(l) - (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = int32(l) + (*hostent)(unsafe.Pointer(h)).Fh_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases)) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } @@ -3076,8 +3076,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -3088,7 +3088,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) - need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -3098,117 +3098,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) for i = 0; i < cnt; i++ { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf - buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0) - (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) - Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) - buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1)) - if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf - Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name) - buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1)) } else { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_next uintptr } /* if.h:51:1 */ type ifmap = struct { - mem_start uint64 - mem_end uint64 - base_addr uint16 - irq uint8 - dma uint8 - port uint8 - _ [3]byte + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_buf uintptr } } /* if.h:116:1 */ type ns_sect = uint32 /* nameser.h:37:3 */ type __ns_msg = struct { - _msg uintptr - _eom uintptr - _id uint16_t - _flags uint16_t - _counts [4]uint16_t - _ [4]byte - _sections [4]uintptr - _sect ns_sect - _rrnum int32 - _msg_ptr uintptr + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -3222,24 +3222,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:123:1 */ type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ type ns_tcp_tsig_state1 = struct { - counter int32 - _ [4]byte - key uintptr - ctx uintptr - sig [512]uint8 - siglen int32 - _ [4]byte + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -3253,45 +3253,45 @@ type ns_key_types = uint32 /* nameser.h:226:3 */ type ns_cert_types = uint32 /* nameser.h:234:3 */ type HEADER = struct { - _ [0]uint32 - id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ - qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ - nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ } /* nameser.h:353:3 */ // unused; purely for broken apps type __res_state = struct { - retrans int32 - retry int32 - options uint64 - nscount int32 - nsaddr_list [3]struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - id uint16 - _ [2]byte - dnsrch [7]uintptr - defdname [256]int8 - pfcode uint64 - ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ - _ [4]byte - sort_list [10]struct { - addr struct{ s_addr in_addr_t } - mask uint32_t - } - qhook uintptr - rhook uintptr - res_h_errno int32 - _vcsock int32 - _flags uint32 - _ [4]byte - _u struct { - _ [0]uint64 - pad [52]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -3299,10 +3299,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -3373,13 +3373,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) Xmemcpy(tls, bp+528+8, ts+90, uint64(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -3433,7 +3433,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc // var num [13]int8 at bp+334, 13 - var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).Fsa_family) var a uintptr var scopeid uint32 @@ -3456,7 +3456,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc } else { mkptr4(tls, bp, a+uintptr(12)) } - scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).Fsin6_scope_id break default: return -6 @@ -3504,7 +3504,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc if serv != 0 && servlen != 0 { var p uintptr = bp + 78 /* buf */ - var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).Fsin_port)) *(*int8)(unsafe.Pointer(bp + 78)) = int8(0) if !(flags&0x02 != 0) { reverse_services(tls, bp+78, port, flags&0x10) @@ -3762,8 +3762,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 2 - (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -3786,7 +3786,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -3810,20 +3810,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:160:18 */ type flock = struct { - l_type int16 - l_whence int16 - _ [4]byte - l_start off_t - l_len off_t - l_pid pid_t - _ [4]byte + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -3849,14 +3849,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 2 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } //TODO if (family != AF_INET) //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; if family != 2 { var x = Xzero_struct_address - x.family = 10 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -3949,10 +3949,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [4]byte } /* lookup_name.c:112:1 */ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ @@ -4002,31 +4002,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), Fprec: uint8(40), Flabel: uint8(1)}, } /* lookup_name.c:241:3 */ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ var i int32 for i = 0; ; i++ { - if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 { continue } - if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != - int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -4035,7 +4035,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -4068,7 +4068,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ var a uintptr = _a var b uintptr = _b - return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -4148,7 +4148,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -4165,12 +4165,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -4197,8 +4197,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -4226,7 +4226,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -4278,9 +4278,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if name != 0 { return -8 } - (*service)(unsafe.Pointer(buf)).port = uint16_t(0) - (*service)(unsafe.Pointer(buf)).proto = uint8(proto) - (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -4295,14 +4295,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -8 } if proto != 17 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) } if proto != 6 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -4375,19 +4375,19 @@ func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */ } func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ - *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 - if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0)) } - (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { *(*uint32)(unsafe.Pointer(f)) |= uint32(32) return -1 } - (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -4409,7 +4409,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ if !(X__toread(tls, f) != 0) && (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -4441,11 +4441,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y float64 = X__floatscan(tls, bp, prec, 1) - var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -4475,12 +4475,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) if p != 0 { - var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y diff --git a/vendor/modernc.org/libc/musl_freebsd_386.go b/vendor/modernc.org/libc/musl_freebsd_386.go index afe262c3..a7fc3180 100644 --- a/vendor/modernc.org/libc/musl_freebsd_386.go +++ b/vendor/modernc.org/libc/musl_freebsd_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc @@ -417,31 +417,31 @@ type wchar_t = int32 /* <builtin>:15:24 */ /// extern int __mb_sb_limit; type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - __types uintptr + F__min int32 + F__max int32 + F__map int32 + F__types uintptr } /* table.cpp.c:290:3 */ type _RuneRange = struct { - __nranges int32 - __ranges uintptr + F__nranges int32 + F__ranges uintptr } /* table.cpp.c:295:3 */ type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - __runetype [256]uint32 - __maplower [256]int32 - __mapupper [256]int32 - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__runetype [256]uint32 + F__maplower [256]int32 + F__mapupper [256]int32 + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 } /* table.cpp.c:320:3 */ /// /// extern const _RuneLocale _DefaultRuneLocale; @@ -2367,11 +2367,11 @@ type _RuneLocale = struct { var X_DefaultRuneLocale = _RuneLocale{ - __magic: *(*[8]int8)(unsafe.Pointer(ts)), - __encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), - __invalid_rune: 0xFFFD, + F__magic: *(*[8]int8)(unsafe.Pointer(ts)), + F__encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), + F__invalid_rune: 0xFFFD, - __runetype: [256]uint32{ + F__runetype: [256]uint32{ 0: uint32(0x00000200), @@ -3233,7 +3233,7 @@ var X_DefaultRuneLocale = _RuneLocale{ 127: uint32(0x00000200), }, - __maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + F__maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, @@ -3266,7 +3266,7 @@ var X_DefaultRuneLocale = _RuneLocale{ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, }, - __mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + F__mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, @@ -3447,37 +3447,37 @@ type ssize_t = int32 /* alltypes.h:88:15 */ type off_t = int64 /* alltypes.h:185:16 */ type _IO_FILE = struct { - flags uint32 - rpos uintptr - rend uintptr - close uintptr - wend uintptr - wpos uintptr - mustbezero_1 uintptr - wbase uintptr - read uintptr - write uintptr - seek uintptr - buf uintptr - buf_size size_t - prev uintptr - next uintptr - fd int32 - pipe_pid int32 - lockcount int32 - mode int32 - lock int32 - lbf int32 - cookie uintptr - off off_t - getln_buf uintptr - mustbezero_2 uintptr - shend uintptr - shlim off_t - shcnt off_t - prev_locked uintptr - next_locked uintptr - locale uintptr + Fflags uint32 + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int32 + Fmode int32 + Flock int32 + Flbf int32 + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:343:9 */ type FILE = _IO_FILE /* alltypes.h:343:25 */ @@ -3485,8 +3485,8 @@ type FILE = _IO_FILE /* alltypes.h:343:25 */ type va_list = uintptr /* alltypes.h:349:27 */ type _G_fpos64_t = struct { - _ [0]uint32 - __opaque [16]int8 + F__ccgo_pad1 [0]uint32 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -3499,7 +3499,7 @@ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) - // var __u struct {__f float32;} at bp, 4 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -3509,7 +3509,7 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) - // var __u struct {__f float64;} at bp, 8 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -3524,58 +3524,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var neg int32 = 0 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -3614,8 +3614,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3624,13 +3624,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if c == '.' { gotrad = 1 for c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3641,8 +3641,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3683,8 +3683,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -3695,8 +3695,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -3938,16 +3938,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 var c int32 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() // Skip leading zeros for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3957,8 +3957,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 if c == '.' { gotrad = 1 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3972,8 +3972,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 goto __2 __2: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3984,8 +3984,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -4014,18 +4014,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4045,8 +4045,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = scanexp(tls, f, pok) if e2 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -4056,8 +4056,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4137,8 +4137,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } for __isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -4147,8 +4147,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '+' || c == '-' { sign = sign - 2*Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4157,8 +4157,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = size_t(0); i < size_t(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { if i < size_t(7) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4166,14 +4166,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == size_t(3) || i == size_t(8) || i > size_t(3) && pok != 0 { if i != size_t(8) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > size_t(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4185,8 +4185,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = size_t(0); i < size_t(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { if i < size_t(2) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4195,21 +4195,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == size_t(3) { if func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return float64(X__builtin_nanf(tls, ts+54)) } for i = size_t(1); ; i++ { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4219,8 +4219,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == ')' { return float64(X__builtin_nanf(tls, ts+54)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -4229,8 +4229,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint32(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4240,8 +4240,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -4251,16 +4251,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '0' { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c|32 == 'x' { return hexfloat(tls, f, bits, emin, sign, pok) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -4307,8 +4307,8 @@ __1: ; __2: if !(__isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -4322,8 +4322,8 @@ __3: } neg = -Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4333,8 +4333,8 @@ __4: goto __5 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4342,23 +4342,23 @@ __4: goto __7 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { goto __9 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -4391,8 +4391,8 @@ __13: if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { goto __14 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -4414,8 +4414,8 @@ __17: goto __18 __18: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4432,8 +4432,8 @@ __20: goto __21 __21: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4462,8 +4462,8 @@ __26: goto __27 __27: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4480,8 +4480,8 @@ __29: goto __30 __30: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4500,8 +4500,8 @@ __32: goto __33 __33: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4518,8 +4518,8 @@ __35: goto __36 __36: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4541,8 +4541,8 @@ __39: goto __40 __40: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4561,8 +4561,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -4595,34 +4595,34 @@ __43: // the actual count. func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ - (*FILE)(unsafe.Pointer(f)).shlim = lim - (*FILE)(unsafe.Pointer(f)).shcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).buf) - int32((*FILE)(unsafe.Pointer(f)).rpos)) / 1) + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf) - int32((*FILE)(unsafe.Pointer(f)).Frpos)) / 1) // If lim is nonzero, rend must be a valid pointer. - if lim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).rend)-int32((*FILE)(unsafe.Pointer(f)).rpos))/1) > lim { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + if lim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ var c int32 - var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + off_t((int32((*FILE)(unsafe.Pointer(f)).rpos)-int32((*FILE)(unsafe.Pointer(f)).buf))/1) - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { - (*FILE)(unsafe.Pointer(f)).shcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).buf)-int32((*FILE)(unsafe.Pointer(f)).rpos))/1) + cnt - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos - (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(f)).Frpos)-int32((*FILE)(unsafe.Pointer(f)).Fbuf))/1) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) return -1 } cnt++ - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).rend)-int32((*FILE)(unsafe.Pointer(f)).rpos))/1) > (*FILE)(unsafe.Pointer(f)).shlim-cnt { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*FILE)(unsafe.Pointer(f)).shcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).buf)-int32((*FILE)(unsafe.Pointer(f)).rpos))/1) + cnt - if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf { - *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } @@ -4649,7 +4649,7 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -4678,7 +4678,7 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ bp := tls.Alloc(8) defer tls.Free(8) - // var u struct {f float64;} at bp, 8 + // var u struct {Ff float64;} at bp, 8 var y double_t = x @@ -4715,26 +4715,26 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:51:66 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type pid_t = int32 /* alltypes.h:258:13 */ @@ -4744,8 +4744,8 @@ type uid_t = uint32 /* alltypes.h:268:18 */ type gid_t = uint32 /* alltypes.h:273:18 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:378:1 */ type socklen_t = uint32 /* alltypes.h:384:18 */ @@ -4753,298 +4753,298 @@ type socklen_t = uint32 /* alltypes.h:384:18 */ type sa_family_t = uint16 /* alltypes.h:389:24 */ type msghdr = struct { - msg_name uintptr - msg_namelen socklen_t - msg_iov uintptr - msg_iovlen int32 - msg_control uintptr - msg_controllen socklen_t - msg_flags int32 + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } /* socket.h:372:1 */ -type in_port_t = uint16_t /* in.h:12:18 */ -type in_addr_t = uint32_t /* in.h:13:18 */ -type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ type sockaddr_in = struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } /* in.h:23:1 */ type sockaddr_in6 = struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } /* in.h:34:1 */ type ipv6_mreq = struct { - ipv6mr_multiaddr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } } /* in.h:247:1 */ type ip_mreqn = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_address struct{ s_addr in_addr_t } - imr_ifindex int32 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 } /* in.h:252:1 */ type ip_mreq_source = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } - imr_sourceaddr struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } } /* in.h:258:1 */ type ip_msfilter = struct { - imsf_multiaddr struct{ s_addr in_addr_t } - imsf_interface struct{ s_addr in_addr_t } - imsf_fmode uint32_t - imsf_numsrc uint32_t - imsf_slist [1]struct{ s_addr in_addr_t } + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } } /* in.h:264:1 */ type group_req = struct { - gr_interface uint32_t - gr_group struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgr_interface uint32_t + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } } /* in.h:275:1 */ type group_source_req = struct { - gsr_interface uint32_t - gsr_group struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgsr_interface uint32_t + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } - gsr_source struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } } /* in.h:280:1 */ type group_filter = struct { - gf_interface uint32_t - gf_group struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [122]int8 - __ss_align uint32 + Fgf_interface uint32_t + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 } } /* in.h:286:1 */ type in_pktinfo = struct { - ipi_ifindex int32 - ipi_spec_dst struct{ s_addr in_addr_t } - ipi_addr struct{ s_addr in_addr_t } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } } /* in.h:297:1 */ type in6_pktinfo = struct { - ipi6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_ifindex uint32 } /* in.h:303:1 */ type ip6_mtuinfo = struct { - ip6m_addr struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_mtu uint32_t } /* in.h:308:1 */ type addrinfo = struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr } /* netdb.h:16:1 */ // Legacy functions follow (marked OBsolete in SUS) type netent = struct { - n_name uintptr - n_aliases uintptr - n_addrtype int32 - n_net uint32_t + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t } /* netdb.h:62:1 */ type hostent = struct { - h_name uintptr - h_aliases uintptr - h_addrtype int32 - h_length int32 - h_addr_list uintptr + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 } /* netdb.h:85:1 */ type aibuf = struct { - ai struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr - } - sa struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - _ [12]byte - } - lock [1]int32 - slot int16 - ref int16 + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 } /* lookup.h:10:1 */ type sa = struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype uint8 } /* lookup.h:27:1 */ type resolvconf = struct { - ns [3]struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 - } - nns uint32 - attempts uint32 - ndots uint32 - timeout uint32 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 } /* lookup.h:34:1 */ func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ var cnt size_t cnt = size_t(1) __1: - if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint32(uintptr(0))) - b -= 68 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 68 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+66, int16(cnt))) != 0) { Xfree(tls, b) @@ -5057,9 +5057,9 @@ type time_t = int64 /* alltypes.h:108:16 */ type clockid_t = int32 /* alltypes.h:237:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int32 - __12 uint32 /* int : 32 */ + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ } /* alltypes.h:252:1 */ type pthread_t = uintptr /* alltypes.h:296:26 */ @@ -5070,33 +5070,33 @@ type pthread_key_t = uint32 /* alltypes.h:307:18 */ type pthread_spinlock_t = int32 /* alltypes.h:312:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:317:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:317:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:322:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:322:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:327:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:327:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:332:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:332:40 */ -type __sigset_t = struct{ __bits [32]uint32 } /* alltypes.h:372:9 */ +type __sigset_t = struct{ F__bits [32]uint32 } /* alltypes.h:372:9 */ type sigset_t = __sigset_t /* alltypes.h:372:71 */ -type pthread_attr_t = struct{ __u struct{ __i [9]int32 } } /* alltypes.h:395:147 */ +type pthread_attr_t = struct{ F__u struct{ F__i [9]int32 } } /* alltypes.h:395:147 */ -type pthread_mutex_t = struct{ __u struct{ __i [6]int32 } } /* alltypes.h:400:157 */ +type pthread_mutex_t = struct{ F__u struct{ F__i [6]int32 } } /* alltypes.h:400:157 */ -type pthread_cond_t = struct{ __u struct{ __i [12]int32 } } /* alltypes.h:410:112 */ +type pthread_cond_t = struct{ F__u struct{ F__i [12]int32 } } /* alltypes.h:410:112 */ -type pthread_rwlock_t = struct{ __u struct{ __i [8]int32 } } /* alltypes.h:420:139 */ +type pthread_rwlock_t = struct{ F__u struct{ F__i [8]int32 } } /* alltypes.h:420:139 */ -type pthread_barrier_t = struct{ __u struct{ __i [5]int32 } } /* alltypes.h:425:137 */ +type pthread_barrier_t = struct{ F__u struct{ F__i [5]int32 } } /* alltypes.h:425:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [4]int32 - __reserved3 int32 + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [4]int32 + F__reserved3 int32 } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:232:14 */ @@ -5104,36 +5104,36 @@ type timer_t = uintptr /* alltypes.h:232:14 */ type clock_t = int32 /* alltypes.h:242:14 */ type tm = struct { - tm_sec int32 - tm_min int32 - tm_hour int32 - tm_mday int32 - tm_mon int32 - tm_year int32 - tm_wday int32 - tm_yday int32 - tm_isdst int32 - tm_gmtoff int32 - tm_zone uintptr + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int32 - __12 uint32 /* int : 32 */ + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ } - it_value struct { - tv_sec time_t - tv_nsec int32 - __12 uint32 /* int : 32 */ + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ type useconds_t = uint32 /* alltypes.h:283:18 */ @@ -5167,10 +5167,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } if hint != 0 { - family = (*addrinfo)(unsafe.Pointer(hint)).ai_family - flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags - proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol - socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -5266,7 +5266,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -5276,30 +5276,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //TODO : sizeof(struct sockaddr_in6), //TODO .ai_addr = (void *)&out[k].sa, //TODO .ai_canonname = outcanon }; - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_addrlen = func() uint32 { - if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { return uint32(unsafe.Sizeof(sockaddr_in{})) } return uint32(unsafe.Sizeof(sockaddr_in6{})) }() - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_addr = out + uintptr(k)*68 + 32 - (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).ai.ai_canonname = outcanon + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addr = out + uintptr(k)*68 + 32 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*68)).ai.ai_next = out + uintptr(k)*68 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*68)).Fai.Fai_next = out + uintptr(k)*68 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { case 2: - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin_family = sa_family_t(2) - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) Xmemcpy(tls, out+uintptr(k)*68+32+4, bp+8+uintptr(i)*28+8, uint32(4)) break case 10: - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin6_family = sa_family_t(10) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*68+32+8, bp+8+uintptr(i)*28+8, uint32(16)) break } @@ -5313,28 +5313,28 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid gid_t } /* socket.h:57:1 */ type mmsghdr = struct { - msg_hdr struct { - msg_name uintptr - msg_namelen socklen_t - msg_iov uintptr - msg_iovlen int32 - msg_control uintptr - msg_controllen socklen_t - msg_flags int32 - } - msg_len uint32 + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -5432,8 +5432,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -5444,7 +5444,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, align = -uintptr_t(buf) & (uint32(unsafe.Sizeof(uintptr(0))) - uint32(1)) need = uint32(4) * uint32(unsafe.Sizeof(uintptr(0))) - need = need + uint32(cnt+1)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + uint32(cnt+1)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + size_t(1)) need = need + (Xstrlen(tls, bp+1344) + size_t(1)) need = need + align @@ -5454,113 +5454,113 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint32(3) * uint32(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint32(cnt+1) * uint32(unsafe.Sizeof(uintptr(0)))) for i = 0; i < cnt; i++ { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*4)) = buf - buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*hostent)(unsafe.Pointer(h)).h_length)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = uintptr(0) - (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) - Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) - buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + size_t(1)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + size_t(1)) - if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4)) = buf - Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4)), name) - buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4))) + size_t(1)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4))) + size_t(1)) } else { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*4)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - if_name uintptr + Fif_index uint32 + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_next uintptr } /* if.h:51:1 */ type ifmap = struct { - mem_start uint32 - mem_end uint32 - base_addr uint16 - irq uint8 - dma uint8 - port uint8 - _ [3]byte + Fmem_start uint32 + Fmem_end uint32 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint32 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint32 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + Fifc_ifcu struct{ Fifcu_buf uintptr } } /* if.h:116:1 */ type ns_sect = uint32 /* nameser.h:37:3 */ type __ns_msg = struct { - _msg uintptr - _eom uintptr - _id uint16_t - _flags uint16_t - _counts [4]uint16_t - _sections [4]uintptr - _sect ns_sect - _rrnum int32 - _msg_ptr uintptr + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -5574,21 +5574,21 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [2]byte - data uintptr - len int32 + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [2]byte + Fdata uintptr + Flen int32 } /* nameser.h:123:1 */ type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ type ns_tcp_tsig_state1 = struct { - counter int32 - key uintptr - ctx uintptr - sig [512]uint8 - siglen int32 + Fcounter int32 + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -5602,43 +5602,43 @@ type ns_key_types = uint32 /* nameser.h:226:3 */ type ns_cert_types = uint32 /* nameser.h:234:3 */ type HEADER = struct { - _ [0]uint32 - id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ - qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ - nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ } /* nameser.h:353:3 */ // unused; purely for broken apps type __res_state = struct { - retrans int32 - retry int32 - options uint32 - nscount int32 - nsaddr_list [3]struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - id uint16 - _ [2]byte - dnsrch [7]uintptr - defdname [256]int8 - pfcode uint32 - ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ - _ [4]byte - sort_list [10]struct { - addr struct{ s_addr in_addr_t } - mask uint32_t - } - qhook uintptr - rhook uintptr - res_h_errno int32 - _vcsock int32 - _flags uint32 - _u struct { - _ [0]uint32 - pad [52]int8 + Fretrans int32 + Fretry int32 + Foptions uint32 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint32 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F_u struct { + F__ccgo_pad1 [0]uint32 + Fpad [52]int8 } } /* resolv.h:26:9 */ @@ -5646,9 +5646,9 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - name uintptr - humanname uintptr + Fnumber int32 + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -5719,13 +5719,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint32(4)) Xmemcpy(tls, bp+528+8, ts+129, uint32(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint32(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint32(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -6010,8 +6010,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } Xmemcpy(tls, buf+8, bp, uint32(unsafe.Sizeof(in_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 2 - (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -6034,7 +6034,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint32(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -6058,18 +6058,18 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:175:18 */ type flock = struct { - l_type int16 - l_whence int16 - l_start off_t - l_len off_t - l_pid pid_t + Fl_type int16 + Fl_whence int16 + Fl_start off_t + Fl_len off_t + Fl_pid pid_t } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -6095,14 +6095,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 2 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } //TODO if (family != AF_INET) //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; if family != 2 { var x = Xzero_struct_address - x.family = 10 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -6195,9 +6195,9 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 + Faddrs uintptr + Fcanon uintptr + Fcnt int32 } /* lookup_name.c:112:1 */ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ @@ -6247,31 +6247,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), Fprec: uint8(40), Flabel: uint8(1)}, } /* lookup_name.c:241:3 */ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ var i int32 for i = 0; ; i++ { - if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint32(defpolicy[i].len)) != 0 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint32(defpolicy[i].Flen)) != 0 { continue } - if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != - int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -6280,7 +6280,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -6313,7 +6313,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ var a uintptr = _a var b uintptr = _b - return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -6393,7 +6393,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -6410,12 +6410,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -6442,8 +6442,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -6471,7 +6471,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint32(cnt), uint32(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -6523,9 +6523,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if name != 0 { return -8 } - (*service)(unsafe.Pointer(buf)).port = uint16_t(0) - (*service)(unsafe.Pointer(buf)).proto = uint8(proto) - (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -6540,14 +6540,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -8 } if proto != 17 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) } if proto != 6 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -6608,19 +6608,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ - *(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 - if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + *(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint32(0)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint32(0)) } - (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+28, AssignPtrUintptr(f+16, uintptr(0))) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+28, AssignPtrUintptr(f+16, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { *(*uint32)(unsafe.Pointer(f)) |= uint32(32) return -1 } - (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+8, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+8, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -6642,7 +6642,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ if !(X__toread(tls, f) != 0) && (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint32(1)) == size_t(1) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint32(1)) == size_t(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -6674,11 +6674,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 136 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+4, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y float64 = X__floatscan(tls, bp, prec, 1) - var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).rpos)-int32((*FILE)(unsafe.Pointer(bp)).buf))/1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -6708,12 +6708,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 136 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+4, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) if p != 0 { - var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).rpos)-int32((*FILE)(unsafe.Pointer(bp)).buf))/1)) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1)) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y diff --git a/vendor/modernc.org/libc/musl_freebsd_amd64.go b/vendor/modernc.org/libc/musl_freebsd_amd64.go index a979c991..ae1a70af 100644 --- a/vendor/modernc.org/libc/musl_freebsd_amd64.go +++ b/vendor/modernc.org/libc/musl_freebsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc @@ -417,35 +417,35 @@ type wchar_t = int32 /* <builtin>:15:24 */ /// extern int __mb_sb_limit; type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr + F__min int32 + F__max int32 + F__map int32 + F__ccgo_pad1 [4]byte + F__types uintptr } /* table.cpp.c:290:3 */ type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr + F__nranges int32 + F__ccgo_pad1 [4]byte + F__ranges uintptr } /* table.cpp.c:295:3 */ type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - _ [4]byte - __runetype [256]uint64 - __maplower [256]int32 - __mapupper [256]int32 - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - _ [4]byte + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__ccgo_pad1 [4]byte + F__runetype [256]uint64 + F__maplower [256]int32 + F__mapupper [256]int32 + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 + F__ccgo_pad2 [4]byte } /* table.cpp.c:320:3 */ /// /// extern const _RuneLocale _DefaultRuneLocale; @@ -2371,11 +2371,11 @@ type _RuneLocale = struct { var X_DefaultRuneLocale = _RuneLocale{ - __magic: *(*[8]int8)(unsafe.Pointer(ts)), - __encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), - __invalid_rune: 0xFFFD, + F__magic: *(*[8]int8)(unsafe.Pointer(ts)), + F__encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), + F__invalid_rune: 0xFFFD, - __runetype: [256]uint64{ + F__runetype: [256]uint64{ 0: uint64(0x00000200), @@ -3237,7 +3237,7 @@ var X_DefaultRuneLocale = _RuneLocale{ 127: uint64(0x00000200), }, - __maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + F__maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, @@ -3270,7 +3270,7 @@ var X_DefaultRuneLocale = _RuneLocale{ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, }, - __mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + F__mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, @@ -3451,39 +3451,39 @@ type ssize_t = int64 /* alltypes.h:65:15 */ type off_t = int64 /* alltypes.h:162:16 */ type _IO_FILE = struct { - flags uint32 - _ [4]byte - rpos uintptr - rend uintptr - close uintptr - wend uintptr - wpos uintptr - mustbezero_1 uintptr - wbase uintptr - read uintptr - write uintptr - seek uintptr - buf uintptr - buf_size size_t - prev uintptr - next uintptr - fd int32 - pipe_pid int32 - lockcount int64 - mode int32 - lock int32 - lbf int32 - _ [4]byte - cookie uintptr - off off_t - getln_buf uintptr - mustbezero_2 uintptr - shend uintptr - shlim off_t - shcnt off_t - prev_locked uintptr - next_locked uintptr - locale uintptr + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:320:9 */ type FILE = _IO_FILE /* alltypes.h:320:25 */ @@ -3491,8 +3491,8 @@ type FILE = _IO_FILE /* alltypes.h:320:25 */ type va_list = uintptr /* alltypes.h:326:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -3505,7 +3505,7 @@ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) - // var __u struct {__f float32;} at bp, 4 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -3515,7 +3515,7 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) - // var __u struct {__f float64;} at bp, 8 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -3530,58 +3530,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var neg int32 = 0 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -3620,8 +3620,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3630,13 +3630,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if c == '.' { gotrad = 1 for c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3647,8 +3647,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3689,8 +3689,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -3701,8 +3701,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -3944,16 +3944,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 var c int32 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() // Skip leading zeros for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3963,8 +3963,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 if c == '.' { gotrad = 1 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3978,8 +3978,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 goto __2 __2: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3990,8 +3990,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -4020,18 +4020,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4051,8 +4051,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = scanexp(tls, f, pok) if e2 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -4062,8 +4062,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4143,8 +4143,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } for __isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -4153,8 +4153,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '+' || c == '-' { sign = sign - 2*Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4163,8 +4163,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { if i < uint64(7) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4172,14 +4172,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { if i != uint64(8) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4191,8 +4191,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { if i < uint64(2) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4201,21 +4201,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) { if func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return float64(X__builtin_nanf(tls, ts+54)) } for i = uint64(1); ; i++ { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4225,8 +4225,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == ')' { return float64(X__builtin_nanf(tls, ts+54)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -4235,8 +4235,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4246,8 +4246,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -4257,16 +4257,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '0' { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c|32 == 'x' { return hexfloat(tls, f, bits, emin, sign, pok) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -4313,8 +4313,8 @@ __1: ; __2: if !(__isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -4328,8 +4328,8 @@ __3: } neg = -Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4339,8 +4339,8 @@ __4: goto __5 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4348,23 +4348,23 @@ __4: goto __7 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { goto __9 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -4397,8 +4397,8 @@ __13: if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { goto __14 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -4420,8 +4420,8 @@ __17: goto __18 __18: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4438,8 +4438,8 @@ __20: goto __21 __21: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4468,8 +4468,8 @@ __26: goto __27 __27: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4486,8 +4486,8 @@ __29: goto __30 __30: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4506,8 +4506,8 @@ __32: goto __33 __33: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4524,8 +4524,8 @@ __35: goto __36 __36: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4547,8 +4547,8 @@ __39: goto __40 __40: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4567,8 +4567,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -4601,34 +4601,34 @@ __43: // the actual count. func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ - (*FILE)(unsafe.Pointer(f)).shlim = lim - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 1 // If lim is nonzero, rend must be a valid pointer. - if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > lim { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ var c int32 - var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos - (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) return -1 } cnt++ - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > (*FILE)(unsafe.Pointer(f)).shlim-cnt { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf { - *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } @@ -4655,7 +4655,7 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -4684,7 +4684,7 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ bp := tls.Alloc(8) defer tls.Free(8) - // var u struct {f float64;} at bp, 8 + // var u struct {Ff float64;} at bp, 8 var y double_t = x @@ -4721,26 +4721,26 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:41:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type pid_t = int32 /* alltypes.h:235:13 */ @@ -4750,8 +4750,8 @@ type uid_t = uint32 /* alltypes.h:245:18 */ type gid_t = uint32 /* alltypes.h:250:18 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:355:1 */ type socklen_t = uint32 /* alltypes.h:361:18 */ @@ -4759,311 +4759,311 @@ type socklen_t = uint32 /* alltypes.h:361:18 */ type sa_family_t = uint16 /* alltypes.h:366:24 */ type msghdr = struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } /* socket.h:372:1 */ -type in_port_t = uint16_t /* in.h:12:18 */ -type in_addr_t = uint32_t /* in.h:13:18 */ -type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ type sockaddr_in = struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } /* in.h:23:1 */ type sockaddr_in6 = struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } /* in.h:34:1 */ type ipv6_mreq = struct { - ipv6mr_multiaddr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } } /* in.h:247:1 */ type ip_mreqn = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_address struct{ s_addr in_addr_t } - imr_ifindex int32 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 } /* in.h:252:1 */ type ip_mreq_source = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } - imr_sourceaddr struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } } /* in.h:258:1 */ type ip_msfilter = struct { - imsf_multiaddr struct{ s_addr in_addr_t } - imsf_interface struct{ s_addr in_addr_t } - imsf_fmode uint32_t - imsf_numsrc uint32_t - imsf_slist [1]struct{ s_addr in_addr_t } + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } } /* in.h:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:275:1 */ type group_source_req = struct { - gsr_interface uint32_t - _ [4]byte - gsr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:280:1 */ type group_filter = struct { - gf_interface uint32_t - _ [4]byte - gf_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:286:1 */ type in_pktinfo = struct { - ipi_ifindex int32 - ipi_spec_dst struct{ s_addr in_addr_t } - ipi_addr struct{ s_addr in_addr_t } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } } /* in.h:297:1 */ type in6_pktinfo = struct { - ipi6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_ifindex uint32 } /* in.h:303:1 */ type ip6_mtuinfo = struct { - ip6m_addr struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_mtu uint32_t } /* in.h:308:1 */ type addrinfo = struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr } /* netdb.h:16:1 */ // Legacy functions follow (marked OBsolete in SUS) type netent = struct { - n_name uintptr - n_aliases uintptr - n_addrtype int32 - n_net uint32_t + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t } /* netdb.h:62:1 */ type hostent = struct { - h_name uintptr - h_aliases uintptr - h_addrtype int32 - h_length int32 - h_addr_list uintptr + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte } /* netdb.h:85:1 */ type aibuf = struct { - ai struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr - } - sa struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - _ [12]byte - } - lock [1]int32 - slot int16 - ref int16 - _ [4]byte + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [4]byte } /* lookup.h:10:1 */ type sa = struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype uint8 } /* lookup.h:27:1 */ type resolvconf = struct { - ns [3]struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 - } - nns uint32 - attempts uint32 - ndots uint32 - timeout uint32 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 } /* lookup.h:34:1 */ func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ var cnt size_t cnt = uint64(1) __1: - if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -5076,8 +5076,8 @@ type time_t = int64 /* alltypes.h:85:16 */ type clockid_t = int32 /* alltypes.h:214:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:229:1 */ type pthread_t = uintptr /* alltypes.h:273:26 */ @@ -5088,62 +5088,62 @@ type pthread_key_t = uint32 /* alltypes.h:284:18 */ type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */ type sigset_t = __sigset_t /* alltypes.h:349:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:372:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:377:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:387:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:397:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:402:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:209:14 */ @@ -5151,35 +5151,35 @@ type timer_t = uintptr /* alltypes.h:209:14 */ type clock_t = int64 /* alltypes.h:219:14 */ type tm = struct { - tm_sec int32 - tm_min int32 - tm_hour int32 - tm_mday int32 - tm_mon int32 - tm_year int32 - tm_wday int32 - tm_yday int32 - tm_isdst int32 - _ [4]byte - tm_gmtoff int64 - tm_zone uintptr + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ type useconds_t = uint32 /* alltypes.h:260:18 */ @@ -5213,10 +5213,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } if hint != 0 { - family = (*addrinfo)(unsafe.Pointer(hint)).ai_family - flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags - proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol - socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -5312,7 +5312,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -5322,30 +5322,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //TODO : sizeof(struct sockaddr_in6), //TODO .ai_addr = (void *)&out[k].sa, //TODO .ai_canonname = outcanon }; - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 { - if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { return uint32(unsafe.Sizeof(sockaddr_in{})) } return uint32(unsafe.Sizeof(sockaddr_in6{})) }() - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48 - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { case 2: - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2) - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) break case 10: - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -5359,33 +5359,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid gid_t } /* socket.h:57:1 */ type mmsghdr = struct { - msg_hdr struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte - } - msg_len uint32 - _ [4]byte + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -5483,8 +5483,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -5495,7 +5495,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) - need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -5505,117 +5505,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) for i = 0; i < cnt; i++ { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf - buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0) - (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) - Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) - buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1)) - if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf - Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name) - buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1)) } else { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_next uintptr } /* if.h:51:1 */ type ifmap = struct { - mem_start uint64 - mem_end uint64 - base_addr uint16 - irq uint8 - dma uint8 - port uint8 - _ [3]byte + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_buf uintptr } } /* if.h:116:1 */ type ns_sect = uint32 /* nameser.h:37:3 */ type __ns_msg = struct { - _msg uintptr - _eom uintptr - _id uint16_t - _flags uint16_t - _counts [4]uint16_t - _ [4]byte - _sections [4]uintptr - _sect ns_sect - _rrnum int32 - _msg_ptr uintptr + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -5629,24 +5629,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:123:1 */ type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ type ns_tcp_tsig_state1 = struct { - counter int32 - _ [4]byte - key uintptr - ctx uintptr - sig [512]uint8 - siglen int32 - _ [4]byte + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -5660,45 +5660,45 @@ type ns_key_types = uint32 /* nameser.h:226:3 */ type ns_cert_types = uint32 /* nameser.h:234:3 */ type HEADER = struct { - _ [0]uint32 - id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ - qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ - nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ } /* nameser.h:353:3 */ // unused; purely for broken apps type __res_state = struct { - retrans int32 - retry int32 - options uint64 - nscount int32 - nsaddr_list [3]struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - id uint16 - _ [2]byte - dnsrch [7]uintptr - defdname [256]int8 - pfcode uint64 - ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ - _ [4]byte - sort_list [10]struct { - addr struct{ s_addr in_addr_t } - mask uint32_t - } - qhook uintptr - rhook uintptr - res_h_errno int32 - _vcsock int32 - _flags uint32 - _ [4]byte - _u struct { - _ [0]uint64 - pad [52]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -5706,10 +5706,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -5780,13 +5780,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) Xmemcpy(tls, bp+528+8, ts+129, uint64(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -6071,8 +6071,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 2 - (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -6095,7 +6095,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -6119,20 +6119,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:152:18 */ type flock = struct { - l_type int16 - l_whence int16 - _ [4]byte - l_start off_t - l_len off_t - l_pid pid_t - _ [4]byte + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -6158,14 +6158,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 2 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } //TODO if (family != AF_INET) //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; if family != 2 { var x = Xzero_struct_address - x.family = 10 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -6258,10 +6258,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [4]byte } /* lookup_name.c:112:1 */ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ @@ -6311,31 +6311,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), Fprec: uint8(40), Flabel: uint8(1)}, } /* lookup_name.c:241:3 */ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ var i int32 for i = 0; ; i++ { - if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 { continue } - if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != - int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -6344,7 +6344,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -6377,7 +6377,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ var a uintptr = _a var b uintptr = _b - return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -6457,7 +6457,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -6474,12 +6474,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -6506,8 +6506,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -6535,7 +6535,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -6587,9 +6587,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if name != 0 { return -8 } - (*service)(unsafe.Pointer(buf)).port = uint16_t(0) - (*service)(unsafe.Pointer(buf)).proto = uint8(proto) - (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -6604,14 +6604,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -8 } if proto != 17 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) } if proto != 6 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -6672,19 +6672,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ - *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 - if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0)) } - (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { *(*uint32)(unsafe.Pointer(f)) |= uint32(32) return -1 } - (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -6706,7 +6706,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ if !(X__toread(tls, f) != 0) && (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -6738,11 +6738,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y float64 = X__floatscan(tls, bp, prec, 1) - var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -6772,12 +6772,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) if p != 0 { - var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y diff --git a/vendor/modernc.org/libc/musl_freebsd_arm.go b/vendor/modernc.org/libc/musl_freebsd_arm.go new file mode 100644 index 00000000..d444461d --- /dev/null +++ b/vendor/modernc.org/libc/musl_freebsd_arm.go @@ -0,0 +1,6795 @@ +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_arm.go -pkgname libc -static-locals-prefix _s -Iarch/arm -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. + +package libc + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +// musl as a whole is licensed under the following standard MIT license: +// +// ---------------------------------------------------------------------- +// Copyright © 2005-2020 Rich Felker, et al. +// +// 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. +// ---------------------------------------------------------------------- +// +// Authors/contributors include: +// +// A. Wilcox +// Ada Worcester +// Alex Dowad +// Alex Suykov +// Alexander Monakov +// Andre McCurdy +// Andrew Kelley +// Anthony G. Basile +// Aric Belsito +// Arvid Picciani +// Bartosz Brachaczek +// Benjamin Peterson +// Bobby Bingham +// Boris Brezillon +// Brent Cook +// Chris Spiegel +// Clément Vasseur +// Daniel Micay +// Daniel Sabogal +// Daurnimator +// David Carlier +// David Edelsohn +// Denys Vlasenko +// Dmitry Ivanov +// Dmitry V. Levin +// Drew DeVault +// Emil Renner Berthing +// Fangrui Song +// Felix Fietkau +// Felix Janda +// Gianluca Anzolin +// Hauke Mehrtens +// He X +// Hiltjo Posthuma +// Isaac Dunham +// Jaydeep Patil +// Jens Gustedt +// Jeremy Huntwork +// Jo-Philipp Wich +// Joakim Sindholt +// John Spencer +// Julien Ramseier +// Justin Cormack +// Kaarle Ritvanen +// Khem Raj +// Kylie McClain +// Leah Neukirchen +// Luca Barbato +// Luka Perkov +// M Farkas-Dyck (Strake) +// Mahesh Bodapati +// Markus Wichmann +// Masanori Ogino +// Michael Clark +// Michael Forney +// Mikhail Kremnyov +// Natanael Copa +// Nicholas J. Kain +// orc +// Pascal Cuoq +// Patrick Oppenlander +// Petr Hosek +// Petr Skocik +// Pierre Carrier +// Reini Urban +// Rich Felker +// Richard Pennington +// Ryan Fairfax +// Samuel Holland +// Segev Finer +// Shiz +// sin +// Solar Designer +// Stefan Kristiansson +// Stefan O'Rear +// Szabolcs Nagy +// Timo Teräs +// Trutz Behn +// Valentin Ochs +// Will Dietz +// William Haddon +// William Pitcock +// +// Portions of this software are derived from third-party works licensed +// under terms compatible with the above MIT license: +// +// The TRE regular expression implementation (src/regex/reg* and +// src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +// under a 2-clause BSD license (license text in the source files). The +// included version has been heavily modified by Rich Felker in 2012, in +// the interests of size, simplicity, and namespace cleanliness. +// +// Much of the math library code (src/math/* and src/complex/*) is +// Copyright © 1993,2004 Sun Microsystems or +// Copyright © 2003-2011 David Schultz or +// Copyright © 2003-2009 Steven G. Kargl or +// Copyright © 2003-2009 Bruce D. Evans or +// Copyright © 2008 Stephen L. Moshier or +// Copyright © 2017-2018 Arm Limited +// and labelled as such in comments in the individual source files. All +// have been licensed under extremely permissive terms. +// +// The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +// The Android Open Source Project and is licensed under a two-clause BSD +// license. It was taken from Bionic libc, used on Android. +// +// The AArch64 memcpy and memset code (src/string/aarch64/*) are +// Copyright © 1999-2019, Arm Limited. +// +// The implementation of DES for crypt (src/crypt/crypt_des.c) is +// Copyright © 1994 David Burren. It is licensed under a BSD license. +// +// The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +// originally written by Solar Designer and placed into the public +// domain. The code also comes with a fallback permissive license for use +// in jurisdictions that may not recognize the public domain. +// +// The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +// Valentin Ochs and is licensed under an MIT-style license. +// +// The x86_64 port was written by Nicholas J. Kain and is licensed under +// the standard MIT terms. +// +// The mips and microblaze ports were originally written by Richard +// Pennington for use in the ellcc project. The original code was adapted +// by Rich Felker for build system and code conventions during upstream +// integration. It is licensed under the standard MIT terms. +// +// The mips64 port was contributed by Imagination Technologies and is +// licensed under the standard MIT terms. +// +// The powerpc port was also originally written by Richard Pennington, +// and later supplemented and integrated by John Spencer. It is licensed +// under the standard MIT terms. +// +// All other files which have no copyright comments are original works +// produced specifically for use as part of this library, written either +// by Rich Felker, the main author of the library, or by one or more +// contibutors listed above. Details on authorship of individual files +// can be found in the git version control history of the project. The +// omission of copyright and license comments in each file is in the +// interest of source tree size. +// +// In addition, permission is hereby granted for all public header files +// (include/* and arch/*/bits/*) and crt files intended to be linked into +// applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +// the copyright notice and permission notice otherwise required by the +// license, and to use these files without any requirement of +// attribution. These files include substantial contributions from: +// +// Bobby Bingham +// John Spencer +// Nicholas J. Kain +// Rich Felker +// Richard Pennington +// Stefan Kristiansson +// Szabolcs Nagy +// +// all of whom have explicitly granted such permission. +// +// This file previously contained text expressing a belief that most of +// the files covered by the above exception were sufficiently trivial not +// to be subject to copyright, resulting in confusion over whether it +// negated the permissions granted in the license. In the spirit of +// permissive licensing, and of not having licensing issues being an +// obstacle to adoption, that text has been removed. +const ( /* copyright.c:194:1: */ + __musl__copyright__ = 0 +) + +const ( /* nameser.h:117:1: */ + ns_uop_delete = 0 + ns_uop_add = 1 + ns_uop_max = 2 +) + +const ( /* nameser.h:147:1: */ + ns_t_invalid = 0 + ns_t_a = 1 + ns_t_ns = 2 + ns_t_md = 3 + ns_t_mf = 4 + ns_t_cname = 5 + ns_t_soa = 6 + ns_t_mb = 7 + ns_t_mg = 8 + ns_t_mr = 9 + ns_t_null = 10 + ns_t_wks = 11 + ns_t_ptr = 12 + ns_t_hinfo = 13 + ns_t_minfo = 14 + ns_t_mx = 15 + ns_t_txt = 16 + ns_t_rp = 17 + ns_t_afsdb = 18 + ns_t_x25 = 19 + ns_t_isdn = 20 + ns_t_rt = 21 + ns_t_nsap = 22 + ns_t_nsap_ptr = 23 + ns_t_sig = 24 + ns_t_key = 25 + ns_t_px = 26 + ns_t_gpos = 27 + ns_t_aaaa = 28 + ns_t_loc = 29 + ns_t_nxt = 30 + ns_t_eid = 31 + ns_t_nimloc = 32 + ns_t_srv = 33 + ns_t_atma = 34 + ns_t_naptr = 35 + ns_t_kx = 36 + ns_t_cert = 37 + ns_t_a6 = 38 + ns_t_dname = 39 + ns_t_sink = 40 + ns_t_opt = 41 + ns_t_apl = 42 + ns_t_tkey = 249 + ns_t_tsig = 250 + ns_t_ixfr = 251 + ns_t_axfr = 252 + ns_t_mailb = 253 + ns_t_maila = 254 + ns_t_any = 255 + ns_t_zxfr = 256 + ns_t_max = 65536 +) + +const ( /* nameser.h:210:1: */ + ns_c_invalid = 0 + ns_c_in = 1 + ns_c_2 = 2 + ns_c_chaos = 3 + ns_c_hs = 4 + ns_c_none = 254 + ns_c_any = 255 + ns_c_max = 65536 +) + +const ( /* nameser.h:221:1: */ + ns_kt_rsa = 1 + ns_kt_dh = 2 + ns_kt_dsa = 3 + ns_kt_private = 254 +) + +const ( /* nameser.h:228:1: */ + cert_t_pkix = 1 + cert_t_spki = 2 + cert_t_pgp = 3 + cert_t_url = 253 + cert_t_oid = 254 +) + +const ( /* nameser.h:28:1: */ + ns_s_qd = 0 + ns_s_zn = 0 + ns_s_an = 1 + ns_s_pr = 1 + ns_s_ns = 2 + ns_s_ud = 2 + ns_s_ar = 3 + ns_s_max = 4 +) + +const ( /* nameser.h:75:1: */ + ns_f_qr = 0 + ns_f_opcode = 1 + ns_f_aa = 2 + ns_f_tc = 3 + ns_f_rd = 4 + ns_f_ra = 5 + ns_f_z = 6 + ns_f_ad = 7 + ns_f_cd = 8 + ns_f_rcode = 9 + ns_f_max = 10 +) + +const ( /* nameser.h:89:1: */ + ns_o_query = 0 + ns_o_iquery = 1 + ns_o_status = 2 + ns_o_notify = 4 + ns_o_update = 5 + ns_o_max = 6 +) + +const ( /* nameser.h:98:1: */ + ns_r_noerror = 0 + ns_r_formerr = 1 + ns_r_servfail = 2 + ns_r_nxdomain = 3 + ns_r_notimpl = 4 + ns_r_refused = 5 + ns_r_yxdomain = 6 + ns_r_yxrrset = 7 + ns_r_nxrrset = 8 + ns_r_notauth = 9 + ns_r_notzone = 10 + ns_r_max = 11 + ns_r_badvers = 16 + ns_r_badsig = 16 + ns_r_badkey = 17 + ns_r_badtime = 18 +) + +type ptrdiff_t = int32 /* <builtin>:3:26 */ + +type size_t = uint32 /* <builtin>:9:23 */ + +type wchar_t = uint32 /* <builtin>:15:24 */ + +/// typedef __ct_rune_t __wint_t; +/// +/// +/// +/// typedef __uint_least16_t __char16_t; +/// typedef __uint_least32_t __char32_t; +/// +/// +/// +/// +/// +/// +/// +/// typedef struct { +/// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); +/// +/// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); +/// +/// } __max_align_t; +/// +/// typedef __uint64_t __dev_t; +/// +/// typedef __uint32_t __fixpt_t; +/// +/// +/// +/// +/// +/// typedef union { +/// char __mbstate8[128]; +/// __int64_t _mbstateL; +/// } __mbstate_t; +/// +/// typedef __uintmax_t __rman_res_t; +/// +/// +/// +/// +/// +/// +/// typedef __builtin_va_list __va_list; +/// +/// +/// +/// +/// +/// +/// typedef __va_list __gnuc_va_list; +/// +/// +/// +/// +/// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); +/// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); +/// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); +/// +/// +/// extern int __mb_sb_limit; + +type _RuneEntry = struct { + F__min int32 + F__max int32 + F__map int32 + F__types uintptr +} /* table.cpp.c:290:3 */ + +type _RuneRange = struct { + F__nranges int32 + F__ranges uintptr +} /* table.cpp.c:295:3 */ + +type _RuneLocale = struct { + F__magic [8]uint8 + F__encoding [32]uint8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__runetype [256]uint32 + F__maplower [256]int32 + F__mapupper [256]int32 + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 +} /* table.cpp.c:320:3 */ +/// +/// extern const _RuneLocale _DefaultRuneLocale; +/// extern const _RuneLocale *_CurrentRuneLocale; +/// +/// +/// +/// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; +/// static __inline const _RuneLocale *__getCurrentRuneLocale(void) +/// { +/// +/// if (_ThreadRuneLocale) +/// return _ThreadRuneLocale; +/// return _CurrentRuneLocale; +/// } +/// +/// +/// +/// +/// +/// static __inline int +/// __maskrune(__ct_rune_t _c, unsigned long _f) +/// { +/// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : +/// (__getCurrentRuneLocale())->__runetype[_c]) & _f; +/// } +/// +/// static __inline int +/// __sbmaskrune(__ct_rune_t _c, unsigned long _f) +/// { +/// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : +/// (__getCurrentRuneLocale())->__runetype[_c] & _f; +/// } +/// +/// static __inline int +/// __istype(__ct_rune_t _c, unsigned long _f) +/// { +/// return (!!__maskrune(_c, _f)); +/// } +/// +/// static __inline int +/// __sbistype(__ct_rune_t _c, unsigned long _f) +/// { +/// return (!!__sbmaskrune(_c, _f)); +/// } +/// +/// static __inline int +/// __isctype(__ct_rune_t _c, unsigned long _f) +/// { +/// return (_c < 0 || _c >= 128) ? 0 : +/// !!(_DefaultRuneLocale.__runetype[_c] & _f); +/// } +/// +/// static __inline __ct_rune_t +/// __toupper(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : +/// (__getCurrentRuneLocale())->__mapupper[_c]; +/// } +/// +/// static __inline __ct_rune_t +/// __sbtoupper(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : +/// (__getCurrentRuneLocale())->__mapupper[_c]; +/// } +/// +/// static __inline __ct_rune_t +/// __tolower(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : +/// (__getCurrentRuneLocale())->__maplower[_c]; +/// } +/// +/// static __inline __ct_rune_t +/// __sbtolower(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : +/// (__getCurrentRuneLocale())->__maplower[_c]; +/// } +/// +/// static __inline int +/// __wcwidth(__ct_rune_t _c) +/// { +/// unsigned int _x; +/// +/// if (_c == 0) +/// return (0); +/// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); +/// if ((_x & 0xe0000000L) != 0) +/// return ((_x & 0xe0000000L) >> 30); +/// return ((_x & 0x00040000L) != 0 ? 1 : -1); +/// } +/// +/// +/// +/// 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); +/// +/// +/// int isascii(int); +/// int toascii(int); +/// +/// +/// +/// int isblank(int); +/// +/// +/// +/// int digittoint(int); +/// int ishexnumber(int); +/// int isideogram(int); +/// int isnumber(int); +/// int isphonogram(int); +/// int isrune(int); +/// int isspecial(int); +/// +/// +/// +/// +/// +/// typedef struct _xlocale *locale_t; +/// +/// +/// +/// +/// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); +/// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); +/// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); +/// _RuneLocale *__runes_for_locale(locale_t, int*); +/// +/// inline int +/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +/// inline int +/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +/// +/// inline int +/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +/// { +/// int __limit; +/// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); +/// return (__c < 0 || __c >= __limit) ? 0 : +/// runes->__runetype[__c] & __f; +/// } +/// +/// inline int +/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +/// { +/// return (!!__sbmaskrune_l(__c, __f, __loc)); +/// } +/// +/// +/// +/// +/// +/// +/// +/// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } +/// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } +/// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } +/// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } +/// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } +/// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } +/// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } +/// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } +/// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } +/// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } +/// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } +/// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } +/// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } +/// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } +/// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } +/// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } +/// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } +/// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } +/// +/// inline int digittoint_l(int, locale_t); +/// inline int tolower_l(int, locale_t); +/// inline int toupper_l(int, locale_t); +/// +/// inline int digittoint_l(int __c, locale_t __l) +/// { return __sbmaskrune_l((__c), 0xFF, __l); } +/// +/// inline int tolower_l(int __c, locale_t __l) +/// { +/// int __limit; +/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); +/// return (__c < 0 || __c >= __limit) ? __c : +/// __runes->__maplower[__c]; +/// } +/// inline int toupper_l(int __c, locale_t __l) +/// { +/// int __limit; +/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); +/// return (__c < 0 || __c >= __limit) ? __c : +/// __runes->__mapupper[__c]; +/// } +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// typedef __mbstate_t mbstate_t; +/// +/// +/// +/// +/// typedef __size_t size_t; +/// +/// +/// +/// +/// +/// typedef __va_list va_list; +/// +/// +/// +/// +/// +/// +/// typedef ___wchar_t wchar_t; +/// +/// +/// +/// +/// +/// typedef __wint_t wint_t; +/// +/// typedef struct __sFILE FILE; +/// +/// struct tm; +/// +/// +/// wint_t btowc(int); +/// wint_t fgetwc(FILE *); +/// wchar_t * +/// fgetws(wchar_t * restrict, int, FILE * restrict); +/// wint_t fputwc(wchar_t, FILE *); +/// int fputws(const wchar_t * restrict, FILE * restrict); +/// int fwide(FILE *, int); +/// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); +/// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); +/// wint_t getwc(FILE *); +/// wint_t getwchar(void); +/// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); +/// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, +/// mbstate_t * restrict); +/// int mbsinit(const mbstate_t *); +/// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, +/// mbstate_t * restrict); +/// wint_t putwc(wchar_t, FILE *); +/// wint_t putwchar(wchar_t); +/// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, +/// ...); +/// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); +/// wint_t ungetwc(wint_t, FILE *); +/// int vfwprintf(FILE * restrict, const wchar_t * restrict, +/// __va_list); +/// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, +/// __va_list); +/// int vwprintf(const wchar_t * restrict, __va_list); +/// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); +/// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); +/// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); +/// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// int wcscoll(const wchar_t *, const wchar_t *); +/// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); +/// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, +/// const struct tm * restrict); +/// size_t wcslen(const wchar_t *) __attribute__((__pure__)); +/// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, +/// size_t); +/// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); +/// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); +/// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); +/// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, +/// mbstate_t * restrict); +/// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) +/// __attribute__((__pure__)); +/// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); +/// int wctob(wint_t); +/// double wcstod(const wchar_t * restrict, wchar_t ** restrict); +/// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, +/// wchar_t ** restrict); +/// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); +/// unsigned long +/// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); +/// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); +/// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); +/// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); +/// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); +/// wchar_t *wmemset(wchar_t *, wchar_t, size_t); +/// int wprintf(const wchar_t * restrict, ...); +/// int wscanf(const wchar_t * restrict, ...); +/// +/// +/// extern FILE *__stdinp; +/// extern FILE *__stdoutp; +/// extern FILE *__stderrp; +/// +/// int vfwscanf(FILE * restrict, const wchar_t * restrict, +/// __va_list); +/// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, +/// __va_list); +/// int vwscanf(const wchar_t * restrict, __va_list); +/// float wcstof(const wchar_t * restrict, wchar_t ** restrict); +/// long double +/// wcstold(const wchar_t * restrict, wchar_t ** restrict); +/// +/// +/// long long +/// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); +/// +/// unsigned long long +/// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); +/// +/// +/// +/// +/// int wcswidth(const wchar_t *, size_t); +/// int wcwidth(wchar_t); +/// +/// +/// +/// +/// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, +/// size_t, mbstate_t * restrict); +/// FILE *open_wmemstream(wchar_t **, size_t *); +/// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); +/// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); +/// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); +/// int wcscasecmp(const wchar_t *, const wchar_t *); +/// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); +/// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); +/// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, +/// size_t, mbstate_t * restrict); +/// +/// +/// +/// wchar_t *fgetwln(FILE * restrict, size_t * restrict); +/// size_t wcslcat(wchar_t *, const wchar_t *, size_t); +/// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); +/// +/// +/// +/// +/// +/// int wcscasecmp_l(const wchar_t *, const wchar_t *, +/// locale_t); +/// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, +/// locale_t); +/// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); +/// size_t wcsxfrm_l(wchar_t * restrict, +/// const wchar_t * restrict, size_t, locale_t); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// struct lconv { +/// char *decimal_point; +/// char *thousands_sep; +/// char *grouping; +/// char *int_curr_symbol; +/// char *currency_symbol; +/// char *mon_decimal_point; +/// char *mon_thousands_sep; +/// char *mon_grouping; +/// char *positive_sign; +/// char *negative_sign; +/// char int_frac_digits; +/// char frac_digits; +/// char p_cs_precedes; +/// char p_sep_by_space; +/// char n_cs_precedes; +/// char n_sep_by_space; +/// char p_sign_posn; +/// char n_sign_posn; +/// char int_p_cs_precedes; +/// char int_n_cs_precedes; +/// char int_p_sep_by_space; +/// char int_n_sep_by_space; +/// char int_p_sign_posn; +/// char int_n_sign_posn; +/// }; +/// +/// +/// struct lconv *localeconv(void); +/// char *setlocale(int, const char *); +/// +/// +/// +/// +/// locale_t duplocale(locale_t base); +/// void freelocale(locale_t loc); +/// locale_t newlocale(int mask, const char *locale, locale_t base); +/// const char *querylocale(int mask, locale_t loc); +/// locale_t uselocale(locale_t loc); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// wint_t btowc_l(int, locale_t); +/// wint_t fgetwc_l(FILE *, locale_t); +/// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, +/// locale_t); +/// wint_t fputwc_l(wchar_t, FILE *, locale_t); +/// int fputws_l(const wchar_t * restrict, FILE * restrict, +/// locale_t); +/// int fwprintf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, ...); +/// int fwscanf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, ...); +/// wint_t getwc_l(FILE *, locale_t); +/// wint_t getwchar_l(locale_t); +/// size_t mbrlen_l(const char * restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// size_t mbrtowc_l(wchar_t * restrict, +/// const char * restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// int mbsinit_l(const mbstate_t *, locale_t); +/// size_t mbsrtowcs_l(wchar_t * restrict, +/// const char ** restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// wint_t putwc_l(wchar_t, FILE *, locale_t); +/// wint_t putwchar_l(wchar_t, locale_t); +/// int swprintf_l(wchar_t * restrict, size_t n, locale_t, +/// const wchar_t * restrict, ...); +/// int swscanf_l(const wchar_t * restrict, locale_t, +/// const wchar_t * restrict, ...); +/// wint_t ungetwc_l(wint_t, FILE *, locale_t); +/// int vfwprintf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, __va_list); +/// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, +/// const wchar_t * restrict, __va_list); +/// int vwprintf_l(locale_t, const wchar_t * restrict, +/// __va_list); +/// size_t wcrtomb_l(char * restrict, wchar_t, +/// mbstate_t * restrict, locale_t); +/// size_t wcsftime_l(wchar_t * restrict, size_t, +/// const wchar_t * restrict, +/// const struct tm * restrict, locale_t); +/// size_t wcsrtombs_l(char * restrict, +/// const wchar_t ** restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// double wcstod_l(const wchar_t * restrict, +/// wchar_t ** restrict, locale_t); +/// long wcstol_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// unsigned long wcstoul_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// int wcswidth_l(const wchar_t *, size_t, locale_t); +/// int wctob_l(wint_t, locale_t); +/// int wcwidth_l(wchar_t, locale_t); +/// int wprintf_l(locale_t, const wchar_t * restrict, ...); +/// int wscanf_l(locale_t, const wchar_t * restrict, ...); +/// int vfwscanf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, __va_list); +/// int vswscanf_l(const wchar_t * restrict, locale_t, +/// const wchar_t *restrict, __va_list); +/// int vwscanf_l(locale_t, const wchar_t * restrict, +/// __va_list); +/// float wcstof_l(const wchar_t * restrict, +/// wchar_t ** restrict, locale_t); +/// long double wcstold_l(const wchar_t * restrict, +/// wchar_t ** restrict, locale_t); +/// long long wcstoll_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// unsigned long long wcstoull_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// size_t mbsnrtowcs_l(wchar_t * restrict, +/// const char ** restrict, size_t, size_t, +/// mbstate_t * restrict, locale_t); +/// size_t wcsnrtombs_l(char * restrict, +/// const wchar_t ** restrict, size_t, size_t, +/// mbstate_t * restrict, locale_t); +/// +/// +/// +/// +/// +/// struct lconv *localeconv_l(locale_t); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// typedef __rune_t rune_t; +/// +/// typedef struct { +/// int quot; +/// int rem; +/// } div_t; +/// +/// typedef struct { +/// long quot; +/// long rem; +/// } ldiv_t; +/// +/// +/// +/// +/// +/// double atof_l(const char *, locale_t); +/// int atoi_l(const char *, locale_t); +/// long atol_l(const char *, locale_t); +/// long long atoll_l(const char *, locale_t); +/// int mblen_l(const char *, size_t, locale_t); +/// size_t mbstowcs_l(wchar_t * restrict, +/// const char * restrict, size_t, locale_t); +/// int mbtowc_l(wchar_t * restrict, +/// const char * restrict, size_t, locale_t); +/// double strtod_l(const char *, char **, locale_t); +/// float strtof_l(const char *, char **, locale_t); +/// long strtol_l(const char *, char **, int, locale_t); +/// long double strtold_l(const char *, char **, locale_t); +/// long long strtoll_l(const char *, char **, int, locale_t); +/// unsigned long strtoul_l(const char *, char **, int, locale_t); +/// unsigned long long strtoull_l(const char *, char **, int, locale_t); +/// size_t wcstombs_l(char * restrict, +/// const wchar_t * restrict, size_t, locale_t); +/// int wctomb_l(char *, wchar_t, locale_t); +/// +/// int ___mb_cur_max_l(locale_t); +/// +/// +/// extern int __mb_cur_max; +/// extern int ___mb_cur_max(void); +/// +/// +/// _Noreturn void abort(void); +/// int abs(int) __attribute__((__const__)); +/// int atexit(void (* )(void)); +/// double atof(const char *); +/// int atoi(const char *); +/// long atol(const char *); +/// void *bsearch(const void *, const void *, size_t, +/// size_t, int (*)(const void * , const void *)); +/// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) +/// __attribute__((__alloc_size__(1, 2))); +/// div_t div(int, int) __attribute__((__const__)); +/// _Noreturn void exit(int); +/// void free(void *); +/// char *getenv(const char *); +/// long labs(long) __attribute__((__const__)); +/// ldiv_t ldiv(long, long) __attribute__((__const__)); +/// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); +/// int mblen(const char *, size_t); +/// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); +/// int mbtowc(wchar_t * restrict, const char * restrict, size_t); +/// void qsort(void *, size_t, size_t, +/// int (* )(const void *, const void *)); +/// int rand(void); +/// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); +/// void srand(unsigned); +/// double strtod(const char * restrict, char ** restrict); +/// float strtof(const char * restrict, char ** restrict); +/// long strtol(const char * restrict, char ** restrict, int); +/// long double +/// strtold(const char * restrict, char ** restrict); +/// unsigned long +/// strtoul(const char * restrict, char ** restrict, int); +/// int system(const char *); +/// int wctomb(char *, wchar_t); +/// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); +/// +/// typedef struct { +/// long long quot; +/// long long rem; +/// } lldiv_t; +/// +/// +/// long long +/// atoll(const char *); +/// +/// long long +/// llabs(long long) __attribute__((__const__)); +/// +/// lldiv_t lldiv(long long, long long) __attribute__((__const__)); +/// +/// long long +/// strtoll(const char * restrict, char ** restrict, int); +/// +/// unsigned long long +/// strtoull(const char * restrict, char ** restrict, int); +/// +/// +/// _Noreturn void _Exit(int); +/// +/// +/// +/// +/// +/// +/// void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) +/// __attribute__((__alloc_size__(2))); +/// int at_quick_exit(void (*)(void)); +/// _Noreturn void +/// quick_exit(int); +/// +/// +/// +/// +/// +/// char *realpath(const char * restrict, char * restrict); +/// +/// +/// int rand_r(unsigned *); +/// +/// +/// int posix_memalign(void **, size_t, size_t); +/// int setenv(const char *, const char *, int); +/// int unsetenv(const char *); +/// +/// +/// +/// int getsubopt(char **, char *const *, char **); +/// +/// char *mkdtemp(char *); +/// +/// +/// +/// int mkstemp(char *); +/// +/// long a64l(const char *); +/// double drand48(void); +/// +/// double erand48(unsigned short[3]); +/// +/// +/// char *initstate(unsigned int, char *, size_t); +/// long jrand48(unsigned short[3]); +/// char *l64a(long); +/// void lcong48(unsigned short[7]); +/// long lrand48(void); +/// +/// char *mktemp(char *); +/// +/// +/// long mrand48(void); +/// long nrand48(unsigned short[3]); +/// int putenv(char *); +/// long random(void); +/// unsigned short +/// *seed48(unsigned short[3]); +/// char *setstate( char *); +/// void srand48(long); +/// void srandom(unsigned int); +/// +/// +/// +/// int grantpt(int); +/// int posix_openpt(int); +/// char *ptsname(int); +/// int unlockpt(int); +/// +/// +/// +/// int ptsname_r(int, char *, size_t); +/// +/// +/// +/// extern const char *malloc_conf; +/// extern void (*malloc_message)(void *, const char *); +/// +/// void abort2(const char *, int, void **) __attribute__((__noreturn__)); +/// __uint32_t +/// arc4random(void); +/// void arc4random_buf(void *, size_t); +/// __uint32_t +/// arc4random_uniform(__uint32_t); +/// +/// +/// +/// +/// +/// +/// char *getbsize(int *, long *); +/// +/// char *cgetcap(char *, const char *, int); +/// int cgetclose(void); +/// int cgetent(char **, char **, const char *); +/// int cgetfirst(char **, char **); +/// int cgetmatch(const char *, const char *); +/// int cgetnext(char **, char **); +/// int cgetnum(char *, const char *, long *); +/// int cgetset(const char *); +/// int cgetstr(char *, const char *, char **); +/// int cgetustr(char *, const char *, char **); +/// +/// int daemon(int, int); +/// int daemonfd(int, int); +/// char *devname(__dev_t, __mode_t); +/// char *devname_r(__dev_t, __mode_t, char *, int); +/// char *fdevname(int); +/// char *fdevname_r(int, char *, int); +/// int getloadavg(double [], int); +/// const char * +/// getprogname(void); +/// +/// int heapsort(void *, size_t, size_t, +/// int (* )(const void *, const void *)); +/// +/// +/// +/// +/// +/// +/// int l64a_r(long, char *, int); +/// int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); +/// +/// +/// +/// int mkostemp(char *, int); +/// int mkostemps(char *, int, int); +/// int mkostempsat(int, char *, int, int); +/// void qsort_r(void *, size_t, size_t, void *, +/// int (*)(void *, const void *, const void *)); +/// int radixsort(const unsigned char **, int, const unsigned char *, +/// unsigned); +/// void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) +/// __attribute__((__alloc_size__(2, 3))); +/// void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); +/// int rpmatch(const char *); +/// void setprogname(const char *); +/// int sradixsort(const unsigned char **, int, const unsigned char *, +/// unsigned); +/// void srandomdev(void); +/// long long +/// strtonum(const char *, long long, long long, const char **); +/// +/// +/// __int64_t +/// strtoq(const char *, char **, int); +/// __uint64_t +/// strtouq(const char *, char **, int); +/// +/// extern char *suboptarg; +/// +/// +/// +/// +/// +/// +/// typedef size_t rsize_t; +/// +/// +/// +/// +/// typedef int errno_t; +/// +/// +/// +/// typedef void (*constraint_handler_t)(const char * restrict, +/// void * restrict, errno_t); +/// +/// constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); +/// +/// _Noreturn void abort_handler_s(const char * restrict, void * restrict, +/// errno_t); +/// +/// void ignore_handler_s(const char * restrict, void * restrict, errno_t); +/// +/// errno_t qsort_s(void *, rsize_t, rsize_t, +/// int (*)(const void *, const void *, void *), void *); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// typedef __int8_t int8_t; +/// +/// +/// +/// +/// typedef __int16_t int16_t; +/// +/// +/// +/// +/// typedef __int32_t int32_t; +/// +/// +/// +/// +/// typedef __int64_t int64_t; +/// +/// +/// +/// +/// typedef __uint8_t uint8_t; +/// +/// +/// +/// +/// typedef __uint16_t uint16_t; +/// +/// +/// +/// +/// typedef __uint32_t uint32_t; +/// +/// +/// +/// +/// typedef __uint64_t uint64_t; +/// +/// +/// +/// +/// typedef __intptr_t intptr_t; +/// +/// +/// +/// typedef __uintptr_t uintptr_t; +/// +/// +/// +/// typedef __intmax_t intmax_t; +/// +/// +/// +/// typedef __uintmax_t uintmax_t; +/// +/// +/// typedef __int_least8_t int_least8_t; +/// typedef __int_least16_t int_least16_t; +/// typedef __int_least32_t int_least32_t; +/// typedef __int_least64_t int_least64_t; +/// +/// typedef __uint_least8_t uint_least8_t; +/// typedef __uint_least16_t uint_least16_t; +/// typedef __uint_least32_t uint_least32_t; +/// typedef __uint_least64_t uint_least64_t; +/// +/// typedef __int_fast8_t int_fast8_t; +/// typedef __int_fast16_t int_fast16_t; +/// typedef __int_fast32_t int_fast32_t; +/// typedef __int_fast64_t int_fast64_t; +/// +/// typedef __uint_fast8_t uint_fast8_t; +/// typedef __uint_fast16_t uint_fast16_t; +/// typedef __uint_fast32_t uint_fast32_t; +/// typedef __uint_fast64_t uint_fast64_t; +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// struct pthread; +/// struct pthread_attr; +/// struct pthread_cond; +/// struct pthread_cond_attr; +/// struct pthread_mutex; +/// struct pthread_mutex_attr; +/// struct pthread_once; +/// struct pthread_rwlock; +/// struct pthread_rwlockattr; +/// struct pthread_barrier; +/// struct pthread_barrier_attr; +/// struct pthread_spinlock; +/// +/// typedef struct pthread *pthread_t; +/// +/// +/// typedef struct pthread_attr *pthread_attr_t; +/// typedef struct pthread_mutex *pthread_mutex_t; +/// typedef struct pthread_mutex_attr *pthread_mutexattr_t; +/// typedef struct pthread_cond *pthread_cond_t; +/// typedef struct pthread_cond_attr *pthread_condattr_t; +/// typedef int pthread_key_t; +/// typedef struct pthread_once pthread_once_t; +/// typedef struct pthread_rwlock *pthread_rwlock_t; +/// typedef struct pthread_rwlockattr *pthread_rwlockattr_t; +/// typedef struct pthread_barrier *pthread_barrier_t; +/// typedef struct pthread_barrierattr *pthread_barrierattr_t; +/// typedef struct pthread_spinlock *pthread_spinlock_t; +/// +/// +/// +/// +/// +/// +/// +/// typedef void *pthread_addr_t; +/// typedef void *(*pthread_startroutine_t)(void *); +/// +/// +/// +/// +/// struct pthread_once { +/// int state; +/// pthread_mutex_t mutex; +/// }; +/// +/// +/// +/// typedef unsigned char u_char; +/// typedef unsigned short u_short; +/// typedef unsigned int u_int; +/// typedef unsigned long u_long; +/// +/// typedef unsigned short ushort; +/// typedef unsigned int uint; +/// +/// typedef __uint8_t u_int8_t; +/// typedef __uint16_t u_int16_t; +/// typedef __uint32_t u_int32_t; +/// typedef __uint64_t u_int64_t; +/// +/// typedef __uint64_t u_quad_t; +/// typedef __int64_t quad_t; +/// typedef quad_t * qaddr_t; +/// +/// typedef char * caddr_t; +/// typedef const char * c_caddr_t; +/// +/// +/// typedef __blksize_t blksize_t; +/// +/// +/// +/// typedef __cpuwhich_t cpuwhich_t; +/// typedef __cpulevel_t cpulevel_t; +/// typedef __cpusetid_t cpusetid_t; +/// +/// +/// typedef __blkcnt_t blkcnt_t; +/// +/// +/// +/// +/// typedef __clock_t clock_t; +/// +/// +/// +/// +/// typedef __clockid_t clockid_t; +/// +/// +/// +/// typedef __critical_t critical_t; +/// typedef __daddr_t daddr_t; +/// +/// +/// typedef __dev_t dev_t; +/// +/// +/// +/// +/// typedef __fflags_t fflags_t; +/// +/// +/// +/// typedef __fixpt_t fixpt_t; +/// +/// +/// typedef __fsblkcnt_t fsblkcnt_t; +/// typedef __fsfilcnt_t fsfilcnt_t; +/// +/// +/// +/// +/// typedef __gid_t gid_t; +/// +/// +/// +/// +/// typedef __uint32_t in_addr_t; +/// +/// +/// +/// +/// typedef __uint16_t in_port_t; +/// +/// +/// +/// +/// typedef __id_t id_t; +/// +/// +/// +/// +/// typedef __ino_t ino_t; +/// +/// +/// +/// +/// typedef __key_t key_t; +/// +/// +/// +/// +/// typedef __lwpid_t lwpid_t; +/// +/// +/// +/// +/// typedef __mode_t mode_t; +/// +/// +/// +/// +/// typedef __accmode_t accmode_t; +/// +/// +/// +/// +/// typedef __nlink_t nlink_t; +/// +/// +/// +/// +/// typedef __off_t off_t; +/// +/// +/// +/// +/// typedef __off64_t off64_t; +/// +/// +/// +/// +/// typedef __pid_t pid_t; +/// +/// +/// +/// typedef __register_t register_t; +/// +/// +/// typedef __rlim_t rlim_t; +/// +/// +/// +/// typedef __int64_t sbintime_t; +/// +/// typedef __segsz_t segsz_t; +/// +/// +/// +/// +/// +/// +/// +/// typedef __ssize_t ssize_t; +/// +/// +/// +/// +/// typedef __suseconds_t suseconds_t; +/// +/// +/// +/// +/// typedef __time_t time_t; +/// +/// +/// +/// +/// typedef __timer_t timer_t; +/// +/// +/// +/// +/// typedef __mqd_t mqd_t; +/// +/// +/// +/// typedef __u_register_t u_register_t; +/// +/// +/// typedef __uid_t uid_t; +/// +/// +/// +/// +/// typedef __useconds_t useconds_t; +/// +/// +/// +/// +/// +/// typedef unsigned long cap_ioctl_t; +/// +/// +/// +/// +/// struct cap_rights; +/// +/// typedef struct cap_rights cap_rights_t; +/// +/// typedef __uint64_t kpaddr_t; +/// typedef __uint64_t kvaddr_t; +/// typedef __uint64_t ksize_t; +/// typedef __int64_t kssize_t; +/// +/// typedef __vm_offset_t vm_offset_t; +/// typedef __uint64_t vm_ooffset_t; +/// typedef __vm_paddr_t vm_paddr_t; +/// typedef __uint64_t vm_pindex_t; +/// typedef __vm_size_t vm_size_t; +/// +/// typedef __rman_res_t rman_res_t; +/// +/// static __inline __uint16_t +/// __bitcount16(__uint16_t _x) +/// { +/// +/// _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); +/// _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); +/// _x = (_x + (_x >> 4)) & 0x0f0f; +/// _x = (_x + (_x >> 8)) & 0x00ff; +/// return (_x); +/// } +/// +/// static __inline __uint32_t +/// __bitcount32(__uint32_t _x) +/// { +/// +/// _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); +/// _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); +/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f; +/// _x = (_x + (_x >> 8)); +/// _x = (_x + (_x >> 16)) & 0x000000ff; +/// return (_x); +/// } +/// +/// +/// static __inline __uint64_t +/// __bitcount64(__uint64_t _x) +/// { +/// +/// _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); +/// _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); +/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; +/// _x = (_x + (_x >> 8)); +/// _x = (_x + (_x >> 16)); +/// _x = (_x + (_x >> 32)) & 0x000000ff; +/// return (_x); +/// } +/// +/// +/// +/// +/// +/// typedef struct __sigset { +/// __uint32_t __bits[4]; +/// } __sigset_t; +/// +/// +/// +/// struct timeval { +/// time_t tv_sec; +/// suseconds_t tv_usec; +/// }; +/// +/// +/// +/// +/// +/// struct timespec { +/// time_t tv_sec; +/// long tv_nsec; +/// }; +/// +/// +/// struct itimerspec { +/// struct timespec it_interval; +/// struct timespec it_value; +/// }; +/// +/// +/// typedef unsigned long __fd_mask; +/// +/// typedef __fd_mask fd_mask; +/// +/// +/// +/// +/// typedef __sigset_t sigset_t; +/// +/// typedef struct fd_set { +/// __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; +/// } fd_set; +/// +/// +/// int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, +/// const struct timespec *restrict, const sigset_t *restrict); +/// +/// +/// +/// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +/// +/// +/// +/// +/// static __inline int +/// __major(dev_t _d) +/// { +/// return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); +/// } +/// +/// static __inline int +/// __minor(dev_t _d) +/// { +/// return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); +/// } +/// +/// static __inline dev_t +/// __makedev(int _Major, int _Minor) +/// { +/// return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | +/// ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); +/// } +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// int ftruncate(int, off_t); +/// +/// +/// +/// off_t lseek(int, off_t, int); +/// +/// +/// +/// void * mmap(void *, size_t, int, int, int, off_t); +/// +/// +/// +/// int truncate(const char *, off_t); +/// +/// +/// +/// +/// +/// +/// +/// +/// static __inline int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// static __inline int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_short(volatile u_short *dst, u_short *expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// static __inline int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// +/// +/// +/// +/// +/// static __inline u_int +/// atomic_fetchadd_int(volatile u_int *p, u_int v) +/// { +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " xaddl %0,%1 ; " +/// "# atomic_fetchadd_int" +/// : "+r" (v), +/// "+m" (*p) +/// : : "cc"); +/// return (v); +/// } +/// +/// +/// +/// +/// +/// static __inline u_long +/// atomic_fetchadd_long(volatile u_long *p, u_long v) +/// { +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " xaddq %0,%1 ; " +/// "# atomic_fetchadd_long" +/// : "+r" (v), +/// "+m" (*p) +/// : : "cc"); +/// return (v); +/// } +/// +/// static __inline int +/// atomic_testandset_int(volatile u_int *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btsl %2,%1 ; " +/// "# atomic_testandset_int" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Ir" (v & 0x1f) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline int +/// atomic_testandset_long(volatile u_long *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btsq %2,%1 ; " +/// "# atomic_testandset_long" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Jr" ((u_long)(v & 0x3f)) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline int +/// atomic_testandclear_int(volatile u_int *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btrl %2,%1 ; " +/// "# atomic_testandclear_int" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Ir" (v & 0x1f) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline int +/// atomic_testandclear_long(volatile u_long *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btrq %2,%1 ; " +/// "# atomic_testandclear_long" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Jr" ((u_long)(v & 0x3f)) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline void +/// __storeload_barrier(void) +/// { +/// +/// __asm volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_acq(void) +/// { +/// +/// __asm volatile(" " : : : "memory"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_rel(void) +/// { +/// +/// __asm volatile(" " : : : "memory"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_acq_rel(void) +/// { +/// +/// __asm volatile(" " : : : "memory"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_seq_cst(void) +/// { +/// +/// __storeload_barrier(); +/// } +/// +/// +/// +/// static __inline void atomic_set_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_set_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "cc"); } static __inline void atomic_clear_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_add_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_subtract_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; +/// +/// static __inline void atomic_set_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// +/// static __inline void atomic_set_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// +/// static __inline void atomic_set_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_set_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "cc"); } static __inline void atomic_clear_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_add_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_subtract_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; +/// +/// +/// +/// +/// +/// static __inline u_char atomic_load_acq_char(volatile u_char *p) { u_char res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_char(volatile u_char *p, u_char v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// static __inline u_short atomic_load_acq_short(volatile u_short *p) { u_short res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_short(volatile u_short *p, u_short v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// static __inline u_int atomic_load_acq_int(volatile u_int *p) { u_int res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_int(volatile u_int *p, u_int v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// static __inline u_long atomic_load_acq_long(volatile u_long *p) { u_long res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_long(volatile u_long *p, u_long v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// +/// static __inline u_int +/// atomic_swap_int(volatile u_int *p, u_int v) +/// { +/// +/// __asm volatile( +/// " xchgl %1,%0 ; " +/// "# atomic_swap_int" +/// : "+r" (v), +/// "+m" (*p)); +/// return (v); +/// } +/// +/// static __inline u_long +/// atomic_swap_long(volatile u_long *p, u_long v) +/// { +/// +/// __asm volatile( +/// " xchgq %1,%0 ; " +/// "# atomic_swap_long" +/// : "+r" (v), +/// "+m" (*p)); +/// return (v); +/// } +/// +/// +/// +/// +/// +/// extern char *_PathLocale; +/// +/// int __detect_path_locale(void); +/// int __wrap_setrunelocale(const char *); +/// +/// +/// enum { +/// XLC_COLLATE = 0, +/// XLC_CTYPE, +/// XLC_MONETARY, +/// XLC_NUMERIC, +/// XLC_TIME, +/// XLC_MESSAGES, +/// XLC_LAST +/// }; +/// +/// _Static_assert(XLC_LAST - XLC_COLLATE == 6, "XLC values should be contiguous"); +/// _Static_assert(XLC_COLLATE == +/// +/// 1 +/// +/// - 1, +/// "XLC_COLLATE doesn't match the LC_COLLATE value."); +/// _Static_assert(XLC_CTYPE == +/// +/// 2 +/// +/// - 1, +/// "XLC_CTYPE doesn't match the LC_CTYPE value."); +/// _Static_assert(XLC_MONETARY == +/// +/// 3 +/// +/// - 1, +/// "XLC_MONETARY doesn't match the LC_MONETARY value."); +/// _Static_assert(XLC_NUMERIC == +/// +/// 4 +/// +/// - 1, +/// "XLC_NUMERIC doesn't match the LC_NUMERIC value."); +/// _Static_assert(XLC_TIME == +/// +/// 5 +/// +/// - 1, +/// "XLC_TIME doesn't match the LC_TIME value."); +/// _Static_assert(XLC_MESSAGES == +/// +/// 6 +/// +/// - 1, +/// "XLC_MESSAGES doesn't match the LC_MESSAGES value."); +/// +/// struct xlocale_refcounted { +/// +/// long retain_count; +/// +/// void(*destructor)(void*); +/// }; +/// +/// +/// +/// +/// +/// +/// +/// struct xlocale_component { +/// struct xlocale_refcounted header; +/// +/// char locale[31 +1]; +/// +/// char version[12]; +/// }; +/// +/// +/// +/// +/// struct _xlocale { +/// struct xlocale_refcounted header; +/// +/// struct xlocale_component *components[XLC_LAST]; +/// +/// +/// int monetary_locale_changed; +/// +/// +/// int using_monetary_locale; +/// +/// +/// int numeric_locale_changed; +/// +/// +/// int using_numeric_locale; +/// +/// +/// int using_time_locale; +/// +/// +/// int using_messages_locale; +/// +/// struct lconv lconv; +/// +/// char *csym; +/// }; +/// +/// +/// +/// +/// __attribute__((unused)) static void* +/// xlocale_retain(void *val) +/// { +/// struct xlocale_refcounted *obj = val; +/// atomic_add_long(&(obj->retain_count), 1); +/// return (val); +/// } +/// +/// +/// +/// +/// __attribute__((unused)) static void +/// xlocale_release(void *val) +/// { +/// struct xlocale_refcounted *obj = val; +/// long count; +/// +/// count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; +/// if (count < 0 && obj->destructor != +/// +/// ((void *)0) +/// +/// ) +/// obj->destructor(obj); +/// } +/// +/// +/// +/// +/// +/// extern void* __collate_load(const char*, locale_t); +/// extern void* __ctype_load(const char*, locale_t); +/// extern void* __messages_load(const char*, locale_t); +/// extern void* __monetary_load(const char*, locale_t); +/// extern void* __numeric_load(const char*, locale_t); +/// extern void* __time_load(const char*, locale_t); +/// +/// extern struct _xlocale __xlocale_global_locale; +/// extern struct _xlocale __xlocale_C_locale; +/// +/// +/// +/// +/// void __set_thread_rune_locale(locale_t loc); +/// +/// +/// +/// +/// extern int __has_thread_locale; +/// +/// +/// +/// +/// +/// extern _Thread_local locale_t __thread_locale; +/// +/// +/// +/// +/// +/// +/// +/// static inline locale_t __get_locale(void) +/// { +/// +/// if (!__has_thread_locale) { +/// return (&__xlocale_global_locale); +/// } +/// return (__thread_locale ? __thread_locale : &__xlocale_global_locale); +/// } +/// +/// +/// +/// +/// +/// static inline locale_t get_real_locale(locale_t locale) +/// { +/// switch ((intptr_t)locale) { +/// case 0: return (&__xlocale_C_locale); +/// case -1: return (&__xlocale_global_locale); +/// default: return (locale); +/// } +/// } +/// +/// +/// +/// +/// +/// +/// +/// +/// struct xlocale_ctype { +/// struct xlocale_component header; +/// _RuneLocale *runes; +/// size_t (*__mbrtowc)(wchar_t * +/// +/// restrict +/// +/// , const char * +/// +/// restrict +/// +/// , +/// size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// int (*__mbsinit)(const mbstate_t *); +/// size_t (*__mbsnrtowcs)(wchar_t * +/// +/// restrict +/// +/// , const char ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// size_t (*__wcrtomb)(char * +/// +/// restrict +/// +/// , wchar_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// size_t (*__wcsnrtombs)(char * +/// +/// restrict +/// +/// , const wchar_t ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// int __mb_cur_max; +/// int __mb_sb_limit; +/// +/// __mbstate_t mblen; +/// +/// __mbstate_t mbrlen; +/// +/// __mbstate_t mbrtoc16; +/// +/// __mbstate_t mbrtoc32; +/// +/// __mbstate_t mbrtowc; +/// +/// __mbstate_t mbsnrtowcs; +/// +/// __mbstate_t mbsrtowcs; +/// +/// __mbstate_t mbtowc; +/// +/// __mbstate_t c16rtomb; +/// +/// __mbstate_t c32rtomb; +/// +/// __mbstate_t wcrtomb; +/// +/// __mbstate_t wcsnrtombs; +/// +/// __mbstate_t wcsrtombs; +/// +/// __mbstate_t wctomb; +/// }; +/// +/// extern struct xlocale_ctype __xlocale_global_ctype; +/// +/// +/// +/// +/// int _none_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _GBK_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _ascii_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// +/// typedef size_t (*mbrtowc_pfn_t)(wchar_t * +/// +/// restrict +/// +/// , +/// const char * +/// +/// restrict +/// +/// , size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// typedef size_t (*wcrtomb_pfn_t)(char * +/// +/// restrict +/// +/// , wchar_t, +/// mbstate_t * +/// +/// restrict +/// +/// ); +/// size_t __mbsnrtowcs_std(wchar_t * +/// +/// restrict +/// +/// , const char ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// , mbrtowc_pfn_t); +/// size_t __wcsnrtombs_std(char * +/// +/// restrict +/// +/// , const wchar_t ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// , wcrtomb_pfn_t); +/// + +var X_DefaultRuneLocale = _RuneLocale{ + + F__magic: *(*[8]uint8)(unsafe.Pointer(ts)), + F__encoding: *(*[32]uint8)(unsafe.Pointer(ts + 9)), + F__invalid_rune: 0xFFFD, + + F__runetype: [256]uint32{ + + 0: uint32(0x00000200), + + 1: uint32(0x00000200), + + 2: uint32(0x00000200), + + 3: uint32(0x00000200), + + 4: uint32(0x00000200), + + 5: uint32(0x00000200), + + 6: uint32(0x00000200), + + 7: uint32(0x00000200), + + 8: uint32(0x00000200), + + 9: uint32(0x00000200 | + + 0x00004000 | + + 0x00020000), + + 10: uint32(0x00000200 | + + 0x00004000), + + 11: uint32(0x00000200 | + + 0x00004000), + + 12: uint32(0x00000200 | + + 0x00004000), + + 13: uint32(0x00000200 | + + 0x00004000), + + 14: uint32(0x00000200), + + 15: uint32(0x00000200), + + 16: uint32(0x00000200), + + 17: uint32(0x00000200), + + 18: uint32(0x00000200), + + 19: uint32(0x00000200), + + 20: uint32(0x00000200), + + 21: uint32(0x00000200), + + 22: uint32(0x00000200), + + 23: uint32(0x00000200), + + 24: uint32(0x00000200), + + 25: uint32(0x00000200), + + 26: uint32(0x00000200), + + 27: uint32(0x00000200), + + 28: uint32(0x00000200), + + 29: uint32(0x00000200), + + 30: uint32(0x00000200), + + 31: uint32(0x00000200), + + 32: uint32(0x00004000 | + + 0x00020000 | + + 0x00040000), + + 33: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 34: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 35: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 36: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 37: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 38: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 39: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 40: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 41: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 42: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 43: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 44: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 45: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 46: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 47: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 48: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 0), + + 49: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 1), + + 50: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 2), + + 51: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 3), + + 52: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 4), + + 53: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 5), + + 54: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 6), + + 55: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 7), + + 56: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 8), + + 57: uint32(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + 9), + + 58: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 59: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 60: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 61: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 62: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 63: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 64: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 65: uint32(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 10), + + 66: uint32(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 11), + + 67: uint32(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 12), + + 68: uint32(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 13), + + 69: uint32(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 14), + + 70: uint32(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 15), + + 71: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 72: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 73: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 74: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 75: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 76: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 77: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 78: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 79: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 80: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 81: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 82: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 83: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 84: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 85: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 86: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 87: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 88: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 89: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 90: uint32(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 91: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 92: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 93: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 94: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 95: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 96: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 97: uint32(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 10), + + 98: uint32(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 11), + + 99: uint32(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 12), + + 100: uint32(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 13), + + 101: uint32(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 14), + + 102: uint32(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + 15), + + 103: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 104: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 105: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 106: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 107: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 108: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 109: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 110: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 111: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 112: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 113: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 114: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 115: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 116: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 117: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 118: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 119: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 120: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 121: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 122: uint32(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 123: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 124: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 125: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 126: uint32(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 127: uint32(0x00000200), + }, + F__maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, + }, + F__mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, + }, +} /* table.cpp.c:2243:19 */ + +var X_CurrentRuneLocale uintptr = 0 /* table.cpp.c:4092:19 */ + +/// _RuneLocale * +/// __runes_for_locale(locale_t locale, int *mb_sb_limit) +/// { +/// (locale = get_real_locale(locale)); +/// struct xlocale_ctype *c = ((struct xlocale_ctype*)(locale)->components[XLC_CTYPE]); +/// *mb_sb_limit = c->__mb_sb_limit; +/// return c->runes; +/// } + +func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ + return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) +} + +type locale_t = uintptr /* alltypes.h:336:32 */ + +func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisalpha(tls, c) + } + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + }() != 0 || func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0) +} + +func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ + return Xisalnum(tls, c) +} + +func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) +} + +func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ + return Xisalpha(tls, c) +} + +func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ + return Bool32(uint32(c)-uint32('0') < uint32(10)) +} + +func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ + return Xisdigit(tls, c) +} + +func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */ + return Bool32(uint32(c)-uint32('a') < uint32(26)) +} + +func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ + return Xislower(tls, c) +} + +func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ + return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) +} + +func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ + return Xisprint(tls, c) +} + +func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */ + return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5)) +} + +func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */ + return Xisspace(tls, c) +} + +func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */ + return Bool32(uint32(c)-uint32('A') < uint32(26)) +} + +func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */ + return Xisupper(tls, c) +} + +func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) +} + +func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ + return Xisxdigit(tls, c) +} + +type uintptr_t = uint32 /* alltypes.h:48:24 */ + +type intptr_t = int32 /* alltypes.h:63:15 */ + +type int8_t = int8 /* alltypes.h:89:25 */ + +type int16_t = int16 /* alltypes.h:94:25 */ + +type int32_t = int32 /* alltypes.h:99:25 */ + +type int64_t = int64 /* alltypes.h:104:25 */ + +type intmax_t = int64 /* alltypes.h:109:25 */ + +type uint8_t = uint8 /* alltypes.h:114:25 */ + +type uint16_t = uint16 /* alltypes.h:119:25 */ + +type uint32_t = uint32 /* alltypes.h:124:25 */ + +type uint64_t = uint64 /* alltypes.h:129:25 */ + +type uintmax_t = uint64 /* alltypes.h:139:25 */ + +type int_fast8_t = int8_t /* stdint.h:22:16 */ +type int_fast64_t = int64_t /* stdint.h:23:17 */ + +type int_least8_t = int8_t /* stdint.h:25:17 */ +type int_least16_t = int16_t /* stdint.h:26:17 */ +type int_least32_t = int32_t /* stdint.h:27:17 */ +type int_least64_t = int64_t /* stdint.h:28:17 */ + +type uint_fast8_t = uint8_t /* stdint.h:30:17 */ +type uint_fast64_t = uint64_t /* stdint.h:31:18 */ + +type uint_least8_t = uint8_t /* stdint.h:33:18 */ +type uint_least16_t = uint16_t /* stdint.h:34:18 */ +type uint_least32_t = uint32_t /* stdint.h:35:18 */ +type uint_least64_t = uint64_t /* stdint.h:36:18 */ + +type int_fast16_t = int32_t /* stdint.h:1:17 */ +type int_fast32_t = int32_t /* stdint.h:2:17 */ +type uint_fast16_t = uint32_t /* stdint.h:3:18 */ +type uint_fast32_t = uint32_t /* stdint.h:4:18 */ + +type ssize_t = int32 /* alltypes.h:58:15 */ + +type off_t = int64 /* alltypes.h:155:16 */ + +type _IO_FILE = struct { + Fflags uint32 + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int32 + Fmode int32 + Flock int32 + Flbf int32 + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + F__ccgo_pad1 [4]byte + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr + F__ccgo_pad2 [4]byte +} /* alltypes.h:313:9 */ + +type FILE = _IO_FILE /* alltypes.h:313:25 */ + +type va_list = uintptr /* alltypes.h:319:27 */ + +type _G_fpos64_t = struct { + F__ccgo_pad1 [0]uint64 + F__opaque [16]uint8 +} /* stdio.h:54:9 */ + +type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ + +type float_t = float32 /* alltypes.h:23:15 */ + +type double_t = float64 /* alltypes.h:28:16 */ + +func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var __u struct {F__f float32;} at bp, 4 + + *(*float32)(unsafe.Pointer(bp)) = __f + return *(*uint32)(unsafe.Pointer(bp)) +} + +func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var __u struct {F__f float64;} at bp, 8 + + *(*float64)(unsafe.Pointer(bp)) = __f + return *(*uint64)(unsafe.Pointer(bp)) +} + +type syscall_arg_t = int32 /* syscall.h:22:14 */ + +func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ + var c int32 + var x int32 + var y int64 + var neg int32 = 0 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c == '+' || c == '-' { + neg = Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') >= 10 && pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + if uint32(c-'0') >= 10 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return -0x7fffffffffffffff - int64(1) + } + for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + x = 10*x + c - '0' + } + for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + y = int64(10)*y + int64(c) - int64('0') + } + for ; uint32(c-'0') < 10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if neg != 0 { + return -y + } + return y +} + +func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var x [128]uint32_t at bp, 512 + + var i int32 + var j int32 + var k int32 + var a int32 + var z int32 + var lrp int64 = int64(0) + var dc int64 = int64(0) + var e10 int64 = int64(0) + var lnz int32 = 0 + var gotdig int32 = 0 + var gotrad int32 = 0 + var rp int32 + var e2 int32 + var emax int32 = -emin - bits + 3 + var denormal int32 = 0 + var y float64 + var frac float64 = float64(0) + var bias float64 = float64(0) + + j = 0 + k = 0 + + // Don't let leading zeros consume buffer space + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + if c == '.' { + gotrad = 1 + for c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }(); c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + lrp-- + } + } + + *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) + for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + gotrad = 1 + lrp = dc + } else if k < 128-3 { + dc++ + if c != '0' { + lnz = int32(dc) + } + if j != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') + } + if PreIncInt32(&j, 1) == 9 { + k++ + j = 0 + } + gotdig = 1 + } else { + dc++ + if c != '0' { + lnz = (128 - 4) * 9 + *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) + } + } + } + if !(gotrad != 0) { + lrp = dc + } + + if gotdig != 0 && c|32 == 'e' { + e10 = scanexp(tls, f, pok) + if e10 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e10 = int64(0) + } + lrp = lrp + e10 + } else if c >= 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + if !(gotdig != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + // Handle zero specially to avoid nasty special cases later + if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { + return float64(sign) * 0.0 + } + + // Optimize small integers (w/no exponent) and over/under-flow + if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if lrp > int64(-emin/2) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if lrp < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + // Align incomplete final B1B digit + if j != 0 { + for ; j < 9; j++ { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10) + } + k++ + j = 0 + } + + a = 0 + z = k + e2 = 0 + rp = int32(lrp) + + // Optimize small to mid-size integers (even in exp. notation) + if lnz < 9 && lnz <= rp && rp < 18 { + if rp == 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if rp < 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp]) + } + var bitlim int32 = bits - 3*(rp-9) + if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10]) + } + } + + // Drop trailing zeros + for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- { + } + + // Align radix point to B1B digit boundary + if rp%9 != 0 { + var rpm9 int32 + if rp >= 0 { + rpm9 = rp % 9 + } else { + rpm9 = rp%9 + 9 + } + var p10 int32 = _sp10s[8-rpm9] + var carry uint32_t = uint32_t(0) + for k = a; k != z; k++ { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry + carry = uint32_t(1000000000/p10) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + rp = rp - 9 + } + } + if carry != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry + } + rp = rp + (9 - rpm9) + } + + // Upscale until desired number of bits are left of radix point + for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] { + var carry uint32_t = uint32_t(0) + e2 = e2 - 29 + for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) { + var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry) + if tmp > uint64(1000000000) { + carry = uint32_t(tmp / uint64(1000000000)) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000)) + } else { + carry = uint32_t(0) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp) + } + if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + z = k + } + if k == a { + break + } + } + if carry != 0 { + rp = rp + 9 + a = (a - 1) & (128 - 1) + if a == z { + z = (z - 1) & (128 - 1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) + } + *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry + } + } + + // Downscale until exactly number of bits are left of radix point + for { + var carry uint32_t = uint32_t(0) + var sh int32 = 1 + for i = 0; i < 2; i++ { + k = (a + i) & (128 - 1) + if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] { + i = 2 + break + } + if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] { + break + } + } + if i == 2 && rp == 9*2 { + break + } + // FIXME: find a way to compute optimal sh + if rp > 9+9*2 { + sh = 9 + } + e2 = e2 + sh + for k = a; k != z; k = (k + 1) & (128 - 1) { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry + carry = uint32_t(int32(1000000000)>>sh) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + i-- + rp = rp - 9 + } + } + if carry != 0 { + if (z+1)&(128-1) != a { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry + z = (z + 1) & (128 - 1) + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1) + } + } + } + + // Assemble desired bits into floating point variable + for y = float64(AssignInt32(&i, 0)); i < 2; i++ { + if (a+i)&(128-1) == z { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0) + } + y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4))) + } + + y = y * float64(sign) + + // Limit precision for denormal results + if bits > 53+e2-emin { + bits = 53 + e2 - emin + if bits < 0 { + bits = 0 + } + denormal = 1 + } + + // Calculate bias term to force rounding, move out lower bits + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 2*53-bits-1), y) + frac = Xfmodl(tls, y, Xscalbn(tls, float64(1), 53-bits)) + y = y - frac + y = y + bias + } + + // Process tail of decimal input so it can affect rounding + if (a+i)&(128-1) != z { + var t uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) + if t < uint32_t(500000000) && (t != 0 || (a+i+1)&(128-1) != z) { + frac = frac + 0.25*float64(sign) + } else if t > uint32_t(500000000) { + frac = frac + 0.75*float64(sign) + } else if t == uint32_t(500000000) { + if (a+i+1)&(128-1) == z { + frac = frac + 0.5*float64(sign) + } else { + frac = frac + 0.75*float64(sign) + } + } + if 53-bits >= 2 && !(Xfmodl(tls, frac, float64(1)) != 0) { + frac += 1 + } + } + + y = y + frac + y = y - bias + + if (e2+53)&0x7fffffff > emax-5 { + if Xfabsl(tls, y) >= float64(float64(2))/2.22044604925031308085e-16 { + if denormal != 0 && bits == 53+e2-emin { + denormal = 0 + } + y = y * 0.5 + e2++ + } + if e2+53 > emax || denormal != 0 && frac != 0 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + } + + return Xscalbnl(tls, y, e2) +} + +var _sth = [2]uint32_t{uint32_t(9007199), uint32_t(254740991)} /* floatscan.c:67:24 */ +var _sp10s = [8]int32{10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000} /* floatscan.c:80:19 */ + +func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:315:20: */ + var x uint32_t = uint32_t(0) + var y float64 = float64(0) + var scale float64 = float64(1) + var bias float64 = float64(0) + var gottail int32 = 0 + var gotrad int32 = 0 + var gotdig int32 = 0 + var rp int64 = int64(0) + var dc int64 = int64(0) + var e2 int64 = int64(0) + var d int32 + var c int32 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + + // Skip leading zeros + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + + if c == '.' { + gotrad = 1 + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + // Count zeros after the radix point before significand + rp = int64(0) + __1: + if !(c == '0') { + goto __3 + } + gotdig = 1 + goto __2 + __2: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + rp-- + goto __1 + goto __3 + __3: + } + + for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + rp = dc + gotrad = 1 + } else { + gotdig = 1 + if c > '9' { + d = c | 32 + 10 - 'a' + } else { + d = c - '0' + } + if dc < int64(8) { + x = x*uint32_t(16) + uint32_t(d) + } else if dc < int64(53/4+1) { + y = y + float64(d)*AssignDivFloat64(&scale, float64(16)) + } else if d != 0 && !(gottail != 0) { + y = y + 0.5*scale + gottail = 1 + } + dc++ + } + } + if !(gotdig != 0) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if gotrad != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } else { + X__shlim(tls, f, int64(0)) + } + return float64(sign) * 0.0 + } + if !(gotrad != 0) { + rp = dc + } + for dc < int64(8) { + x = x * uint32_t(16) + dc++ + } + if c|32 == 'p' { + e2 = scanexp(tls, f, pok) + if e2 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e2 = int64(0) + } + } else { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + e2 = e2 + (int64(4)*rp - int64(32)) + + if !(x != 0) { + return float64(sign) * 0.0 + } + if e2 > int64(-emin) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if e2 < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + for x < 0x80000000 { + if y >= 0.5 { + x = x + (x + uint32_t(1)) + y = y + (y - float64(1)) + } else { + x = x + x + y = y + y + } + e2-- + } + + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) + if bits < 0 { + bits = 0 + } + } + + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 32+53-bits-1), float64(sign)) + } + + if bits < 32 && y != 0 && !(x&uint32_t(1) != 0) { + x++ + y = float64(0) + } + + y = bias + float64(sign)*float64(x) + float64(sign)*y + y = y - bias + + if !(y != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + + return Xscalbnl(tls, y, int32(e2)) +} + +func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */ + var sign int32 = 1 + var i size_t + var bits int32 + var emin int32 + var c int32 + + switch prec { + case 0: + bits = 24 + emin = -125 - bits + break + case 1: + bits = 53 + emin = -1021 - bits + break + case 2: + bits = 53 + emin = -1021 - bits + break + default: + return float64(0) + } + + for __isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0 { + } + + if c == '+' || c == '-' { + sign = sign - 2*Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + + for i = size_t(0); i < size_t(8) && c|32 == int32(*(*uint8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { + if i < size_t(7) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + if i == size_t(3) || i == size_t(8) || i > size_t(3) && pok != 0 { + if i != size_t(8) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + for ; i > size_t(3); i-- { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + } + return float64(float32(sign) * X__builtin_inff(tls)) + } + if !(i != 0) { + for i = size_t(0); i < size_t(3) && c|32 == int32(*(*uint8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { + if i < size_t(2) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + } + if i == size_t(3) { + if func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() != '(' { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return float64(X__builtin_nanf(tls, ts+54)) + } + for i = size_t(1); ; i++ { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') < 10 || uint32(c-'A') < 26 || uint32(c-'a') < 26 || c == '_' { + continue + } + if c == ')' { + return float64(X__builtin_nanf(tls, ts+54)) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + for PostDecUint32(&i, 1) != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + return float64(X__builtin_nanf(tls, ts+54)) + } + return float64(X__builtin_nanf(tls, ts+54)) + } + + if i != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + if c == '0' { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c|32 == 'x' { + return hexfloat(tls, f, bits, emin, sign, pok) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + c = '0' + } + + return decfloat(tls, f, c, bits, emin, sign, pok) +} + +// Lookup table for digit values. -1==255>=36 -> invalid +var table = [257]uint8{Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), +} /* intscan.c:7:28 */ + +func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */ + var val uintptr + var c int32 + var neg int32 + var x uint32 + var y uint64 + var bs int32 + val = uintptr(unsafe.Pointer(&table)) + uintptr(1) + neg = 0 + if !(base > uint32(36) || base == uint32(1)) { + goto __1 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__1: + ; +__2: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __3 + } + goto __2 +__3: + ; + if !(c == '+' || c == '-') { + goto __4 + } + neg = -Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() +__4: + ; + if !((base == uint32(0) || base == uint32(16)) && c == '0') { + goto __5 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(c|32 == 'x') { + goto __7 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { + goto __9 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + goto __10 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + goto __11 +__10: + X__shlim(tls, f, int64(0)) +__11: + ; + return uint64(0) +__9: + ; + base = uint32(16) + goto __8 +__7: + if !(base == uint32(0)) { + goto __12 + } + base = uint32(8) +__12: + ; +__8: + ; + goto __6 +__5: + if !(base == uint32(0)) { + goto __13 + } + base = uint32(10) +__13: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { + goto __14 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + X__shlim(tls, f, int64(0)) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__14: + ; +__6: + ; + if !(base == uint32(10)) { + goto __15 + } + x = uint32(0) +__17: + if !(uint32(c-'0') < 10 && x <= 0xffffffff/uint32(10)-uint32(1)) { + goto __19 + } + x = x*uint32(10) + uint32(c-'0') + goto __18 +__18: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __17 + goto __19 +__19: + ; + y = uint64(x) +__20: + if !(uint32(c-'0') < 10 && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(10) && uint64(10)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(c-'0')) { + goto __22 + } + y = y*uint64(10) + uint64(c-'0') + goto __21 +__21: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __20 + goto __22 +__22: + ; + if !(uint32(c-'0') >= 10) { + goto __23 + } + goto done +__23: + ; + goto __16 +__15: + if !!(base&(base-uint32(1)) != 0) { + goto __24 + } + bs = int32(*(*uint8)(unsafe.Pointer(ts + 55 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + x = uint32(0) +__26: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { + goto __28 + } + x = x<<bs | uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __27 +__27: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __26 + goto __28 +__28: + ; + y = uint64(x) +__29: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= uint64(2*uint64(0x7fffffffffffffff)+uint64(1))>>bs) { + goto __31 + } + y = y<<bs | uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __30 +__30: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __29 + goto __31 +__31: + ; + goto __25 +__24: + x = uint32(0) +__32: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(36)-uint32(1)) { + goto __34 + } + x = x*base + uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __33 +__33: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __32 + goto __34 +__34: + ; + y = uint64(x) +__35: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(base) && uint64(base)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { + goto __37 + } + y = y*uint64(base) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __36 +__36: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __35 + goto __37 +__37: + ; +__25: + ; +__16: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __38 + } +__39: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __41 + } + goto __40 +__40: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __39 + goto __41 +__41: + ; + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + y = lim + if !(lim&uint64(1) != 0) { + goto __42 + } + neg = 0 +__42: + ; +__38: + ; +done: + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(y >= lim) { + goto __43 + } + if !(!(lim&uint64(1) != 0) && !(neg != 0)) { + goto __44 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim - uint64(1) + goto __45 +__44: + if !(y > lim) { + goto __46 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim +__46: + ; +__45: + ; +__43: + ; + return y ^ uint64(neg) - uint64(neg) +} + +// The shcnt field stores the number of bytes read so far, offset by +// the value of buf-rpos at the last function call (__shlim or __shgetc), +// so that between calls the inline shcnt macro can add rpos-buf to get +// the actual count. + +func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf) - int32((*FILE)(unsafe.Pointer(f)).Frpos)) / 1) + // If lim is nonzero, rend must be a valid pointer. + if lim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } +} + +func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ + var c int32 + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(f)).Frpos)-int32((*FILE)(unsafe.Pointer(f)).Fbuf))/1) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) + return -1 + } + cnt++ + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) + } + return c +} + +func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */ + return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24 +} + +func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */ + return Xcopysign(tls, x, y) +} + +func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */ + return Xfabs(tls, x) +} + +func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */ + return Xfmod(tls, x, y) +} + +var toint double_t = float64(float64(1)) / 2.22044604925031308085e-16 /* rint.c:10:23 */ + +func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + var s int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 63) + var y double_t + + if e >= 0x3ff+52 { + return x + } + if s != 0 { + y = x - toint + toint + } else { + y = x + toint - toint + } + if y == float64(0) { + if s != 0 { + return -Float64FromFloat64(0.0) + } + return float64(0) + } + return y +} + +func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var u struct {Ff float64;} at bp, 8 + + var y double_t = x + + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + n = 1023 + } + } + } else if n < -1022 { + // make sure final n < -53 to avoid double + // rounding in the subnormal range + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + n = -1022 + } + } + } + *(*uint64_t)(unsafe.Pointer(bp)) = uint64_t(0x3ff+n) << 52 + x = y * *(*float64)(unsafe.Pointer(bp)) + return x +} + +func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ + return Xscalbn(tls, x, n) +} + +type div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:35 */ +type ldiv_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:63:36 */ +type lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:64:41 */ + +type max_align_t = struct { + F__ll int64 + F__ld float64 +} /* alltypes.h:34:54 */ + +type imaxdiv_t = struct { + Fquot intmax_t + Frem intmax_t +} /* inttypes.h:14:40 */ + +type pid_t = int32 /* alltypes.h:228:13 */ + +type uid_t = uint32 /* alltypes.h:238:18 */ + +type gid_t = uint32 /* alltypes.h:243:18 */ + +type iovec = struct { + Fiov_base uintptr + Fiov_len size_t +} /* alltypes.h:348:1 */ + +type socklen_t = uint32 /* alltypes.h:354:18 */ + +type sa_family_t = uint16 /* alltypes.h:359:24 */ + +type msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 +} /* socket.h:22:1 */ + +type cmsghdr = struct { + Fcmsg_len socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:44:1 */ + +type linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:74:1 */ + +type sockaddr = struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 +} /* socket.h:367:1 */ + +type sockaddr_storage = struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 +} /* socket.h:372:1 */ + +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ + +type sockaddr_in = struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t +} /* in.h:16:1 */ + +type in6_addr = struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } +} /* in.h:23:1 */ + +type sockaddr_in6 = struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t +} /* in.h:34:1 */ + +type ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:42:1 */ + +type ip_opts = struct { + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]uint8 +} /* in.h:229:1 */ + +type ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } +} /* in.h:247:1 */ + +type ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 +} /* in.h:252:1 */ + +type ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } +} /* in.h:258:1 */ + +type ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } +} /* in.h:264:1 */ + +type group_req = struct { + Fgr_interface uint32_t + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } +} /* in.h:275:1 */ + +type group_source_req = struct { + Fgsr_interface uint32_t + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } +} /* in.h:280:1 */ + +type group_filter = struct { + Fgf_interface uint32_t + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } +} /* in.h:286:1 */ + +type in_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } +} /* in.h:297:1 */ + +type in6_pktinfo = struct { + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipi6_ifindex uint32 +} /* in.h:303:1 */ + +type ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t + } + Fip6m_mtu uint32_t +} /* in.h:308:1 */ + +type addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:16:1 */ + +// Legacy functions follow (marked OBsolete in SUS) + +type netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t +} /* netdb.h:62:1 */ + +type hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:69:1 */ + +type servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr +} /* netdb.h:78:1 */ + +type protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 +} /* netdb.h:85:1 */ + +type aibuf = struct { + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 +} /* lookup.h:10:1 */ + +type sa = struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte +} /* lookup.h:10:1 */ + +type address = struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 +} /* lookup.h:20:1 */ + +type service = struct { + Fport uint16_t + Fproto uint8 + Fsocktype uint8 +} /* lookup.h:27:1 */ + +type resolvconf = struct { + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 +} /* lookup.h:34:1 */ + +func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ + var cnt size_t + cnt = size_t(1) +__1: + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { + goto __3 + } + goto __2 +__2: + cnt++ + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next + goto __1 + goto __3 +__3: + ; + var b uintptr = p - uintptr(uint32(uintptr(0))) + b -= 68 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) + //TODO LOCK(b->lock); + if !(int32(AssignSubPtrInt16(b+66, int16(cnt))) != 0) { + Xfree(tls, b) + } + //TODO else UNLOCK(b->lock); +} + +type time_t = int64 /* alltypes.h:78:16 */ + +type clockid_t = int32 /* alltypes.h:207:13 */ + +type timespec = struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ +} /* alltypes.h:222:1 */ + +type pthread_t = uintptr /* alltypes.h:266:26 */ + +type pthread_once_t = int32 /* alltypes.h:272:13 */ + +type pthread_key_t = uint32 /* alltypes.h:277:18 */ + +type pthread_spinlock_t = int32 /* alltypes.h:282:13 */ + +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:287:37 */ + +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:292:37 */ + +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:297:37 */ + +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:302:40 */ + +type __sigset_t = struct{ F__bits [32]uint32 } /* alltypes.h:342:9 */ + +type sigset_t = __sigset_t /* alltypes.h:342:71 */ + +type pthread_attr_t = struct{ F__u struct{ F__i [9]int32 } } /* alltypes.h:365:147 */ + +type pthread_mutex_t = struct{ F__u struct{ F__i [6]int32 } } /* alltypes.h:370:157 */ + +type pthread_cond_t = struct{ F__u struct{ F__i [12]int32 } } /* alltypes.h:380:112 */ + +type pthread_rwlock_t = struct{ F__u struct{ F__i [8]int32 } } /* alltypes.h:390:139 */ + +type pthread_barrier_t = struct{ F__u struct{ F__i [5]int32 } } /* alltypes.h:395:137 */ + +type sched_param = struct { + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [4]int32 + F__reserved3 int32 +} /* sched.h:19:1 */ + +type timer_t = uintptr /* alltypes.h:202:14 */ + +type clock_t = int32 /* alltypes.h:212:14 */ + +type tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:38:1 */ + +type itimerspec = struct { + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ + } + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ + } +} /* time.h:80:1 */ + +type __ptcb = struct { + F__f uintptr + F__x uintptr + F__next uintptr +} /* pthread.h:206:1 */ + +type useconds_t = uint32 /* alltypes.h:253:18 */ + +func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ + bp := tls.Alloc(1608) + defer tls.Free(1608) + + // var ports [2]service at bp, 8 + + // var addrs [48]address at bp+8, 1344 + + // var canon [256]uint8 at bp+1352, 256 + + var outcanon uintptr + var nservs int32 + var naddrs int32 + var nais int32 + var canon_len int32 + var i int32 + var j int32 + var k int32 + var family int32 = 0 + var flags int32 = 0 + var proto int32 = 0 + var socktype int32 = 0 + var out uintptr + + if !(host != 0) && !(serv != 0) { + return -2 + } + + if hint != 0 { + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype + + var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 + if flags&mask != flags { + return -1 + } + + switch family { + case 2: + fallthrough + case 10: + fallthrough + case 0: + break + fallthrough + default: + return -6 + } + } + + if flags&0x20 != 0 { + Xabort(tls) //TODO- + // /* Define the "an address is configured" condition for address + // * families via ability to create a socket for the family plus + // * routability of the loopback address for the family. */ + // static const struct sockaddr_in lo4 = { + // .sin_family = AF_INET, .sin_port = 65535, + // .sin_addr.s_addr = __BYTE_ORDER == __BIG_ENDIAN + // ? 0x7f000001 : 0x0100007f + // }; + // static const struct sockaddr_in6 lo6 = { + // .sin6_family = AF_INET6, .sin6_port = 65535, + // .sin6_addr = IN6ADDR_LOOPBACK_INIT + // }; + // int tf[2] = { AF_INET, AF_INET6 }; + // const void *ta[2] = { &lo4, &lo6 }; + // socklen_t tl[2] = { sizeof lo4, sizeof lo6 }; + // for (i=0; i<2; i++) { + // if (family==tf[1-i]) continue; + // int s = socket(tf[i], SOCK_CLOEXEC|SOCK_DGRAM, + // IPPROTO_UDP); + // if (s>=0) { + // int cs; + // pthread_setcancelstate( + // PTHREAD_CANCEL_DISABLE, &cs); + // int r = connect(s, ta[i], tl[i]); + // pthread_setcancelstate(cs, 0); + // close(s); + // if (!r) continue; + // } + // switch (errno) { + // case EADDRNOTAVAIL: + // case EAFNOSUPPORT: + // case EHOSTUNREACH: + // case ENETDOWN: + // case ENETUNREACH: + // break; + // default: + // return EAI_SYSTEM; + // } + // if (family == tf[i]) return EAI_NONAME; + // family = tf[1-i]; + // } + } + + nservs = X__lookup_serv(tls, bp, serv, proto, socktype, flags) + if nservs < 0 { + return nservs + } + + naddrs = X__lookup_name(tls, bp+8, bp+1352, host, family, flags) + if naddrs < 0 { + return naddrs + } + + nais = nservs * naddrs + canon_len = int32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint32(1), uint32(nais)*uint32(unsafe.Sizeof(aibuf{}))+uint32(canon_len)+uint32(1)) + if !(out != 0) { + return -10 + } + + if canon_len != 0 { + outcanon = out + uintptr(nais)*68 + Xmemcpy(tls, outcanon, bp+1352, uint32(canon_len+1)) + } else { + outcanon = uintptr(0) + } + + for k = AssignInt32(&i, 0); i < naddrs; i++ { + j = 0 + __1: + if !(j < nservs) { + goto __3 + } + { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fslot = int16(k) + //TODO out[k].ai = (struct addrinfo){ + //TODO .ai_family = addrs[i].family, + //TODO .ai_socktype = ports[j].socktype, + //TODO .ai_protocol = ports[j].proto, + //TODO .ai_addrlen = addrs[i].family == AF_INET + //TODO ? sizeof(struct sockaddr_in) + //TODO : sizeof(struct sockaddr_in6), + //TODO .ai_addr = (void *)&out[k].sa, + //TODO .ai_canonname = outcanon }; + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { + return uint32(unsafe.Sizeof(sockaddr_in{})) + } + return uint32(unsafe.Sizeof(sockaddr_in6{})) + }() + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addr = out + uintptr(k)*68 + 32 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_canonname = outcanon + if k != 0 { + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*68)).Fai.Fai_next = out + uintptr(k)*68 + } + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { + case 2: + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + Xmemcpy(tls, out+uintptr(k)*68+32+4, bp+8+uintptr(i)*28+8, uint32(4)) + break + case 10: + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid + Xmemcpy(tls, out+uintptr(k)*68+32+8, bp+8+uintptr(i)*28+8, uint32(16)) + break + } + + } + goto __2 + __2: + j++ + k++ + goto __1 + goto __3 + __3: + } + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) + *(*uintptr)(unsafe.Pointer(res)) = out + return 0 +} + +type ucred = struct { + Fpid pid_t + Fuid uid_t + Fgid gid_t +} /* socket.h:57:1 */ + +type mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 +} /* socket.h:63:1 */ + +func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var size size_t = size_t(63) + // var res uintptr at bp, 4 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh) + _sh = Xmalloc(tls, AssignAddUint32(&size, size+size_t(1))) + if !(_sh != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyaddr_r(tls, a, l, af, _sh, + _sh+uintptr(1)*20, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh +} + +var _sh uintptr /* gethostbyaddr.c:9:24: */ + +func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */ + return Xgethostbyname2(tls, name, 2) +} + +func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var size size_t = size_t(63) + // var res uintptr at bp, 4 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh1) + _sh1 = Xmalloc(tls, AssignAddUint32(&size, size+size_t(1))) + if !(_sh1 != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyname2_r(tls, name, af, _sh1, + _sh1+uintptr(1)*20, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh1 +} + +var _sh1 uintptr /* gethostbyname2.c:10:24: */ + +func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname2_r.c:11:5: */ + bp := tls.Alloc(1600) + defer tls.Free(1600) + + // var addrs [48]address at bp, 1344 + + // var canon [256]uint8 at bp+1344, 256 + + var i int32 + var cnt int32 + var align size_t + var need size_t + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + cnt = X__lookup_name(tls, bp, bp+1344, name, af, 0x02) + if cnt < 0 { + switch cnt { + case -2: + *(*int32)(unsafe.Pointer(err)) = 1 + return 2 + fallthrough + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + fallthrough + default: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return 74 + fallthrough + case -10: + fallthrough + case -11: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + } + } + + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { + if af == 10 { + return 16 + } + return 4 + }() + + // Align buffer + align = -uintptr_t(buf) & (uint32(unsafe.Sizeof(uintptr(0))) - uint32(1)) + + need = uint32(4) * uint32(unsafe.Sizeof(uintptr(0))) + need = need + uint32(cnt+1)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) + need = need + (Xstrlen(tls, name) + size_t(1)) + need = need + (Xstrlen(tls, bp+1344) + size_t(1)) + need = need + align + + if need > buflen { + return 34 + } + + buf += uintptr(align) + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf + buf += uintptr(uint32(3) * uint32(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf + buf += uintptr(uint32(cnt+1) * uint32(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < cnt; i++ { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) + } + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = uintptr(0) + + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + size_t(1)) + + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4))) + size_t(1)) + } else { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*4)) = uintptr(0) + + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +type if_nameindex = struct { + Fif_index uint32 + Fif_name uintptr +} /* if.h:12:1 */ + +type ifaddr = struct { + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 + } + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 + } + } + Fifa_ifp uintptr + Fifa_next uintptr +} /* if.h:51:1 */ + +type ifmap = struct { + Fmem_start uint32 + Fmem_end uint32 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte +} /* if.h:64:1 */ + +type ifreq = struct { + Fifr_ifrn struct{ Fifrn_name [16]uint8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint32 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 + } + } +} /* if.h:76:1 */ + +type ifconf = struct { + Fifc_len int32 + Fifc_ifcu struct{ Fifcu_buf uintptr } +} /* if.h:116:1 */ + +type ns_sect = uint32 /* nameser.h:37:3 */ + +type __ns_msg = struct { + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr +} /* nameser.h:39:9 */ + +type ns_msg = __ns_msg /* nameser.h:46:3 */ + +type _ns_flagdata = struct { + Fmask int32 + Fshift int32 +} /* nameser.h:48:1 */ + +type __ns_rr = struct { + Fname [1025]uint8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr +} /* nameser.h:59:9 */ + +type ns_rr = __ns_rr /* nameser.h:66:3 */ + +type ns_flag = uint32 /* nameser.h:87:3 */ + +type ns_opcode = uint32 /* nameser.h:96:3 */ + +type ns_rcode = uint32 /* nameser.h:115:3 */ + +type ns_update_operation = uint32 /* nameser.h:121:3 */ + +type ns_tsig_key1 = struct { + Fname [1025]uint8 + Falg [1025]uint8 + F__ccgo_pad1 [2]byte + Fdata uintptr + Flen int32 +} /* nameser.h:123:1 */ + +type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ + +type ns_tcp_tsig_state1 = struct { + Fcounter int32 + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 +} /* nameser.h:130:1 */ + +type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ + +type ns_type = uint32 /* nameser.h:200:3 */ + +type ns_class = uint32 /* nameser.h:219:3 */ + +type ns_key_types = uint32 /* nameser.h:226:3 */ + +type ns_cert_types = uint32 /* nameser.h:234:3 */ + +type HEADER = struct { + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ +} /* nameser.h:353:3 */ + +// unused; purely for broken apps +type __res_state = struct { + Fretrans int32 + Fretry int32 + Foptions uint32 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]uint8 + Fpfcode uint32 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F_u struct { + F__ccgo_pad1 [0]uint32 + Fpad [52]uint8 + } +} /* resolv.h:26:9 */ + +// unused; purely for broken apps +type res_state = uintptr /* resolv.h:62:3 */ + +type res_sym = struct { + Fnumber int32 + Fname uintptr + Fhumanname uintptr +} /* resolv.h:70:1 */ + +func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ + p += uintptr(uint32(3) * uint32(unsafe.Sizeof(int32(0)))) + *(*uint8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = uint8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*uint8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = uint8(uint32('0') + x%uint32(10)) + x = x / uint32(10) + } + return p +} + +func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + Xsprintf(tls, s, ts+64, + VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) +} + +func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ + var i int32 + for i = 15; i >= 0; i-- { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&15] + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = uint8('.') + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = uint8('.') + } + Xstrcpy(tls, s, ts+89) +} + +var _sxdigits = *(*[17]uint8)(unsafe.Pointer(ts + 98)) /* getnameinfo.c:36:20 */ + +func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */ + bp := tls.Alloc(556) + defer tls.Free(556) + + // var line [512]uint8 at bp+16, 512 + + var p uintptr + var z uintptr + var _buf [1032]uint8 + _ = _buf + // var atmp [16]uint8 at bp, 16 + + // var iplit address at bp+528, 28 + + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var f uintptr = Xfopen(tls, ts+115, ts+126) + if !(f != 0) { + return + } + if family == 2 { + Xmemcpy(tls, bp+uintptr(12), a, uint32(4)) + Xmemcpy(tls, bp, ts+129, uint32(12)) + a = bp /* &atmp[0] */ + } + for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]uint8{})), f) != 0 { + if AssignUintptr(&p, Xstrchr(tls, bp+16, '#')) != 0 { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8('\n') + *(*uint8)(unsafe.Pointer(p)) = uint8(0) + } + + for p = bp + 16; /* &line[0] */ *(*uint8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8(0) + if X__lookup_ipliteral(tls, bp+528, bp+16, 0) <= 0 { + continue + } + + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { + Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint32(4)) + Xmemcpy(tls, bp+528+8, ts+129, uint32(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) + } + + if Xmemcmp(tls, a, bp+528+8, uint32(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { + continue + } + + for ; *(*uint8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*uint8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + if (int32(z)-int32(p))/1 < 256 { + Xmemcpy(tls, buf, p, uint32((int32(z)-int32(p))/1+1)) + break + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) +} + +func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getnameinfo.c:87:13: */ + Xabort(tls) //TODO- + // unsigned long svport; + // char line[128], *p, *z; + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) return; + // while (fgets(line, sizeof line, f)) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // for (p=line; *p && !isspace(*p); p++); + // if (!*p) continue; + // *p++ = 0; + // svport = strtoul(p, &z, 10); + + // if (svport != port || z==p) continue; + // if (dgram && strncmp(z, "/udp", 4)) continue; + // if (!dgram && strncmp(z, "/tcp", 4)) continue; + // if (p-line > 32) continue; + + // memcpy(buf, line, p-line); + // break; + // } + // __fclose_ca(f); +} + +var Xh_errno int32 /* h_errno.c:4:5: */ + +func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */ + return uintptr(unsafe.Pointer(&Xh_errno)) +} + +func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var s uintptr = s0 + var d uintptr = dest + *(*[4]uint32)(unsafe.Pointer(bp /* a */)) = [4]uint32{0: uint32(0)} + // var z uintptr at bp+16, 4 + + var i int32 + + for i = 0; i < 4; i++ { + *(*uint32)(unsafe.Pointer(bp + uintptr(i)*4)) = Xstrtoul(tls, s, bp+16, 0) + if *(*uintptr)(unsafe.Pointer(bp + 16)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != '.' || !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(s)))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) + }() != 0) { + return 0 + } + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != 0) { + break + } + s = *(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(1) + } + if i == 4 { + return 0 + } + switch i { + case 0: + *(*uint32)(unsafe.Pointer(bp + 1*4)) = *(*uint32)(unsafe.Pointer(bp)) & uint32(0xffffff) + AssignShrPtrUint32(bp, int(24)) + fallthrough + case 1: + *(*uint32)(unsafe.Pointer(bp + 2*4)) = *(*uint32)(unsafe.Pointer(bp + 1*4)) & uint32(0xffff) + AssignShrPtrUint32(bp+1*4, int(16)) + fallthrough + case 2: + *(*uint32)(unsafe.Pointer(bp + 3*4)) = *(*uint32)(unsafe.Pointer(bp + 2*4)) & uint32(0xff) + AssignShrPtrUint32(bp+2*4, int(8)) + } + for i = 0; i < 4; i++ { + if *(*uint32)(unsafe.Pointer(bp + uintptr(i)*4)) > uint32(255) { + return 0 + } + *(*uint8)(unsafe.Pointer(d + uintptr(i))) = uint8(*(*uint32)(unsafe.Pointer(bp + uintptr(i)*4))) + } + return 1 +} + +func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var a uintptr = a0 + var i int32 + var j int32 + var max int32 + var best int32 + // var buf [100]uint8 at bp+176, 100 + + switch af { + case 2: + if socklen_t(Xsnprintf(tls, s, l, ts+142, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + return s + } + break + case 10: + if Xmemcmp(tls, a, ts+129, uint32(12)) != 0 { + Xsnprintf(tls, bp+176, uint32(unsafe.Sizeof([100]uint8{})), + ts+154, + VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } else { + Xsnprintf(tls, bp+176, uint32(unsafe.Sizeof([100]uint8{})), + ts+178, + VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } + // Replace longest /(^0|:)[:0]{2,}/ with "::" + i = AssignInt32(&best, 0) + max = 2 + for ; *(*uint8)(unsafe.Pointer(bp + 176 + uintptr(i))) != 0; i++ { + if i != 0 && int32(*(*uint8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { + continue + } + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+208)) + if j > max { + best = i + max = j + } + } + if max > 3 { + *(*uint8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrUint8(bp+176+uintptr(best+1), uint8(':')) + Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint32(i-best-max+1)) + } + if Xstrlen(tls, bp+176) < l { + Xstrcpy(tls, s, bp+176) + return s + } + break + default: + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return uintptr(0) + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 28 + return uintptr(0) +} + +func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */ + if c-uint32('0') < uint32(10) { + return int32(c - uint32('0')) + } + c = c | uint32(32) + if c-uint32('a') < uint32(6) { + return int32(c - uint32('a') + uint32(10)) + } + return -1 +} + +func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var ip [8]uint16_t at bp, 16 + + var a uintptr = a0 + var i int32 + var j int32 + var v int32 + var d int32 + var brk int32 = -1 + var need_v4 int32 = 0 + + if af == 2 { + for i = 0; i < 4; i++ { + for v = AssignInt32(&j, 0); j < 3 && func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) + }() != 0; j++ { + v = 10*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - '0' + } + if j == 0 || j > 1 && int32(*(*uint8)(unsafe.Pointer(s))) == '0' || v > 255 { + return 0 + } + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == 3 { + return 1 + } + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != '.' { + return 0 + } + s += uintptr(j + 1) + } + return 0 + } else if af != 10 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return -1 + } + + if int32(*(*uint8)(unsafe.Pointer(s))) == ':' && int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != ':' { + return 0 + } + + for i = 0; ; i++ { + if int32(*(*uint8)(unsafe.Pointer(s))) == ':' && brk < 0 { + brk = i + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(0) + if !(int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != 0) { + break + } + if i == 7 { + return 0 + } + continue + } + for v = AssignInt32(&j, 0); j < 4 && AssignInt32(&d, hexval(tls, uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))))) >= 0; j++ { + v = 16*v + d + } + if j == 0 { + return 0 + } + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(v) + if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != 0) && (brk >= 0 || i == 7) { + break + } + if i == 7 { + return 0 + } + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != ':' { + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != '.' || i < 6 && brk < 0 { + return 0 + } + need_v4 = 1 + i++ + break + } + s += uintptr(j + 1) + } + if brk >= 0 { + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint32(2*(i+1-brk))) + for j = 0; j < 7-i; j++ { + *(*uint16_t)(unsafe.Pointer(bp + uintptr(brk+j)*2)) = uint16_t(0) + } + } + for j = 0; j < 8; j++ { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(int32(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) >> 8) + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) + } + if need_v4 != 0 && Xinet_pton(tls, 2, s, a-uintptr(4)) <= 0 { + return 0 + } + return 1 +} + +func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + // var a4 in_addr at bp, 4 + + // var a6 in6_addr at bp+68, 16 + + if X__inet_aton(tls, name, bp) > 0 { + if family == 10 { // wrong family + return -2 + } + Xmemcpy(tls, buf+8, bp, uint32(unsafe.Sizeof(in_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) + return 1 + } + // var tmp [64]uint8 at bp+4, 64 + + var p uintptr = Xstrchr(tls, name, '%') + // var z uintptr at bp+84, 4 + + var scopeid uint64 = uint64(0) + if p != 0 && (int32(p)-int32(name))/1 < 64 { + Xmemcpy(tls, bp+4, name, uint32((int32(p)-int32(name))/1)) + *(*uint8)(unsafe.Pointer(bp + 4 + uintptr((int32(p)-int32(name))/1))) = uint8(0) + name = bp + 4 /* &tmp[0] */ + } + + if Xinet_pton(tls, 10, name, bp+68) <= 0 { + return 0 + } + if family == 2 { // wrong family + return -2 + } + + Xmemcpy(tls, buf+8, bp+68, uint32(unsafe.Sizeof(in6_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 10 + if p != 0 { + if func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1))))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1))))-uint32('0') < uint32(10)) + }() != 0 { + scopeid = Xstrtoull(tls, p, bp+84, 10) + } else { + *(*uintptr)(unsafe.Pointer(bp + 84 /* z */)) = p - uintptr(1) + } + if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 84)))) != 0 { + Xabort(tls) //TODO- + // if (!IN6_IS_ADDR_LINKLOCAL(&a6) && + // !IN6_IS_ADDR_MC_LINKLOCAL(&a6)) + // return EAI_NONAME; + // scopeid = if_nametoindex(p); + // if (!scopeid) return EAI_NONAME; + } + if scopeid > uint64(0xffffffff) { + return -2 + } + } + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) + return 1 +} + +type mode_t = uint32 /* alltypes.h:145:18 */ + +type flock = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:24:1 */ + +func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ + var s uintptr + //TODO if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; + if Xstrnlen(tls, host, uint32(255))-size_t(1) >= size_t(254) { + return 0 + } + for s = host; int32(*(*uint8)(unsafe.Pointer(s))) >= 0x80 || int32(*(*uint8)(unsafe.Pointer(s))) == '.' || int32(*(*uint8)(unsafe.Pointer(s))) == '-' || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0; s++ { + } + return BoolInt32(!(*(*uint8)(unsafe.Pointer(s)) != 0)) +} + +var Xzero_struct_address address /* lookup_name.c:27:16: */ + +func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:29:12: */ + var cnt int32 = 0 + if name != 0 { + return 0 + } + if flags&0x01 != 0 { + //TODO if (family != AF_INET6) + //TODO buf[cnt++] = (struct address){ .family = AF_INET }; + if family != 10 { + var x = Xzero_struct_address + x.Ffamily = 2 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + //TODO if (family != AF_INET) + //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; + if family != 2 { + var x = Xzero_struct_address + x.Ffamily = 10 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + } else { + Xabort(tls) //TODO- + // if (family != AF_INET6) + // buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } }; + // if (family != AF_INET) + // buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } }; + } + return cnt +} + +func name_from_numeric(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_name.c:58:12: */ + return X__lookup_ipliteral(tls, buf, name, family) +} + +func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:63:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var line [512]uint8 at bp, 512 + + var l size_t = Xstrlen(tls, name) + var cnt int32 = 0 + var badfam int32 = 0 + var _buf [1032]uint8 + _ = _buf + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var _f FILE + _ = _f + var f uintptr = Xfopen(tls, ts+115, ts+126) + if !(f != 0) { + switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { + case 2: + fallthrough + case 20: + fallthrough + case 13: + return 0 + fallthrough + default: + return -11 + } + } + for Xfgets(tls, bp, int32(unsafe.Sizeof([512]uint8{})), f) != 0 && cnt < 48 { + var p uintptr + var z uintptr + + if AssignUintptr(&p, Xstrchr(tls, bp, '#')) != 0 { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8('\n') + *(*uint8)(unsafe.Pointer(p)) = uint8(0) + } + for p = bp + uintptr(1); AssignUintptr(&p, Xstrstr(tls, p, name)) != 0 && (!(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + UintptrFromInt32(-1))))) != 0) || !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + uintptr(l))))) != 0)); p++ { + } + if !(p != 0) { + continue + } + + // Isolate IP address to parse + for p = bp; /* &line[0] */ *(*uint8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8(0) + switch name_from_numeric(tls, buf+uintptr(cnt)*28, bp, family) { + case 1: + cnt++ + break + case 0: + continue + default: + badfam = -2 + continue + } + + // Extract first name as canonical name + for ; *(*uint8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*uint8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + if is_valid_hostname(tls, p) != 0 { + Xmemcpy(tls, canon, p, uint32((int32(z)-int32(p))/1+1)) + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) + if cnt != 0 { + return cnt + } + return badfam +} + +type dpc_ctx = struct { + Faddrs uintptr + Fcanon uintptr + Fcnt int32 +} /* lookup_name.c:112:1 */ + +func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ + return -1 //TODO- + Xabort(tls) + return int32(0) //TODO- + // char search[256]; + // struct resolvconf conf; + // size_t l, dots; + // char *p, *z; + + // if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; + + // /* Count dots, suppress search when >=ndots or name ends in + // * a dot, which is an explicit request for global scope. */ + // for (dots=l=0; name[l]; l++) if (name[l]=='.') dots++; + // if (dots >= conf.ndots || name[l-1]=='.') *search = 0; + + // /* Strip final dot for canon, fail if multiple trailing dots. */ + // if (name[l-1]=='.') l--; + // if (!l || name[l-1]=='.') return EAI_NONAME; + + // /* This can never happen; the caller already checked length. */ + // if (l >= 256) return EAI_NONAME; + + // /* Name with search domain appended is setup in canon[]. This both + // * provides the desired default canonical name (if the requested + // * name is not a CNAME record) and serves as a buffer for passing + // * the full requested name to name_from_dns. */ + // memcpy(canon, name, l); + // canon[l] = '.'; + + // for (p=search; *p; p=z) { + // for (; isspace(*p); p++); + // for (z=p; *z && !isspace(*z); z++); + // if (z==p) break; + // if (z-p < 256 - l - 1) { + // memcpy(canon+l+1, p, z-p); + // canon[z-p+1+l] = 0; + // int cnt = name_from_dns(buf, canon, canon, family, &conf); + // if (cnt) return cnt; + // } + // } + + // canon[l] = 0; + // return name_from_dns(buf, canon, name, family, &conf); +} + +type policy = struct { + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 +} /* lookup_name.c:237:14 */ + +var defpolicy = [6]policy{ + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, + // Last rule must match all addresses to stop loop. + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), Fprec: uint8(40), Flabel: uint8(1)}, +} /* lookup_name.c:241:3 */ + +func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ + var i int32 + for i = 0; ; i++ { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint32(defpolicy[i].Flen)) != 0 { + continue + } + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { + continue + } + return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + } + return uintptr(0) +} + +func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) +} + +func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xff { + return int32(*(*uint8_t)(unsafe.Pointer(a + 1))) & 15 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 { + return 2 + } + if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 { + return 2 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0xc0 { + return 5 + } + return 14 +} + +func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12: */ + // FIXME: The common prefix length should be limited to no greater + // than the nominal length of the prefix portion of the source + // address. However the definition of the source prefix length is + // not clear and thus this limiting is not yet implemented. + var i uint32 + for i = uint32(0); i < uint32(128) && !((int32(*(*uint8_t)(unsafe.Pointer(s /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8)))))^int32(*(*uint8_t)(unsafe.Pointer(d /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8))))))&(int32(128)>>(i%uint32(8))) != 0); i++ { + } + return int32(i) +} + +func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ + var a uintptr = _a + var b uintptr = _b + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey +} + +func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var cnt int32 = 0 + var i int32 + var j int32 + _ = j + + *(*uint8)(unsafe.Pointer(canon)) = uint8(0) + if name != 0 { + // reject empty name and check len so it fits into temp bufs + var l size_t = Xstrnlen(tls, name, uint32(255)) + if l-size_t(1) >= size_t(254) { + return -2 + } + Xmemcpy(tls, canon, name, l+size_t(1)) + } + + // Procedurally, a request for v6 addresses with the v4-mapped + // flag set is like a request for unspecified family, followed + // by filtering of the results. + if flags&0x08 != 0 { + if family == 10 { + family = 0 + } else { + flags = flags - 0x08 + } + } + + // Try each backend until there's at least one result. + cnt = name_from_null(tls, buf, name, family, flags) + if !(cnt != 0) { + cnt = name_from_numeric(tls, buf, name, family) + } + if !(cnt != 0) && !(flags&0x04 != 0) { + cnt = name_from_hosts(tls, buf, canon, name, family) + if !(cnt != 0) { + cnt = name_from_dns_search(tls, buf, canon, name, family) + } + } + if cnt <= 0 { + if cnt != 0 { + return cnt + } + return -2 + } + + // Filter/transform results for v4-mapped lookup, if requested. + if flags&0x08 != 0 { + Xabort(tls) //TODO- + // if (!(flags & AI_ALL)) { + // /* If any v6 results exist, remove v4 results. */ + // for (i=0; i<cnt && buf[i].family != AF_INET6; i++); + // if (i<cnt) { + // for (j=0; i<cnt; i++) { + // if (buf[i].family == AF_INET6) + // buf[j++] = buf[i]; + // } + // cnt = i = j; + // } + // } + // /* Translate any remaining v4 results to v6 */ + // for (i=0; i<cnt; i++) { + // if (buf[i].family != AF_INET) continue; + // memcpy(buf[i].addr+12, buf[i].addr, 4); + // memcpy(buf[i].addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); + // buf[i].family = AF_INET6; + // } + } + + // No further processing is needed if there are fewer than 2 + // results or if there are only IPv4 results. + if cnt < 2 || family == 2 { + return cnt + } + for i = 0; i < cnt; i++ { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { + break + } + } + if i == cnt { + return cnt + } + var cs int32 + _ = cs + //TODO pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); + + // The following implements a subset of RFC 3484/6724 destination + // address selection by generating a single 31-bit sort key for + // each address. Rules 3, 4, and 7 are omitted for having + // excessive runtime and code size cost and dubious benefit. + // So far the label/precedence table cannot be customized. + for i = 0; i < cnt; i++ { + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily + var key int32 = 0 + *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} + *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} + var sa1 uintptr + var da uintptr + // var salen socklen_t at bp+88, 4 + + var dalen socklen_t + if family == 10 { + Xmemcpy(tls, bp+8, buf+uintptr(i)*28+8, uint32(16)) + da = bp /* &da6 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + sa1 = bp + 28 /* &sa6 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + } else { + Xmemcpy(tls, bp+28+8, + ts+129, uint32(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) + Xmemcpy(tls, bp+8, + ts+129, uint32(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) + Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint32(4)) + da = bp + 56 /* &da4 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in{})) + sa1 = bp + 72 /* &sa4 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in{})) + } + var dpolicy uintptr = policyof(tls, bp+8) + var dscope int32 = scopeof(tls, bp+8) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) + var prefixlen int32 = 0 + var fd int32 = Xsocket(tls, family, 2|02000000, 17) + if fd >= 0 { + if !(Xconnect(tls, fd, da, dalen) != 0) { + key = key | 0x40000000 + if !(Xgetsockname(tls, fd, sa1, bp+88) != 0) { + if family == 2 { + Xmemcpy(tls, + bp+28+8+uintptr(12), + bp+72+4, uint32(4)) + } + if dscope == scopeof(tls, bp+28+8) { + key = key | 0x20000000 + } + if dlabel == labelof(tls, bp+28+8) { + key = key | 0x10000000 + } + prefixlen = prefixmatch(tls, bp+28+8, + bp+8) + } + } + Xclose(tls, fd) + } + key = key | dprec<<20 + key = key | (15-dscope)<<16 + key = key | prefixlen<<8 + key = key | (48-i)<<0 + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key + } + Xqsort(tls, buf, uint32(cnt), uint32(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr) int32 + }{addrcmp}))) + + //TODO pthread_setcancelstate(cs, 0); + + return cnt +} + +func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var line [128]uint8 + _ = line + var cnt int32 = 0 + var p uintptr + _ = p + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 54 /* "" */ + var port uint32 = uint32(0) + + switch socktype { + case 1: + switch proto { + case 0: + proto = 6 + fallthrough + case 6: + break + default: + return -8 + } + break + case 2: + switch proto { + case 0: + proto = 17 + fallthrough + case 17: + break + default: + return -8 + } + fallthrough + case 0: + break + default: + if name != 0 { + return -8 + } + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) + return 1 + } + + if name != 0 { + if !(int32(*(*uint8)(unsafe.Pointer(name))) != 0) { + return -8 + } + port = Xstrtoul(tls, name, bp, 10) + } + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0) { + if port > uint32(65535) { + return -8 + } + if proto != 17 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) + } + if proto != 6 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) + } + return cnt + } + + if flags&0x400 != 0 { + return -2 + } + + var l size_t = Xstrlen(tls, name) + _ = l + + Xabort(tls) //TODO- + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) switch (errno) { + // case ENOENT: + // case ENOTDIR: + // case EACCES: + // return EAI_SERVICE; + // default: + // return EAI_SYSTEM; + // } + + Xabort(tls) //TODO- + // while (fgets(line, sizeof line, f) && cnt < MAXSERVS) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // /* Find service name */ + // for(p=line; (p=strstr(p, name)); p++) { + // if (p>line && !isspace(p[-1])) continue; + // if (p[l] && !isspace(p[l])) continue; + // break; + // } + // if (!p) continue; + + // /* Skip past canonical name at beginning of line */ + // for (p=line; *p && !isspace(*p); p++); + + // port = strtoul(p, &z, 10); + // if (port > 65535 || z==p) continue; + // if (!strncmp(z, "/udp", 4)) { + // if (proto == IPPROTO_TCP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_DGRAM; + // buf[cnt++].proto = IPPROTO_UDP; + // } + // if (!strncmp(z, "/tcp", 4)) { + // if (proto == IPPROTO_UDP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_STREAM; + // buf[cnt++].proto = IPPROTO_TCP; + // } + // } + // __fclose_ca(f); + // return cnt > 0 ? cnt : EAI_SERVICE; + Xabort(tls) + return int32(0) //TODO- +} + +func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ + *(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { + (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint32(0)) + } + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+28, AssignPtrUintptr(f+16, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { + *(*uint32)(unsafe.Pointer(f)) |= uint32(32) + return -1 + } + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+8, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { + return -1 + } + return 0 +} + +func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */ + X__builtin_abort(tls) //TODO- + // __stdio_exit_needed(); +} + +// This function assumes it will never be called if there is already +// data buffered for reading. + +func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ + bp := tls.Alloc(1) + defer tls.Free(1) + + // var c uint8 at bp, 1 + + if !(X__toread(tls, f) != 0) && (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint32(1)) == size_t(1) { + return int32(*(*uint8)(unsafe.Pointer(bp))) + } + return -1 +} + +func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ + var try uintptr + var sign int32 + for nel > size_t(0) { + try = base + uintptr(width*(nel/size_t(2))) + sign = (*struct { + f func(*TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) + if sign < 0 { + nel = nel / size_t(2) + } else if sign > 0 { + base = try + uintptr(width) + nel = nel - (nel/size_t(2) + size_t(1)) + } else { + return try + } + } + return uintptr(0) +} + +func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + // var f FILE at bp, 144 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y float64 = X__floatscan(tls, bp, prec, 1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) + if p != 0 { + *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { + if cnt != 0 { + return s + uintptr(cnt) + } + return s + }() + } + return y +} + +func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */ + return float32(strtox(tls, s, p, 0)) +} + +func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */ + return strtox(tls, s, p, 1) +} + +func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */ + return strtox(tls, s, p, 2) +} + +func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* strtol.c:8:27: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + // var f FILE at bp, 144 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) + if p != 0 { + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1)) + *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) + } + return y +} + +func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */ + return strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1)) +} + +func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:26:11: */ + return int64(strtox1(tls, s, p, base, Uint64FromInt64(-0x7fffffffffffffff-int64(1)))) +} + +func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) uint32 { /* strtol.c:31:15: */ + return uint32(strtox1(tls, s, p, base, uint64(2*uint32(0x7fffffff)+uint32(1)))) +} + +func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) int32 { /* strtol.c:36:6: */ + return int32(strtox1(tls, s, p, base, uint64(0+Uint32FromInt32(Int32(-Int32(0x7fffffff))-Int32FromInt32(1))))) +} + +func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) intmax_t { /* strtol.c:41:10: */ + return Xstrtoll(tls, s, p, base) +} + +func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */ + return Xstrtoull(tls, s, p, base) +} + +func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */ + var l size_t = Xstrlen(tls, s) + var d uintptr = Xmalloc(tls, l+size_t(1)) + if !(d != 0) { + return uintptr(0) + } + return Xmemcpy(tls, d, s, l+size_t(1)) +} + +func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */ + var p uintptr = Xmemchr(tls, s, 0, n) + if p != 0 { + return uint32((int32(p) - int32(s)) / 1) + } + return n +} + +func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var a uintptr = s + *(*[8]size_t)(unsafe.Pointer(bp /* byteset */)) = [8]size_t{0: size_t(0)} + + if !(int32(*(*uint8)(unsafe.Pointer(c))) != 0) { + return size_t(0) + } + if !(int32(*(*uint8)(unsafe.Pointer(c + 1))) != 0) { + for ; int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c))); s++ { + } + return size_t((int32(s) - int32(a)) / 1) + } + + for ; *(*uint8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint32(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4, size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; c++ { + } + for ; *(*uint8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4))&(size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; s++ { + } + return size_t((int32(s) - int32(a)) / 1) +} + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.cpp.c:4092:41: +} + +var ts1 = "RuneMagi\x00NONE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/libc/musl_freebsd_arm64.go b/vendor/modernc.org/libc/musl_freebsd_arm64.go new file mode 100644 index 00000000..ae1a70af --- /dev/null +++ b/vendor/modernc.org/libc/musl_freebsd_arm64.go @@ -0,0 +1,6855 @@ +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. + +package libc + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +// musl as a whole is licensed under the following standard MIT license: +// +// ---------------------------------------------------------------------- +// Copyright © 2005-2020 Rich Felker, et al. +// +// 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. +// ---------------------------------------------------------------------- +// +// Authors/contributors include: +// +// A. Wilcox +// Ada Worcester +// Alex Dowad +// Alex Suykov +// Alexander Monakov +// Andre McCurdy +// Andrew Kelley +// Anthony G. Basile +// Aric Belsito +// Arvid Picciani +// Bartosz Brachaczek +// Benjamin Peterson +// Bobby Bingham +// Boris Brezillon +// Brent Cook +// Chris Spiegel +// Clément Vasseur +// Daniel Micay +// Daniel Sabogal +// Daurnimator +// David Carlier +// David Edelsohn +// Denys Vlasenko +// Dmitry Ivanov +// Dmitry V. Levin +// Drew DeVault +// Emil Renner Berthing +// Fangrui Song +// Felix Fietkau +// Felix Janda +// Gianluca Anzolin +// Hauke Mehrtens +// He X +// Hiltjo Posthuma +// Isaac Dunham +// Jaydeep Patil +// Jens Gustedt +// Jeremy Huntwork +// Jo-Philipp Wich +// Joakim Sindholt +// John Spencer +// Julien Ramseier +// Justin Cormack +// Kaarle Ritvanen +// Khem Raj +// Kylie McClain +// Leah Neukirchen +// Luca Barbato +// Luka Perkov +// M Farkas-Dyck (Strake) +// Mahesh Bodapati +// Markus Wichmann +// Masanori Ogino +// Michael Clark +// Michael Forney +// Mikhail Kremnyov +// Natanael Copa +// Nicholas J. Kain +// orc +// Pascal Cuoq +// Patrick Oppenlander +// Petr Hosek +// Petr Skocik +// Pierre Carrier +// Reini Urban +// Rich Felker +// Richard Pennington +// Ryan Fairfax +// Samuel Holland +// Segev Finer +// Shiz +// sin +// Solar Designer +// Stefan Kristiansson +// Stefan O'Rear +// Szabolcs Nagy +// Timo Teräs +// Trutz Behn +// Valentin Ochs +// Will Dietz +// William Haddon +// William Pitcock +// +// Portions of this software are derived from third-party works licensed +// under terms compatible with the above MIT license: +// +// The TRE regular expression implementation (src/regex/reg* and +// src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +// under a 2-clause BSD license (license text in the source files). The +// included version has been heavily modified by Rich Felker in 2012, in +// the interests of size, simplicity, and namespace cleanliness. +// +// Much of the math library code (src/math/* and src/complex/*) is +// Copyright © 1993,2004 Sun Microsystems or +// Copyright © 2003-2011 David Schultz or +// Copyright © 2003-2009 Steven G. Kargl or +// Copyright © 2003-2009 Bruce D. Evans or +// Copyright © 2008 Stephen L. Moshier or +// Copyright © 2017-2018 Arm Limited +// and labelled as such in comments in the individual source files. All +// have been licensed under extremely permissive terms. +// +// The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +// The Android Open Source Project and is licensed under a two-clause BSD +// license. It was taken from Bionic libc, used on Android. +// +// The AArch64 memcpy and memset code (src/string/aarch64/*) are +// Copyright © 1999-2019, Arm Limited. +// +// The implementation of DES for crypt (src/crypt/crypt_des.c) is +// Copyright © 1994 David Burren. It is licensed under a BSD license. +// +// The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +// originally written by Solar Designer and placed into the public +// domain. The code also comes with a fallback permissive license for use +// in jurisdictions that may not recognize the public domain. +// +// The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +// Valentin Ochs and is licensed under an MIT-style license. +// +// The x86_64 port was written by Nicholas J. Kain and is licensed under +// the standard MIT terms. +// +// The mips and microblaze ports were originally written by Richard +// Pennington for use in the ellcc project. The original code was adapted +// by Rich Felker for build system and code conventions during upstream +// integration. It is licensed under the standard MIT terms. +// +// The mips64 port was contributed by Imagination Technologies and is +// licensed under the standard MIT terms. +// +// The powerpc port was also originally written by Richard Pennington, +// and later supplemented and integrated by John Spencer. It is licensed +// under the standard MIT terms. +// +// All other files which have no copyright comments are original works +// produced specifically for use as part of this library, written either +// by Rich Felker, the main author of the library, or by one or more +// contibutors listed above. Details on authorship of individual files +// can be found in the git version control history of the project. The +// omission of copyright and license comments in each file is in the +// interest of source tree size. +// +// In addition, permission is hereby granted for all public header files +// (include/* and arch/*/bits/*) and crt files intended to be linked into +// applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +// the copyright notice and permission notice otherwise required by the +// license, and to use these files without any requirement of +// attribution. These files include substantial contributions from: +// +// Bobby Bingham +// John Spencer +// Nicholas J. Kain +// Rich Felker +// Richard Pennington +// Stefan Kristiansson +// Szabolcs Nagy +// +// all of whom have explicitly granted such permission. +// +// This file previously contained text expressing a belief that most of +// the files covered by the above exception were sufficiently trivial not +// to be subject to copyright, resulting in confusion over whether it +// negated the permissions granted in the license. In the spirit of +// permissive licensing, and of not having licensing issues being an +// obstacle to adoption, that text has been removed. +const ( /* copyright.c:194:1: */ + __musl__copyright__ = 0 +) + +const ( /* nameser.h:117:1: */ + ns_uop_delete = 0 + ns_uop_add = 1 + ns_uop_max = 2 +) + +const ( /* nameser.h:147:1: */ + ns_t_invalid = 0 + ns_t_a = 1 + ns_t_ns = 2 + ns_t_md = 3 + ns_t_mf = 4 + ns_t_cname = 5 + ns_t_soa = 6 + ns_t_mb = 7 + ns_t_mg = 8 + ns_t_mr = 9 + ns_t_null = 10 + ns_t_wks = 11 + ns_t_ptr = 12 + ns_t_hinfo = 13 + ns_t_minfo = 14 + ns_t_mx = 15 + ns_t_txt = 16 + ns_t_rp = 17 + ns_t_afsdb = 18 + ns_t_x25 = 19 + ns_t_isdn = 20 + ns_t_rt = 21 + ns_t_nsap = 22 + ns_t_nsap_ptr = 23 + ns_t_sig = 24 + ns_t_key = 25 + ns_t_px = 26 + ns_t_gpos = 27 + ns_t_aaaa = 28 + ns_t_loc = 29 + ns_t_nxt = 30 + ns_t_eid = 31 + ns_t_nimloc = 32 + ns_t_srv = 33 + ns_t_atma = 34 + ns_t_naptr = 35 + ns_t_kx = 36 + ns_t_cert = 37 + ns_t_a6 = 38 + ns_t_dname = 39 + ns_t_sink = 40 + ns_t_opt = 41 + ns_t_apl = 42 + ns_t_tkey = 249 + ns_t_tsig = 250 + ns_t_ixfr = 251 + ns_t_axfr = 252 + ns_t_mailb = 253 + ns_t_maila = 254 + ns_t_any = 255 + ns_t_zxfr = 256 + ns_t_max = 65536 +) + +const ( /* nameser.h:210:1: */ + ns_c_invalid = 0 + ns_c_in = 1 + ns_c_2 = 2 + ns_c_chaos = 3 + ns_c_hs = 4 + ns_c_none = 254 + ns_c_any = 255 + ns_c_max = 65536 +) + +const ( /* nameser.h:221:1: */ + ns_kt_rsa = 1 + ns_kt_dh = 2 + ns_kt_dsa = 3 + ns_kt_private = 254 +) + +const ( /* nameser.h:228:1: */ + cert_t_pkix = 1 + cert_t_spki = 2 + cert_t_pgp = 3 + cert_t_url = 253 + cert_t_oid = 254 +) + +const ( /* nameser.h:28:1: */ + ns_s_qd = 0 + ns_s_zn = 0 + ns_s_an = 1 + ns_s_pr = 1 + ns_s_ns = 2 + ns_s_ud = 2 + ns_s_ar = 3 + ns_s_max = 4 +) + +const ( /* nameser.h:75:1: */ + ns_f_qr = 0 + ns_f_opcode = 1 + ns_f_aa = 2 + ns_f_tc = 3 + ns_f_rd = 4 + ns_f_ra = 5 + ns_f_z = 6 + ns_f_ad = 7 + ns_f_cd = 8 + ns_f_rcode = 9 + ns_f_max = 10 +) + +const ( /* nameser.h:89:1: */ + ns_o_query = 0 + ns_o_iquery = 1 + ns_o_status = 2 + ns_o_notify = 4 + ns_o_update = 5 + ns_o_max = 6 +) + +const ( /* nameser.h:98:1: */ + ns_r_noerror = 0 + ns_r_formerr = 1 + ns_r_servfail = 2 + ns_r_nxdomain = 3 + ns_r_notimpl = 4 + ns_r_refused = 5 + ns_r_yxdomain = 6 + ns_r_yxrrset = 7 + ns_r_nxrrset = 8 + ns_r_notauth = 9 + ns_r_notzone = 10 + ns_r_max = 11 + ns_r_badvers = 16 + ns_r_badsig = 16 + ns_r_badkey = 17 + ns_r_badtime = 18 +) + +type ptrdiff_t = int64 /* <builtin>:3:26 */ + +type size_t = uint64 /* <builtin>:9:23 */ + +type wchar_t = int32 /* <builtin>:15:24 */ + +/// typedef __ct_rune_t __wint_t; +/// +/// +/// +/// typedef __uint_least16_t __char16_t; +/// typedef __uint_least32_t __char32_t; +/// +/// +/// +/// +/// +/// +/// +/// typedef struct { +/// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); +/// +/// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); +/// +/// } __max_align_t; +/// +/// typedef __uint64_t __dev_t; +/// +/// typedef __uint32_t __fixpt_t; +/// +/// +/// +/// +/// +/// typedef union { +/// char __mbstate8[128]; +/// __int64_t _mbstateL; +/// } __mbstate_t; +/// +/// typedef __uintmax_t __rman_res_t; +/// +/// +/// +/// +/// +/// +/// typedef __builtin_va_list __va_list; +/// +/// +/// +/// +/// +/// +/// typedef __va_list __gnuc_va_list; +/// +/// +/// +/// +/// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); +/// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); +/// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); +/// +/// +/// extern int __mb_sb_limit; + +type _RuneEntry = struct { + F__min int32 + F__max int32 + F__map int32 + F__ccgo_pad1 [4]byte + F__types uintptr +} /* table.cpp.c:290:3 */ + +type _RuneRange = struct { + F__nranges int32 + F__ccgo_pad1 [4]byte + F__ranges uintptr +} /* table.cpp.c:295:3 */ + +type _RuneLocale = struct { + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune int32 + F__ccgo_pad1 [4]byte + F__runetype [256]uint64 + F__maplower [256]int32 + F__mapupper [256]int32 + F__runetype_ext _RuneRange + F__maplower_ext _RuneRange + F__mapupper_ext _RuneRange + F__variable uintptr + F__variable_len int32 + F__ccgo_pad2 [4]byte +} /* table.cpp.c:320:3 */ +/// +/// extern const _RuneLocale _DefaultRuneLocale; +/// extern const _RuneLocale *_CurrentRuneLocale; +/// +/// +/// +/// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; +/// static __inline const _RuneLocale *__getCurrentRuneLocale(void) +/// { +/// +/// if (_ThreadRuneLocale) +/// return _ThreadRuneLocale; +/// return _CurrentRuneLocale; +/// } +/// +/// +/// +/// +/// +/// static __inline int +/// __maskrune(__ct_rune_t _c, unsigned long _f) +/// { +/// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : +/// (__getCurrentRuneLocale())->__runetype[_c]) & _f; +/// } +/// +/// static __inline int +/// __sbmaskrune(__ct_rune_t _c, unsigned long _f) +/// { +/// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : +/// (__getCurrentRuneLocale())->__runetype[_c] & _f; +/// } +/// +/// static __inline int +/// __istype(__ct_rune_t _c, unsigned long _f) +/// { +/// return (!!__maskrune(_c, _f)); +/// } +/// +/// static __inline int +/// __sbistype(__ct_rune_t _c, unsigned long _f) +/// { +/// return (!!__sbmaskrune(_c, _f)); +/// } +/// +/// static __inline int +/// __isctype(__ct_rune_t _c, unsigned long _f) +/// { +/// return (_c < 0 || _c >= 128) ? 0 : +/// !!(_DefaultRuneLocale.__runetype[_c] & _f); +/// } +/// +/// static __inline __ct_rune_t +/// __toupper(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : +/// (__getCurrentRuneLocale())->__mapupper[_c]; +/// } +/// +/// static __inline __ct_rune_t +/// __sbtoupper(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : +/// (__getCurrentRuneLocale())->__mapupper[_c]; +/// } +/// +/// static __inline __ct_rune_t +/// __tolower(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : +/// (__getCurrentRuneLocale())->__maplower[_c]; +/// } +/// +/// static __inline __ct_rune_t +/// __sbtolower(__ct_rune_t _c) +/// { +/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : +/// (__getCurrentRuneLocale())->__maplower[_c]; +/// } +/// +/// static __inline int +/// __wcwidth(__ct_rune_t _c) +/// { +/// unsigned int _x; +/// +/// if (_c == 0) +/// return (0); +/// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); +/// if ((_x & 0xe0000000L) != 0) +/// return ((_x & 0xe0000000L) >> 30); +/// return ((_x & 0x00040000L) != 0 ? 1 : -1); +/// } +/// +/// +/// +/// 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); +/// +/// +/// int isascii(int); +/// int toascii(int); +/// +/// +/// +/// int isblank(int); +/// +/// +/// +/// int digittoint(int); +/// int ishexnumber(int); +/// int isideogram(int); +/// int isnumber(int); +/// int isphonogram(int); +/// int isrune(int); +/// int isspecial(int); +/// +/// +/// +/// +/// +/// typedef struct _xlocale *locale_t; +/// +/// +/// +/// +/// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); +/// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); +/// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); +/// _RuneLocale *__runes_for_locale(locale_t, int*); +/// +/// inline int +/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +/// inline int +/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +/// +/// inline int +/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +/// { +/// int __limit; +/// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); +/// return (__c < 0 || __c >= __limit) ? 0 : +/// runes->__runetype[__c] & __f; +/// } +/// +/// inline int +/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) +/// { +/// return (!!__sbmaskrune_l(__c, __f, __loc)); +/// } +/// +/// +/// +/// +/// +/// +/// +/// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } +/// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } +/// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } +/// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } +/// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } +/// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } +/// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } +/// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } +/// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } +/// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } +/// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } +/// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } +/// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } +/// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } +/// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } +/// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } +/// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } +/// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } +/// +/// inline int digittoint_l(int, locale_t); +/// inline int tolower_l(int, locale_t); +/// inline int toupper_l(int, locale_t); +/// +/// inline int digittoint_l(int __c, locale_t __l) +/// { return __sbmaskrune_l((__c), 0xFF, __l); } +/// +/// inline int tolower_l(int __c, locale_t __l) +/// { +/// int __limit; +/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); +/// return (__c < 0 || __c >= __limit) ? __c : +/// __runes->__maplower[__c]; +/// } +/// inline int toupper_l(int __c, locale_t __l) +/// { +/// int __limit; +/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); +/// return (__c < 0 || __c >= __limit) ? __c : +/// __runes->__mapupper[__c]; +/// } +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// typedef __mbstate_t mbstate_t; +/// +/// +/// +/// +/// typedef __size_t size_t; +/// +/// +/// +/// +/// +/// typedef __va_list va_list; +/// +/// +/// +/// +/// +/// +/// typedef ___wchar_t wchar_t; +/// +/// +/// +/// +/// +/// typedef __wint_t wint_t; +/// +/// typedef struct __sFILE FILE; +/// +/// struct tm; +/// +/// +/// wint_t btowc(int); +/// wint_t fgetwc(FILE *); +/// wchar_t * +/// fgetws(wchar_t * restrict, int, FILE * restrict); +/// wint_t fputwc(wchar_t, FILE *); +/// int fputws(const wchar_t * restrict, FILE * restrict); +/// int fwide(FILE *, int); +/// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); +/// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); +/// wint_t getwc(FILE *); +/// wint_t getwchar(void); +/// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); +/// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, +/// mbstate_t * restrict); +/// int mbsinit(const mbstate_t *); +/// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, +/// mbstate_t * restrict); +/// wint_t putwc(wchar_t, FILE *); +/// wint_t putwchar(wchar_t); +/// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, +/// ...); +/// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); +/// wint_t ungetwc(wint_t, FILE *); +/// int vfwprintf(FILE * restrict, const wchar_t * restrict, +/// __va_list); +/// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, +/// __va_list); +/// int vwprintf(const wchar_t * restrict, __va_list); +/// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); +/// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); +/// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); +/// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// int wcscoll(const wchar_t *, const wchar_t *); +/// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); +/// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, +/// const struct tm * restrict); +/// size_t wcslen(const wchar_t *) __attribute__((__pure__)); +/// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, +/// size_t); +/// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); +/// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); +/// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); +/// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, +/// mbstate_t * restrict); +/// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); +/// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) +/// __attribute__((__pure__)); +/// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); +/// int wctob(wint_t); +/// double wcstod(const wchar_t * restrict, wchar_t ** restrict); +/// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, +/// wchar_t ** restrict); +/// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); +/// unsigned long +/// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); +/// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); +/// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); +/// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); +/// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); +/// wchar_t *wmemset(wchar_t *, wchar_t, size_t); +/// int wprintf(const wchar_t * restrict, ...); +/// int wscanf(const wchar_t * restrict, ...); +/// +/// +/// extern FILE *__stdinp; +/// extern FILE *__stdoutp; +/// extern FILE *__stderrp; +/// +/// int vfwscanf(FILE * restrict, const wchar_t * restrict, +/// __va_list); +/// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, +/// __va_list); +/// int vwscanf(const wchar_t * restrict, __va_list); +/// float wcstof(const wchar_t * restrict, wchar_t ** restrict); +/// long double +/// wcstold(const wchar_t * restrict, wchar_t ** restrict); +/// +/// +/// long long +/// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); +/// +/// unsigned long long +/// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); +/// +/// +/// +/// +/// int wcswidth(const wchar_t *, size_t); +/// int wcwidth(wchar_t); +/// +/// +/// +/// +/// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, +/// size_t, mbstate_t * restrict); +/// FILE *open_wmemstream(wchar_t **, size_t *); +/// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); +/// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); +/// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); +/// int wcscasecmp(const wchar_t *, const wchar_t *); +/// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); +/// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); +/// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, +/// size_t, mbstate_t * restrict); +/// +/// +/// +/// wchar_t *fgetwln(FILE * restrict, size_t * restrict); +/// size_t wcslcat(wchar_t *, const wchar_t *, size_t); +/// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); +/// +/// +/// +/// +/// +/// int wcscasecmp_l(const wchar_t *, const wchar_t *, +/// locale_t); +/// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, +/// locale_t); +/// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); +/// size_t wcsxfrm_l(wchar_t * restrict, +/// const wchar_t * restrict, size_t, locale_t); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// struct lconv { +/// char *decimal_point; +/// char *thousands_sep; +/// char *grouping; +/// char *int_curr_symbol; +/// char *currency_symbol; +/// char *mon_decimal_point; +/// char *mon_thousands_sep; +/// char *mon_grouping; +/// char *positive_sign; +/// char *negative_sign; +/// char int_frac_digits; +/// char frac_digits; +/// char p_cs_precedes; +/// char p_sep_by_space; +/// char n_cs_precedes; +/// char n_sep_by_space; +/// char p_sign_posn; +/// char n_sign_posn; +/// char int_p_cs_precedes; +/// char int_n_cs_precedes; +/// char int_p_sep_by_space; +/// char int_n_sep_by_space; +/// char int_p_sign_posn; +/// char int_n_sign_posn; +/// }; +/// +/// +/// struct lconv *localeconv(void); +/// char *setlocale(int, const char *); +/// +/// +/// +/// +/// locale_t duplocale(locale_t base); +/// void freelocale(locale_t loc); +/// locale_t newlocale(int mask, const char *locale, locale_t base); +/// const char *querylocale(int mask, locale_t loc); +/// locale_t uselocale(locale_t loc); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// wint_t btowc_l(int, locale_t); +/// wint_t fgetwc_l(FILE *, locale_t); +/// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, +/// locale_t); +/// wint_t fputwc_l(wchar_t, FILE *, locale_t); +/// int fputws_l(const wchar_t * restrict, FILE * restrict, +/// locale_t); +/// int fwprintf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, ...); +/// int fwscanf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, ...); +/// wint_t getwc_l(FILE *, locale_t); +/// wint_t getwchar_l(locale_t); +/// size_t mbrlen_l(const char * restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// size_t mbrtowc_l(wchar_t * restrict, +/// const char * restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// int mbsinit_l(const mbstate_t *, locale_t); +/// size_t mbsrtowcs_l(wchar_t * restrict, +/// const char ** restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// wint_t putwc_l(wchar_t, FILE *, locale_t); +/// wint_t putwchar_l(wchar_t, locale_t); +/// int swprintf_l(wchar_t * restrict, size_t n, locale_t, +/// const wchar_t * restrict, ...); +/// int swscanf_l(const wchar_t * restrict, locale_t, +/// const wchar_t * restrict, ...); +/// wint_t ungetwc_l(wint_t, FILE *, locale_t); +/// int vfwprintf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, __va_list); +/// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, +/// const wchar_t * restrict, __va_list); +/// int vwprintf_l(locale_t, const wchar_t * restrict, +/// __va_list); +/// size_t wcrtomb_l(char * restrict, wchar_t, +/// mbstate_t * restrict, locale_t); +/// size_t wcsftime_l(wchar_t * restrict, size_t, +/// const wchar_t * restrict, +/// const struct tm * restrict, locale_t); +/// size_t wcsrtombs_l(char * restrict, +/// const wchar_t ** restrict, size_t, +/// mbstate_t * restrict, locale_t); +/// double wcstod_l(const wchar_t * restrict, +/// wchar_t ** restrict, locale_t); +/// long wcstol_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// unsigned long wcstoul_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// int wcswidth_l(const wchar_t *, size_t, locale_t); +/// int wctob_l(wint_t, locale_t); +/// int wcwidth_l(wchar_t, locale_t); +/// int wprintf_l(locale_t, const wchar_t * restrict, ...); +/// int wscanf_l(locale_t, const wchar_t * restrict, ...); +/// int vfwscanf_l(FILE * restrict, locale_t, +/// const wchar_t * restrict, __va_list); +/// int vswscanf_l(const wchar_t * restrict, locale_t, +/// const wchar_t *restrict, __va_list); +/// int vwscanf_l(locale_t, const wchar_t * restrict, +/// __va_list); +/// float wcstof_l(const wchar_t * restrict, +/// wchar_t ** restrict, locale_t); +/// long double wcstold_l(const wchar_t * restrict, +/// wchar_t ** restrict, locale_t); +/// long long wcstoll_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// unsigned long long wcstoull_l(const wchar_t * restrict, +/// wchar_t ** restrict, int, locale_t); +/// size_t mbsnrtowcs_l(wchar_t * restrict, +/// const char ** restrict, size_t, size_t, +/// mbstate_t * restrict, locale_t); +/// size_t wcsnrtombs_l(char * restrict, +/// const wchar_t ** restrict, size_t, size_t, +/// mbstate_t * restrict, locale_t); +/// +/// +/// +/// +/// +/// struct lconv *localeconv_l(locale_t); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// typedef __rune_t rune_t; +/// +/// typedef struct { +/// int quot; +/// int rem; +/// } div_t; +/// +/// typedef struct { +/// long quot; +/// long rem; +/// } ldiv_t; +/// +/// +/// +/// +/// +/// double atof_l(const char *, locale_t); +/// int atoi_l(const char *, locale_t); +/// long atol_l(const char *, locale_t); +/// long long atoll_l(const char *, locale_t); +/// int mblen_l(const char *, size_t, locale_t); +/// size_t mbstowcs_l(wchar_t * restrict, +/// const char * restrict, size_t, locale_t); +/// int mbtowc_l(wchar_t * restrict, +/// const char * restrict, size_t, locale_t); +/// double strtod_l(const char *, char **, locale_t); +/// float strtof_l(const char *, char **, locale_t); +/// long strtol_l(const char *, char **, int, locale_t); +/// long double strtold_l(const char *, char **, locale_t); +/// long long strtoll_l(const char *, char **, int, locale_t); +/// unsigned long strtoul_l(const char *, char **, int, locale_t); +/// unsigned long long strtoull_l(const char *, char **, int, locale_t); +/// size_t wcstombs_l(char * restrict, +/// const wchar_t * restrict, size_t, locale_t); +/// int wctomb_l(char *, wchar_t, locale_t); +/// +/// int ___mb_cur_max_l(locale_t); +/// +/// +/// extern int __mb_cur_max; +/// extern int ___mb_cur_max(void); +/// +/// +/// _Noreturn void abort(void); +/// int abs(int) __attribute__((__const__)); +/// int atexit(void (* )(void)); +/// double atof(const char *); +/// int atoi(const char *); +/// long atol(const char *); +/// void *bsearch(const void *, const void *, size_t, +/// size_t, int (*)(const void * , const void *)); +/// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) +/// __attribute__((__alloc_size__(1, 2))); +/// div_t div(int, int) __attribute__((__const__)); +/// _Noreturn void exit(int); +/// void free(void *); +/// char *getenv(const char *); +/// long labs(long) __attribute__((__const__)); +/// ldiv_t ldiv(long, long) __attribute__((__const__)); +/// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); +/// int mblen(const char *, size_t); +/// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); +/// int mbtowc(wchar_t * restrict, const char * restrict, size_t); +/// void qsort(void *, size_t, size_t, +/// int (* )(const void *, const void *)); +/// int rand(void); +/// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); +/// void srand(unsigned); +/// double strtod(const char * restrict, char ** restrict); +/// float strtof(const char * restrict, char ** restrict); +/// long strtol(const char * restrict, char ** restrict, int); +/// long double +/// strtold(const char * restrict, char ** restrict); +/// unsigned long +/// strtoul(const char * restrict, char ** restrict, int); +/// int system(const char *); +/// int wctomb(char *, wchar_t); +/// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); +/// +/// typedef struct { +/// long long quot; +/// long long rem; +/// } lldiv_t; +/// +/// +/// long long +/// atoll(const char *); +/// +/// long long +/// llabs(long long) __attribute__((__const__)); +/// +/// lldiv_t lldiv(long long, long long) __attribute__((__const__)); +/// +/// long long +/// strtoll(const char * restrict, char ** restrict, int); +/// +/// unsigned long long +/// strtoull(const char * restrict, char ** restrict, int); +/// +/// +/// _Noreturn void _Exit(int); +/// +/// +/// +/// +/// +/// +/// void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) +/// __attribute__((__alloc_size__(2))); +/// int at_quick_exit(void (*)(void)); +/// _Noreturn void +/// quick_exit(int); +/// +/// +/// +/// +/// +/// char *realpath(const char * restrict, char * restrict); +/// +/// +/// int rand_r(unsigned *); +/// +/// +/// int posix_memalign(void **, size_t, size_t); +/// int setenv(const char *, const char *, int); +/// int unsetenv(const char *); +/// +/// +/// +/// int getsubopt(char **, char *const *, char **); +/// +/// char *mkdtemp(char *); +/// +/// +/// +/// int mkstemp(char *); +/// +/// long a64l(const char *); +/// double drand48(void); +/// +/// double erand48(unsigned short[3]); +/// +/// +/// char *initstate(unsigned int, char *, size_t); +/// long jrand48(unsigned short[3]); +/// char *l64a(long); +/// void lcong48(unsigned short[7]); +/// long lrand48(void); +/// +/// char *mktemp(char *); +/// +/// +/// long mrand48(void); +/// long nrand48(unsigned short[3]); +/// int putenv(char *); +/// long random(void); +/// unsigned short +/// *seed48(unsigned short[3]); +/// char *setstate( char *); +/// void srand48(long); +/// void srandom(unsigned int); +/// +/// +/// +/// int grantpt(int); +/// int posix_openpt(int); +/// char *ptsname(int); +/// int unlockpt(int); +/// +/// +/// +/// int ptsname_r(int, char *, size_t); +/// +/// +/// +/// extern const char *malloc_conf; +/// extern void (*malloc_message)(void *, const char *); +/// +/// void abort2(const char *, int, void **) __attribute__((__noreturn__)); +/// __uint32_t +/// arc4random(void); +/// void arc4random_buf(void *, size_t); +/// __uint32_t +/// arc4random_uniform(__uint32_t); +/// +/// +/// +/// +/// +/// +/// char *getbsize(int *, long *); +/// +/// char *cgetcap(char *, const char *, int); +/// int cgetclose(void); +/// int cgetent(char **, char **, const char *); +/// int cgetfirst(char **, char **); +/// int cgetmatch(const char *, const char *); +/// int cgetnext(char **, char **); +/// int cgetnum(char *, const char *, long *); +/// int cgetset(const char *); +/// int cgetstr(char *, const char *, char **); +/// int cgetustr(char *, const char *, char **); +/// +/// int daemon(int, int); +/// int daemonfd(int, int); +/// char *devname(__dev_t, __mode_t); +/// char *devname_r(__dev_t, __mode_t, char *, int); +/// char *fdevname(int); +/// char *fdevname_r(int, char *, int); +/// int getloadavg(double [], int); +/// const char * +/// getprogname(void); +/// +/// int heapsort(void *, size_t, size_t, +/// int (* )(const void *, const void *)); +/// +/// +/// +/// +/// +/// +/// int l64a_r(long, char *, int); +/// int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); +/// +/// +/// +/// int mkostemp(char *, int); +/// int mkostemps(char *, int, int); +/// int mkostempsat(int, char *, int, int); +/// void qsort_r(void *, size_t, size_t, void *, +/// int (*)(void *, const void *, const void *)); +/// int radixsort(const unsigned char **, int, const unsigned char *, +/// unsigned); +/// void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) +/// __attribute__((__alloc_size__(2, 3))); +/// void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); +/// int rpmatch(const char *); +/// void setprogname(const char *); +/// int sradixsort(const unsigned char **, int, const unsigned char *, +/// unsigned); +/// void srandomdev(void); +/// long long +/// strtonum(const char *, long long, long long, const char **); +/// +/// +/// __int64_t +/// strtoq(const char *, char **, int); +/// __uint64_t +/// strtouq(const char *, char **, int); +/// +/// extern char *suboptarg; +/// +/// +/// +/// +/// +/// +/// typedef size_t rsize_t; +/// +/// +/// +/// +/// typedef int errno_t; +/// +/// +/// +/// typedef void (*constraint_handler_t)(const char * restrict, +/// void * restrict, errno_t); +/// +/// constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); +/// +/// _Noreturn void abort_handler_s(const char * restrict, void * restrict, +/// errno_t); +/// +/// void ignore_handler_s(const char * restrict, void * restrict, errno_t); +/// +/// errno_t qsort_s(void *, rsize_t, rsize_t, +/// int (*)(const void *, const void *, void *), void *); +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// typedef __int8_t int8_t; +/// +/// +/// +/// +/// typedef __int16_t int16_t; +/// +/// +/// +/// +/// typedef __int32_t int32_t; +/// +/// +/// +/// +/// typedef __int64_t int64_t; +/// +/// +/// +/// +/// typedef __uint8_t uint8_t; +/// +/// +/// +/// +/// typedef __uint16_t uint16_t; +/// +/// +/// +/// +/// typedef __uint32_t uint32_t; +/// +/// +/// +/// +/// typedef __uint64_t uint64_t; +/// +/// +/// +/// +/// typedef __intptr_t intptr_t; +/// +/// +/// +/// typedef __uintptr_t uintptr_t; +/// +/// +/// +/// typedef __intmax_t intmax_t; +/// +/// +/// +/// typedef __uintmax_t uintmax_t; +/// +/// +/// typedef __int_least8_t int_least8_t; +/// typedef __int_least16_t int_least16_t; +/// typedef __int_least32_t int_least32_t; +/// typedef __int_least64_t int_least64_t; +/// +/// typedef __uint_least8_t uint_least8_t; +/// typedef __uint_least16_t uint_least16_t; +/// typedef __uint_least32_t uint_least32_t; +/// typedef __uint_least64_t uint_least64_t; +/// +/// typedef __int_fast8_t int_fast8_t; +/// typedef __int_fast16_t int_fast16_t; +/// typedef __int_fast32_t int_fast32_t; +/// typedef __int_fast64_t int_fast64_t; +/// +/// typedef __uint_fast8_t uint_fast8_t; +/// typedef __uint_fast16_t uint_fast16_t; +/// typedef __uint_fast32_t uint_fast32_t; +/// typedef __uint_fast64_t uint_fast64_t; +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// struct pthread; +/// struct pthread_attr; +/// struct pthread_cond; +/// struct pthread_cond_attr; +/// struct pthread_mutex; +/// struct pthread_mutex_attr; +/// struct pthread_once; +/// struct pthread_rwlock; +/// struct pthread_rwlockattr; +/// struct pthread_barrier; +/// struct pthread_barrier_attr; +/// struct pthread_spinlock; +/// +/// typedef struct pthread *pthread_t; +/// +/// +/// typedef struct pthread_attr *pthread_attr_t; +/// typedef struct pthread_mutex *pthread_mutex_t; +/// typedef struct pthread_mutex_attr *pthread_mutexattr_t; +/// typedef struct pthread_cond *pthread_cond_t; +/// typedef struct pthread_cond_attr *pthread_condattr_t; +/// typedef int pthread_key_t; +/// typedef struct pthread_once pthread_once_t; +/// typedef struct pthread_rwlock *pthread_rwlock_t; +/// typedef struct pthread_rwlockattr *pthread_rwlockattr_t; +/// typedef struct pthread_barrier *pthread_barrier_t; +/// typedef struct pthread_barrierattr *pthread_barrierattr_t; +/// typedef struct pthread_spinlock *pthread_spinlock_t; +/// +/// +/// +/// +/// +/// +/// +/// typedef void *pthread_addr_t; +/// typedef void *(*pthread_startroutine_t)(void *); +/// +/// +/// +/// +/// struct pthread_once { +/// int state; +/// pthread_mutex_t mutex; +/// }; +/// +/// +/// +/// typedef unsigned char u_char; +/// typedef unsigned short u_short; +/// typedef unsigned int u_int; +/// typedef unsigned long u_long; +/// +/// typedef unsigned short ushort; +/// typedef unsigned int uint; +/// +/// typedef __uint8_t u_int8_t; +/// typedef __uint16_t u_int16_t; +/// typedef __uint32_t u_int32_t; +/// typedef __uint64_t u_int64_t; +/// +/// typedef __uint64_t u_quad_t; +/// typedef __int64_t quad_t; +/// typedef quad_t * qaddr_t; +/// +/// typedef char * caddr_t; +/// typedef const char * c_caddr_t; +/// +/// +/// typedef __blksize_t blksize_t; +/// +/// +/// +/// typedef __cpuwhich_t cpuwhich_t; +/// typedef __cpulevel_t cpulevel_t; +/// typedef __cpusetid_t cpusetid_t; +/// +/// +/// typedef __blkcnt_t blkcnt_t; +/// +/// +/// +/// +/// typedef __clock_t clock_t; +/// +/// +/// +/// +/// typedef __clockid_t clockid_t; +/// +/// +/// +/// typedef __critical_t critical_t; +/// typedef __daddr_t daddr_t; +/// +/// +/// typedef __dev_t dev_t; +/// +/// +/// +/// +/// typedef __fflags_t fflags_t; +/// +/// +/// +/// typedef __fixpt_t fixpt_t; +/// +/// +/// typedef __fsblkcnt_t fsblkcnt_t; +/// typedef __fsfilcnt_t fsfilcnt_t; +/// +/// +/// +/// +/// typedef __gid_t gid_t; +/// +/// +/// +/// +/// typedef __uint32_t in_addr_t; +/// +/// +/// +/// +/// typedef __uint16_t in_port_t; +/// +/// +/// +/// +/// typedef __id_t id_t; +/// +/// +/// +/// +/// typedef __ino_t ino_t; +/// +/// +/// +/// +/// typedef __key_t key_t; +/// +/// +/// +/// +/// typedef __lwpid_t lwpid_t; +/// +/// +/// +/// +/// typedef __mode_t mode_t; +/// +/// +/// +/// +/// typedef __accmode_t accmode_t; +/// +/// +/// +/// +/// typedef __nlink_t nlink_t; +/// +/// +/// +/// +/// typedef __off_t off_t; +/// +/// +/// +/// +/// typedef __off64_t off64_t; +/// +/// +/// +/// +/// typedef __pid_t pid_t; +/// +/// +/// +/// typedef __register_t register_t; +/// +/// +/// typedef __rlim_t rlim_t; +/// +/// +/// +/// typedef __int64_t sbintime_t; +/// +/// typedef __segsz_t segsz_t; +/// +/// +/// +/// +/// +/// +/// +/// typedef __ssize_t ssize_t; +/// +/// +/// +/// +/// typedef __suseconds_t suseconds_t; +/// +/// +/// +/// +/// typedef __time_t time_t; +/// +/// +/// +/// +/// typedef __timer_t timer_t; +/// +/// +/// +/// +/// typedef __mqd_t mqd_t; +/// +/// +/// +/// typedef __u_register_t u_register_t; +/// +/// +/// typedef __uid_t uid_t; +/// +/// +/// +/// +/// typedef __useconds_t useconds_t; +/// +/// +/// +/// +/// +/// typedef unsigned long cap_ioctl_t; +/// +/// +/// +/// +/// struct cap_rights; +/// +/// typedef struct cap_rights cap_rights_t; +/// +/// typedef __uint64_t kpaddr_t; +/// typedef __uint64_t kvaddr_t; +/// typedef __uint64_t ksize_t; +/// typedef __int64_t kssize_t; +/// +/// typedef __vm_offset_t vm_offset_t; +/// typedef __uint64_t vm_ooffset_t; +/// typedef __vm_paddr_t vm_paddr_t; +/// typedef __uint64_t vm_pindex_t; +/// typedef __vm_size_t vm_size_t; +/// +/// typedef __rman_res_t rman_res_t; +/// +/// static __inline __uint16_t +/// __bitcount16(__uint16_t _x) +/// { +/// +/// _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); +/// _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); +/// _x = (_x + (_x >> 4)) & 0x0f0f; +/// _x = (_x + (_x >> 8)) & 0x00ff; +/// return (_x); +/// } +/// +/// static __inline __uint32_t +/// __bitcount32(__uint32_t _x) +/// { +/// +/// _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); +/// _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); +/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f; +/// _x = (_x + (_x >> 8)); +/// _x = (_x + (_x >> 16)) & 0x000000ff; +/// return (_x); +/// } +/// +/// +/// static __inline __uint64_t +/// __bitcount64(__uint64_t _x) +/// { +/// +/// _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); +/// _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); +/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; +/// _x = (_x + (_x >> 8)); +/// _x = (_x + (_x >> 16)); +/// _x = (_x + (_x >> 32)) & 0x000000ff; +/// return (_x); +/// } +/// +/// +/// +/// +/// +/// typedef struct __sigset { +/// __uint32_t __bits[4]; +/// } __sigset_t; +/// +/// +/// +/// struct timeval { +/// time_t tv_sec; +/// suseconds_t tv_usec; +/// }; +/// +/// +/// +/// +/// +/// struct timespec { +/// time_t tv_sec; +/// long tv_nsec; +/// }; +/// +/// +/// struct itimerspec { +/// struct timespec it_interval; +/// struct timespec it_value; +/// }; +/// +/// +/// typedef unsigned long __fd_mask; +/// +/// typedef __fd_mask fd_mask; +/// +/// +/// +/// +/// typedef __sigset_t sigset_t; +/// +/// typedef struct fd_set { +/// __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; +/// } fd_set; +/// +/// +/// int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, +/// const struct timespec *restrict, const sigset_t *restrict); +/// +/// +/// +/// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +/// +/// +/// +/// +/// static __inline int +/// __major(dev_t _d) +/// { +/// return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); +/// } +/// +/// static __inline int +/// __minor(dev_t _d) +/// { +/// return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); +/// } +/// +/// static __inline dev_t +/// __makedev(int _Major, int _Minor) +/// { +/// return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | +/// ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); +/// } +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// int ftruncate(int, off_t); +/// +/// +/// +/// off_t lseek(int, off_t, int); +/// +/// +/// +/// void * mmap(void *, size_t, int, int, int, off_t); +/// +/// +/// +/// int truncate(const char *, off_t); +/// +/// +/// +/// +/// +/// +/// +/// +/// static __inline int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// static __inline int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_short(volatile u_short *dst, u_short *expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// static __inline int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; +/// +/// +/// +/// +/// +/// static __inline u_int +/// atomic_fetchadd_int(volatile u_int *p, u_int v) +/// { +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " xaddl %0,%1 ; " +/// "# atomic_fetchadd_int" +/// : "+r" (v), +/// "+m" (*p) +/// : : "cc"); +/// return (v); +/// } +/// +/// +/// +/// +/// +/// static __inline u_long +/// atomic_fetchadd_long(volatile u_long *p, u_long v) +/// { +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " xaddq %0,%1 ; " +/// "# atomic_fetchadd_long" +/// : "+r" (v), +/// "+m" (*p) +/// : : "cc"); +/// return (v); +/// } +/// +/// static __inline int +/// atomic_testandset_int(volatile u_int *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btsl %2,%1 ; " +/// "# atomic_testandset_int" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Ir" (v & 0x1f) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline int +/// atomic_testandset_long(volatile u_long *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btsq %2,%1 ; " +/// "# atomic_testandset_long" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Jr" ((u_long)(v & 0x3f)) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline int +/// atomic_testandclear_int(volatile u_int *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btrl %2,%1 ; " +/// "# atomic_testandclear_int" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Ir" (v & 0x1f) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline int +/// atomic_testandclear_long(volatile u_long *p, u_int v) +/// { +/// u_char res; +/// +/// __asm volatile( +/// " " "lock ; " " " +/// " btrq %2,%1 ; " +/// "# atomic_testandclear_long" +/// : "=@ccc" (res), +/// "+m" (*p) +/// : "Jr" ((u_long)(v & 0x3f)) +/// : "cc"); +/// return (res); +/// } +/// +/// static __inline void +/// __storeload_barrier(void) +/// { +/// +/// __asm volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_acq(void) +/// { +/// +/// __asm volatile(" " : : : "memory"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_rel(void) +/// { +/// +/// __asm volatile(" " : : : "memory"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_acq_rel(void) +/// { +/// +/// __asm volatile(" " : : : "memory"); +/// } +/// +/// static __inline void +/// atomic_thread_fence_seq_cst(void) +/// { +/// +/// __storeload_barrier(); +/// } +/// +/// +/// +/// static __inline void atomic_set_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_set_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "cc"); } static __inline void atomic_clear_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_add_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_subtract_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; +/// +/// static __inline void atomic_set_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// +/// static __inline void atomic_set_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; +/// +/// static __inline void atomic_set_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_set_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_clear_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "cc"); } static __inline void atomic_clear_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_add_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_add_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; +/// static __inline void atomic_subtract_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_subtract_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; +/// +/// +/// +/// +/// +/// static __inline u_char atomic_load_acq_char(volatile u_char *p) { u_char res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_char(volatile u_char *p, u_char v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// static __inline u_short atomic_load_acq_short(volatile u_short *p) { u_short res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_short(volatile u_short *p, u_short v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// static __inline u_int atomic_load_acq_int(volatile u_int *p) { u_int res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_int(volatile u_int *p, u_int v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// static __inline u_long atomic_load_acq_long(volatile u_long *p) { u_long res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_long(volatile u_long *p, u_long v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; +/// +/// static __inline u_int +/// atomic_swap_int(volatile u_int *p, u_int v) +/// { +/// +/// __asm volatile( +/// " xchgl %1,%0 ; " +/// "# atomic_swap_int" +/// : "+r" (v), +/// "+m" (*p)); +/// return (v); +/// } +/// +/// static __inline u_long +/// atomic_swap_long(volatile u_long *p, u_long v) +/// { +/// +/// __asm volatile( +/// " xchgq %1,%0 ; " +/// "# atomic_swap_long" +/// : "+r" (v), +/// "+m" (*p)); +/// return (v); +/// } +/// +/// +/// +/// +/// +/// extern char *_PathLocale; +/// +/// int __detect_path_locale(void); +/// int __wrap_setrunelocale(const char *); +/// +/// +/// enum { +/// XLC_COLLATE = 0, +/// XLC_CTYPE, +/// XLC_MONETARY, +/// XLC_NUMERIC, +/// XLC_TIME, +/// XLC_MESSAGES, +/// XLC_LAST +/// }; +/// +/// _Static_assert(XLC_LAST - XLC_COLLATE == 6, "XLC values should be contiguous"); +/// _Static_assert(XLC_COLLATE == +/// +/// 1 +/// +/// - 1, +/// "XLC_COLLATE doesn't match the LC_COLLATE value."); +/// _Static_assert(XLC_CTYPE == +/// +/// 2 +/// +/// - 1, +/// "XLC_CTYPE doesn't match the LC_CTYPE value."); +/// _Static_assert(XLC_MONETARY == +/// +/// 3 +/// +/// - 1, +/// "XLC_MONETARY doesn't match the LC_MONETARY value."); +/// _Static_assert(XLC_NUMERIC == +/// +/// 4 +/// +/// - 1, +/// "XLC_NUMERIC doesn't match the LC_NUMERIC value."); +/// _Static_assert(XLC_TIME == +/// +/// 5 +/// +/// - 1, +/// "XLC_TIME doesn't match the LC_TIME value."); +/// _Static_assert(XLC_MESSAGES == +/// +/// 6 +/// +/// - 1, +/// "XLC_MESSAGES doesn't match the LC_MESSAGES value."); +/// +/// struct xlocale_refcounted { +/// +/// long retain_count; +/// +/// void(*destructor)(void*); +/// }; +/// +/// +/// +/// +/// +/// +/// +/// struct xlocale_component { +/// struct xlocale_refcounted header; +/// +/// char locale[31 +1]; +/// +/// char version[12]; +/// }; +/// +/// +/// +/// +/// struct _xlocale { +/// struct xlocale_refcounted header; +/// +/// struct xlocale_component *components[XLC_LAST]; +/// +/// +/// int monetary_locale_changed; +/// +/// +/// int using_monetary_locale; +/// +/// +/// int numeric_locale_changed; +/// +/// +/// int using_numeric_locale; +/// +/// +/// int using_time_locale; +/// +/// +/// int using_messages_locale; +/// +/// struct lconv lconv; +/// +/// char *csym; +/// }; +/// +/// +/// +/// +/// __attribute__((unused)) static void* +/// xlocale_retain(void *val) +/// { +/// struct xlocale_refcounted *obj = val; +/// atomic_add_long(&(obj->retain_count), 1); +/// return (val); +/// } +/// +/// +/// +/// +/// __attribute__((unused)) static void +/// xlocale_release(void *val) +/// { +/// struct xlocale_refcounted *obj = val; +/// long count; +/// +/// count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; +/// if (count < 0 && obj->destructor != +/// +/// ((void *)0) +/// +/// ) +/// obj->destructor(obj); +/// } +/// +/// +/// +/// +/// +/// extern void* __collate_load(const char*, locale_t); +/// extern void* __ctype_load(const char*, locale_t); +/// extern void* __messages_load(const char*, locale_t); +/// extern void* __monetary_load(const char*, locale_t); +/// extern void* __numeric_load(const char*, locale_t); +/// extern void* __time_load(const char*, locale_t); +/// +/// extern struct _xlocale __xlocale_global_locale; +/// extern struct _xlocale __xlocale_C_locale; +/// +/// +/// +/// +/// void __set_thread_rune_locale(locale_t loc); +/// +/// +/// +/// +/// extern int __has_thread_locale; +/// +/// +/// +/// +/// +/// extern _Thread_local locale_t __thread_locale; +/// +/// +/// +/// +/// +/// +/// +/// static inline locale_t __get_locale(void) +/// { +/// +/// if (!__has_thread_locale) { +/// return (&__xlocale_global_locale); +/// } +/// return (__thread_locale ? __thread_locale : &__xlocale_global_locale); +/// } +/// +/// +/// +/// +/// +/// static inline locale_t get_real_locale(locale_t locale) +/// { +/// switch ((intptr_t)locale) { +/// case 0: return (&__xlocale_C_locale); +/// case -1: return (&__xlocale_global_locale); +/// default: return (locale); +/// } +/// } +/// +/// +/// +/// +/// +/// +/// +/// +/// struct xlocale_ctype { +/// struct xlocale_component header; +/// _RuneLocale *runes; +/// size_t (*__mbrtowc)(wchar_t * +/// +/// restrict +/// +/// , const char * +/// +/// restrict +/// +/// , +/// size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// int (*__mbsinit)(const mbstate_t *); +/// size_t (*__mbsnrtowcs)(wchar_t * +/// +/// restrict +/// +/// , const char ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// size_t (*__wcrtomb)(char * +/// +/// restrict +/// +/// , wchar_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// size_t (*__wcsnrtombs)(char * +/// +/// restrict +/// +/// , const wchar_t ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// int __mb_cur_max; +/// int __mb_sb_limit; +/// +/// __mbstate_t mblen; +/// +/// __mbstate_t mbrlen; +/// +/// __mbstate_t mbrtoc16; +/// +/// __mbstate_t mbrtoc32; +/// +/// __mbstate_t mbrtowc; +/// +/// __mbstate_t mbsnrtowcs; +/// +/// __mbstate_t mbsrtowcs; +/// +/// __mbstate_t mbtowc; +/// +/// __mbstate_t c16rtomb; +/// +/// __mbstate_t c32rtomb; +/// +/// __mbstate_t wcrtomb; +/// +/// __mbstate_t wcsnrtombs; +/// +/// __mbstate_t wcsrtombs; +/// +/// __mbstate_t wctomb; +/// }; +/// +/// extern struct xlocale_ctype __xlocale_global_ctype; +/// +/// +/// +/// +/// int _none_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _GBK_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// int _ascii_init(struct xlocale_ctype *, _RuneLocale *) +/// +/// __attribute__((__visibility__("hidden"))) +/// +/// ; +/// +/// typedef size_t (*mbrtowc_pfn_t)(wchar_t * +/// +/// restrict +/// +/// , +/// const char * +/// +/// restrict +/// +/// , size_t, mbstate_t * +/// +/// restrict +/// +/// ); +/// typedef size_t (*wcrtomb_pfn_t)(char * +/// +/// restrict +/// +/// , wchar_t, +/// mbstate_t * +/// +/// restrict +/// +/// ); +/// size_t __mbsnrtowcs_std(wchar_t * +/// +/// restrict +/// +/// , const char ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// , mbrtowc_pfn_t); +/// size_t __wcsnrtombs_std(char * +/// +/// restrict +/// +/// , const wchar_t ** +/// +/// restrict +/// +/// , +/// size_t, size_t, mbstate_t * +/// +/// restrict +/// +/// , wcrtomb_pfn_t); +/// + +var X_DefaultRuneLocale = _RuneLocale{ + + F__magic: *(*[8]int8)(unsafe.Pointer(ts)), + F__encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), + F__invalid_rune: 0xFFFD, + + F__runetype: [256]uint64{ + + 0: uint64(0x00000200), + + 1: uint64(0x00000200), + + 2: uint64(0x00000200), + + 3: uint64(0x00000200), + + 4: uint64(0x00000200), + + 5: uint64(0x00000200), + + 6: uint64(0x00000200), + + 7: uint64(0x00000200), + + 8: uint64(0x00000200), + + 9: uint64(0x00000200 | + + 0x00004000 | + + 0x00020000), + + 10: uint64(0x00000200 | + + 0x00004000), + + 11: uint64(0x00000200 | + + 0x00004000), + + 12: uint64(0x00000200 | + + 0x00004000), + + 13: uint64(0x00000200 | + + 0x00004000), + + 14: uint64(0x00000200), + + 15: uint64(0x00000200), + + 16: uint64(0x00000200), + + 17: uint64(0x00000200), + + 18: uint64(0x00000200), + + 19: uint64(0x00000200), + + 20: uint64(0x00000200), + + 21: uint64(0x00000200), + + 22: uint64(0x00000200), + + 23: uint64(0x00000200), + + 24: uint64(0x00000200), + + 25: uint64(0x00000200), + + 26: uint64(0x00000200), + + 27: uint64(0x00000200), + + 28: uint64(0x00000200), + + 29: uint64(0x00000200), + + 30: uint64(0x00000200), + + 31: uint64(0x00000200), + + 32: uint64(0x00004000 | + + 0x00020000 | + + 0x00040000), + + 33: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 34: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 35: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 36: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 37: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 38: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 39: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 40: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 41: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 42: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 43: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 44: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 45: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 46: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 47: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 48: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(0)), + + 49: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(1)), + + 50: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(2)), + + 51: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(3)), + + 52: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(4)), + + 53: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(5)), + + 54: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(6)), + + 55: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(7)), + + 56: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(8)), + + 57: uint64(0x00000400 | + + 0x00040000 | + + 0x00000800 | + + 0x00010000 | + + 0x00400000 | + + int64(9)), + + 58: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 59: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 60: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 61: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 62: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 63: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 64: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 65: uint64(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(10)), + + 66: uint64(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(11)), + + 67: uint64(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(12)), + + 68: uint64(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(13)), + + 69: uint64(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(14)), + + 70: uint64(0x00008000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(15)), + + 71: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 72: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 73: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 74: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 75: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 76: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 77: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 78: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 79: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 80: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 81: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 82: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 83: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 84: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 85: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 86: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 87: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 88: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 89: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 90: uint64(0x00008000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 91: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 92: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 93: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 94: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 95: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 96: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 97: uint64(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(10)), + + 98: uint64(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(11)), + + 99: uint64(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(12)), + + 100: uint64(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(13)), + + 101: uint64(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(14)), + + 102: uint64(0x00001000 | + + 0x00010000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100 | + + int64(15)), + + 103: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 104: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 105: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 106: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 107: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 108: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 109: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 110: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 111: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 112: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 113: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 114: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 115: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 116: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 117: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 118: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 119: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 120: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 121: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 122: uint64(0x00001000 | + + 0x00040000 | + + 0x00000800 | + + 0x00000100), + + 123: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 124: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 125: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 126: uint64(0x00002000 | + + 0x00040000 | + + 0x00000800), + + 127: uint64(0x00000200), + }, + F__maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, + }, + F__mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, + }, +} /* table.cpp.c:2243:19 */ + +var X_CurrentRuneLocale uintptr = 0 /* table.cpp.c:4092:19 */ + +/// _RuneLocale * +/// __runes_for_locale(locale_t locale, int *mb_sb_limit) +/// { +/// (locale = get_real_locale(locale)); +/// struct xlocale_ctype *c = ((struct xlocale_ctype*)(locale)->components[XLC_CTYPE]); +/// *mb_sb_limit = c->__mb_sb_limit; +/// return c->runes; +/// } + +func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ + return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) +} + +type locale_t = uintptr /* alltypes.h:343:32 */ + +func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisalpha(tls, c) + } + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + }() != 0 || func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0) +} + +func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ + return Xisalnum(tls, c) +} + +func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) +} + +func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ + return Xisalpha(tls, c) +} + +func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ + return Bool32(uint32(c)-uint32('0') < uint32(10)) +} + +func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ + return Xisdigit(tls, c) +} + +func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */ + return Bool32(uint32(c)-uint32('a') < uint32(26)) +} + +func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ + return Xislower(tls, c) +} + +func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ + return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) +} + +func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ + return Xisprint(tls, c) +} + +func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */ + return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5)) +} + +func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */ + return Xisspace(tls, c) +} + +func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */ + return Bool32(uint32(c)-uint32('A') < uint32(26)) +} + +func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */ + return Xisupper(tls, c) +} + +func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) +} + +func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ + return Xisxdigit(tls, c) +} + +type uintptr_t = uint64 /* alltypes.h:55:24 */ + +type intptr_t = int64 /* alltypes.h:70:15 */ + +type int8_t = int8 /* alltypes.h:96:25 */ + +type int16_t = int16 /* alltypes.h:101:25 */ + +type int32_t = int32 /* alltypes.h:106:25 */ + +type int64_t = int64 /* alltypes.h:111:25 */ + +type intmax_t = int64 /* alltypes.h:116:25 */ + +type uint8_t = uint8 /* alltypes.h:121:25 */ + +type uint16_t = uint16 /* alltypes.h:126:25 */ + +type uint32_t = uint32 /* alltypes.h:131:25 */ + +type uint64_t = uint64 /* alltypes.h:136:25 */ + +type uintmax_t = uint64 /* alltypes.h:146:25 */ + +type int_fast8_t = int8_t /* stdint.h:22:16 */ +type int_fast64_t = int64_t /* stdint.h:23:17 */ + +type int_least8_t = int8_t /* stdint.h:25:17 */ +type int_least16_t = int16_t /* stdint.h:26:17 */ +type int_least32_t = int32_t /* stdint.h:27:17 */ +type int_least64_t = int64_t /* stdint.h:28:17 */ + +type uint_fast8_t = uint8_t /* stdint.h:30:17 */ +type uint_fast64_t = uint64_t /* stdint.h:31:18 */ + +type uint_least8_t = uint8_t /* stdint.h:33:18 */ +type uint_least16_t = uint16_t /* stdint.h:34:18 */ +type uint_least32_t = uint32_t /* stdint.h:35:18 */ +type uint_least64_t = uint64_t /* stdint.h:36:18 */ + +type int_fast16_t = int32_t /* stdint.h:1:17 */ +type int_fast32_t = int32_t /* stdint.h:2:17 */ +type uint_fast16_t = uint32_t /* stdint.h:3:18 */ +type uint_fast32_t = uint32_t /* stdint.h:4:18 */ + +type ssize_t = int64 /* alltypes.h:65:15 */ + +type off_t = int64 /* alltypes.h:162:16 */ + +type _IO_FILE = struct { + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr +} /* alltypes.h:320:9 */ + +type FILE = _IO_FILE /* alltypes.h:320:25 */ + +type va_list = uintptr /* alltypes.h:326:27 */ + +type _G_fpos64_t = struct { + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 +} /* stdio.h:54:9 */ + +type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ + +type float_t = float32 /* alltypes.h:29:15 */ + +type double_t = float64 /* alltypes.h:34:16 */ + +func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var __u struct {F__f float32;} at bp, 4 + + *(*float32)(unsafe.Pointer(bp)) = __f + return *(*uint32)(unsafe.Pointer(bp)) +} + +func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var __u struct {F__f float64;} at bp, 8 + + *(*float64)(unsafe.Pointer(bp)) = __f + return *(*uint64)(unsafe.Pointer(bp)) +} + +type syscall_arg_t = int64 /* syscall.h:22:14 */ + +func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ + var c int32 + var x int32 + var y int64 + var neg int32 = 0 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c == '+' || c == '-' { + neg = Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') >= 10 && pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + if uint32(c-'0') >= 10 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return -0x7fffffffffffffff - int64(1) + } + for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + x = 10*x + c - '0' + } + for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + y = int64(10)*y + int64(c) - int64('0') + } + for ; uint32(c-'0') < 10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if neg != 0 { + return -y + } + return y +} + +func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var x [128]uint32_t at bp, 512 + + var i int32 + var j int32 + var k int32 + var a int32 + var z int32 + var lrp int64 = int64(0) + var dc int64 = int64(0) + var e10 int64 = int64(0) + var lnz int32 = 0 + var gotdig int32 = 0 + var gotrad int32 = 0 + var rp int32 + var e2 int32 + var emax int32 = -emin - bits + 3 + var denormal int32 = 0 + var y float64 + var frac float64 = float64(0) + var bias float64 = float64(0) + + j = 0 + k = 0 + + // Don't let leading zeros consume buffer space + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + if c == '.' { + gotrad = 1 + for c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }(); c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + lrp-- + } + } + + *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) + for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + gotrad = 1 + lrp = dc + } else if k < 128-3 { + dc++ + if c != '0' { + lnz = int32(dc) + } + if j != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') + } + if PreIncInt32(&j, 1) == 9 { + k++ + j = 0 + } + gotdig = 1 + } else { + dc++ + if c != '0' { + lnz = (128 - 4) * 9 + *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) + } + } + } + if !(gotrad != 0) { + lrp = dc + } + + if gotdig != 0 && c|32 == 'e' { + e10 = scanexp(tls, f, pok) + if e10 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e10 = int64(0) + } + lrp = lrp + e10 + } else if c >= 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + if !(gotdig != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + // Handle zero specially to avoid nasty special cases later + if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { + return float64(sign) * 0.0 + } + + // Optimize small integers (w/no exponent) and over/under-flow + if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if lrp > int64(-emin/2) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if lrp < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + // Align incomplete final B1B digit + if j != 0 { + for ; j < 9; j++ { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10) + } + k++ + j = 0 + } + + a = 0 + z = k + e2 = 0 + rp = int32(lrp) + + // Optimize small to mid-size integers (even in exp. notation) + if lnz < 9 && lnz <= rp && rp < 18 { + if rp == 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if rp < 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp]) + } + var bitlim int32 = bits - 3*(rp-9) + if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10]) + } + } + + // Drop trailing zeros + for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- { + } + + // Align radix point to B1B digit boundary + if rp%9 != 0 { + var rpm9 int32 + if rp >= 0 { + rpm9 = rp % 9 + } else { + rpm9 = rp%9 + 9 + } + var p10 int32 = _sp10s[8-rpm9] + var carry uint32_t = uint32_t(0) + for k = a; k != z; k++ { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry + carry = uint32_t(1000000000/p10) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + rp = rp - 9 + } + } + if carry != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry + } + rp = rp + (9 - rpm9) + } + + // Upscale until desired number of bits are left of radix point + for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] { + var carry uint32_t = uint32_t(0) + e2 = e2 - 29 + for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) { + var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry) + if tmp > uint64(1000000000) { + carry = uint32_t(tmp / uint64(1000000000)) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000)) + } else { + carry = uint32_t(0) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp) + } + if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + z = k + } + if k == a { + break + } + } + if carry != 0 { + rp = rp + 9 + a = (a - 1) & (128 - 1) + if a == z { + z = (z - 1) & (128 - 1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) + } + *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry + } + } + + // Downscale until exactly number of bits are left of radix point + for { + var carry uint32_t = uint32_t(0) + var sh int32 = 1 + for i = 0; i < 2; i++ { + k = (a + i) & (128 - 1) + if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] { + i = 2 + break + } + if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] { + break + } + } + if i == 2 && rp == 9*2 { + break + } + // FIXME: find a way to compute optimal sh + if rp > 9+9*2 { + sh = 9 + } + e2 = e2 + sh + for k = a; k != z; k = (k + 1) & (128 - 1) { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry + carry = uint32_t(int32(1000000000)>>sh) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + i-- + rp = rp - 9 + } + } + if carry != 0 { + if (z+1)&(128-1) != a { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry + z = (z + 1) & (128 - 1) + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1) + } + } + } + + // Assemble desired bits into floating point variable + for y = float64(AssignInt32(&i, 0)); i < 2; i++ { + if (a+i)&(128-1) == z { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0) + } + y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4))) + } + + y = y * float64(sign) + + // Limit precision for denormal results + if bits > 53+e2-emin { + bits = 53 + e2 - emin + if bits < 0 { + bits = 0 + } + denormal = 1 + } + + // Calculate bias term to force rounding, move out lower bits + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 2*53-bits-1), y) + frac = Xfmodl(tls, y, Xscalbn(tls, float64(1), 53-bits)) + y = y - frac + y = y + bias + } + + // Process tail of decimal input so it can affect rounding + if (a+i)&(128-1) != z { + var t uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) + if t < uint32_t(500000000) && (t != 0 || (a+i+1)&(128-1) != z) { + frac = frac + 0.25*float64(sign) + } else if t > uint32_t(500000000) { + frac = frac + 0.75*float64(sign) + } else if t == uint32_t(500000000) { + if (a+i+1)&(128-1) == z { + frac = frac + 0.5*float64(sign) + } else { + frac = frac + 0.75*float64(sign) + } + } + if 53-bits >= 2 && !(Xfmodl(tls, frac, float64(1)) != 0) { + frac += 1 + } + } + + y = y + frac + y = y - bias + + if (e2+53)&0x7fffffff > emax-5 { + if Xfabsl(tls, y) >= float64(float64(2))/2.22044604925031308085e-16 { + if denormal != 0 && bits == 53+e2-emin { + denormal = 0 + } + y = y * 0.5 + e2++ + } + if e2+53 > emax || denormal != 0 && frac != 0 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + } + + return Xscalbnl(tls, y, e2) +} + +var _sth = [2]uint32_t{uint32_t(9007199), uint32_t(254740991)} /* floatscan.c:67:24 */ +var _sp10s = [8]int32{10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000} /* floatscan.c:80:19 */ + +func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:315:20: */ + var x uint32_t = uint32_t(0) + var y float64 = float64(0) + var scale float64 = float64(1) + var bias float64 = float64(0) + var gottail int32 = 0 + var gotrad int32 = 0 + var gotdig int32 = 0 + var rp int64 = int64(0) + var dc int64 = int64(0) + var e2 int64 = int64(0) + var d int32 + var c int32 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + + // Skip leading zeros + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + + if c == '.' { + gotrad = 1 + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + // Count zeros after the radix point before significand + rp = int64(0) + __1: + if !(c == '0') { + goto __3 + } + gotdig = 1 + goto __2 + __2: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + rp-- + goto __1 + goto __3 + __3: + } + + for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + rp = dc + gotrad = 1 + } else { + gotdig = 1 + if c > '9' { + d = c | 32 + 10 - 'a' + } else { + d = c - '0' + } + if dc < int64(8) { + x = x*uint32_t(16) + uint32_t(d) + } else if dc < int64(53/4+1) { + y = y + float64(d)*AssignDivFloat64(&scale, float64(16)) + } else if d != 0 && !(gottail != 0) { + y = y + 0.5*scale + gottail = 1 + } + dc++ + } + } + if !(gotdig != 0) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if gotrad != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } else { + X__shlim(tls, f, int64(0)) + } + return float64(sign) * 0.0 + } + if !(gotrad != 0) { + rp = dc + } + for dc < int64(8) { + x = x * uint32_t(16) + dc++ + } + if c|32 == 'p' { + e2 = scanexp(tls, f, pok) + if e2 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e2 = int64(0) + } + } else { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + e2 = e2 + (int64(4)*rp - int64(32)) + + if !(x != 0) { + return float64(sign) * 0.0 + } + if e2 > int64(-emin) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if e2 < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + for x < 0x80000000 { + if y >= 0.5 { + x = x + (x + uint32_t(1)) + y = y + (y - float64(1)) + } else { + x = x + x + y = y + y + } + e2-- + } + + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) + if bits < 0 { + bits = 0 + } + } + + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 32+53-bits-1), float64(sign)) + } + + if bits < 32 && y != 0 && !(x&uint32_t(1) != 0) { + x++ + y = float64(0) + } + + y = bias + float64(sign)*float64(x) + float64(sign)*y + y = y - bias + + if !(y != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + + return Xscalbnl(tls, y, int32(e2)) +} + +func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */ + var sign int32 = 1 + var i size_t + var bits int32 + var emin int32 + var c int32 + + switch prec { + case 0: + bits = 24 + emin = -125 - bits + break + case 1: + bits = 53 + emin = -1021 - bits + break + case 2: + bits = 53 + emin = -1021 - bits + break + default: + return float64(0) + } + + for __isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0 { + } + + if c == '+' || c == '-' { + sign = sign - 2*Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + + for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { + if i < uint64(7) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { + if i != uint64(8) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + for ; i > uint64(3); i-- { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + } + return float64(float32(sign) * X__builtin_inff(tls)) + } + if !(i != 0) { + for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { + if i < uint64(2) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + } + if i == uint64(3) { + if func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() != '(' { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return float64(X__builtin_nanf(tls, ts+54)) + } + for i = uint64(1); ; i++ { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') < 10 || uint32(c-'A') < 26 || uint32(c-'a') < 26 || c == '_' { + continue + } + if c == ')' { + return float64(X__builtin_nanf(tls, ts+54)) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + for PostDecUint64(&i, 1) != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + return float64(X__builtin_nanf(tls, ts+54)) + } + return float64(X__builtin_nanf(tls, ts+54)) + } + + if i != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + if c == '0' { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c|32 == 'x' { + return hexfloat(tls, f, bits, emin, sign, pok) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + c = '0' + } + + return decfloat(tls, f, c, bits, emin, sign, pok) +} + +// Lookup table for digit values. -1==255>=36 -> invalid +var table = [257]uint8{Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), +} /* intscan.c:7:28 */ + +func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */ + var val uintptr + var c int32 + var neg int32 + var x uint32 + var y uint64 + var bs int32 + val = uintptr(unsafe.Pointer(&table)) + uintptr(1) + neg = 0 + if !(base > uint32(36) || base == uint32(1)) { + goto __1 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__1: + ; +__2: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __3 + } + goto __2 +__3: + ; + if !(c == '+' || c == '-') { + goto __4 + } + neg = -Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() +__4: + ; + if !((base == uint32(0) || base == uint32(16)) && c == '0') { + goto __5 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(c|32 == 'x') { + goto __7 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { + goto __9 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + goto __10 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + goto __11 +__10: + X__shlim(tls, f, int64(0)) +__11: + ; + return uint64(0) +__9: + ; + base = uint32(16) + goto __8 +__7: + if !(base == uint32(0)) { + goto __12 + } + base = uint32(8) +__12: + ; +__8: + ; + goto __6 +__5: + if !(base == uint32(0)) { + goto __13 + } + base = uint32(10) +__13: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { + goto __14 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + X__shlim(tls, f, int64(0)) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__14: + ; +__6: + ; + if !(base == uint32(10)) { + goto __15 + } + x = uint32(0) +__17: + if !(uint32(c-'0') < 10 && x <= 0xffffffff/uint32(10)-uint32(1)) { + goto __19 + } + x = x*uint32(10) + uint32(c-'0') + goto __18 +__18: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __17 + goto __19 +__19: + ; + y = uint64(x) +__20: + if !(uint32(c-'0') < 10 && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(10) && uint64(10)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(c-'0')) { + goto __22 + } + y = y*uint64(10) + uint64(c-'0') + goto __21 +__21: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __20 + goto __22 +__22: + ; + if !(uint32(c-'0') >= 10) { + goto __23 + } + goto done +__23: + ; + goto __16 +__15: + if !!(base&(base-uint32(1)) != 0) { + goto __24 + } + bs = int32(*(*int8)(unsafe.Pointer(ts + 55 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + x = uint32(0) +__26: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { + goto __28 + } + x = x<<bs | uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __27 +__27: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __26 + goto __28 +__28: + ; + y = uint64(x) +__29: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= uint64(2*uint64(0x7fffffffffffffff)+uint64(1))>>bs) { + goto __31 + } + y = y<<bs | uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __30 +__30: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __29 + goto __31 +__31: + ; + goto __25 +__24: + x = uint32(0) +__32: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(36)-uint32(1)) { + goto __34 + } + x = x*base + uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __33 +__33: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __32 + goto __34 +__34: + ; + y = uint64(x) +__35: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(base) && uint64(base)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { + goto __37 + } + y = y*uint64(base) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __36 +__36: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __35 + goto __37 +__37: + ; +__25: + ; +__16: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __38 + } +__39: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __41 + } + goto __40 +__40: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __39 + goto __41 +__41: + ; + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + y = lim + if !(lim&uint64(1) != 0) { + goto __42 + } + neg = 0 +__42: + ; +__38: + ; +done: + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(y >= lim) { + goto __43 + } + if !(!(lim&uint64(1) != 0) && !(neg != 0)) { + goto __44 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim - uint64(1) + goto __45 +__44: + if !(y > lim) { + goto __46 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim +__46: + ; +__45: + ; +__43: + ; + return y ^ uint64(neg) - uint64(neg) +} + +// The shcnt field stores the number of bytes read so far, offset by +// the value of buf-rpos at the last function call (__shlim or __shgetc), +// so that between calls the inline shcnt macro can add rpos-buf to get +// the actual count. + +func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 1 + // If lim is nonzero, rend must be a valid pointer. + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } +} + +func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ + var c int32 + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) + return -1 + } + cnt++ + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) + } + return c +} + +func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */ + return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24 +} + +func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */ + return Xcopysign(tls, x, y) +} + +func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */ + return Xfabs(tls, x) +} + +func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */ + return Xfmod(tls, x, y) +} + +var toint double_t = float64(float64(1)) / 2.22044604925031308085e-16 /* rint.c:10:23 */ + +func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + var s int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 63) + var y double_t + + if e >= 0x3ff+52 { + return x + } + if s != 0 { + y = x - toint + toint + } else { + y = x + toint - toint + } + if y == float64(0) { + if s != 0 { + return -Float64FromFloat64(0.0) + } + return float64(0) + } + return y +} + +func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var u struct {Ff float64;} at bp, 8 + + var y double_t = x + + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + n = 1023 + } + } + } else if n < -1022 { + // make sure final n < -53 to avoid double + // rounding in the subnormal range + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + n = -1022 + } + } + } + *(*uint64_t)(unsafe.Pointer(bp)) = uint64_t(0x3ff+n) << 52 + x = y * *(*float64)(unsafe.Pointer(bp)) + return x +} + +func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ + return Xscalbn(tls, x, n) +} + +type div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:35 */ +type ldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:63:36 */ +type lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:64:41 */ + +type max_align_t = struct { + F__ll int64 + F__ld float64 +} /* alltypes.h:41:54 */ + +type imaxdiv_t = struct { + Fquot intmax_t + Frem intmax_t +} /* inttypes.h:14:40 */ + +type pid_t = int32 /* alltypes.h:235:13 */ + +type uid_t = uint32 /* alltypes.h:245:18 */ + +type gid_t = uint32 /* alltypes.h:250:18 */ + +type iovec = struct { + Fiov_base uintptr + Fiov_len size_t +} /* alltypes.h:355:1 */ + +type socklen_t = uint32 /* alltypes.h:361:18 */ + +type sa_family_t = uint16 /* alltypes.h:366:24 */ + +type msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:22:1 */ + +type cmsghdr = struct { + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:44:1 */ + +type linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:74:1 */ + +type sockaddr = struct { + Fsa_family sa_family_t + Fsa_data [14]int8 +} /* socket.h:367:1 */ + +type sockaddr_storage = struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 +} /* socket.h:372:1 */ + +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ + +type sockaddr_in = struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t +} /* in.h:16:1 */ + +type in6_addr = struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } +} /* in.h:23:1 */ + +type sockaddr_in6 = struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t +} /* in.h:34:1 */ + +type ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:42:1 */ + +type ip_opts = struct { + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 +} /* in.h:229:1 */ + +type ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } +} /* in.h:247:1 */ + +type ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 +} /* in.h:252:1 */ + +type ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } +} /* in.h:258:1 */ + +type ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } +} /* in.h:264:1 */ + +type group_req = struct { + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:275:1 */ + +type group_source_req = struct { + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:280:1 */ + +type group_filter = struct { + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:286:1 */ + +type in_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } +} /* in.h:297:1 */ + +type in6_pktinfo = struct { + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipi6_ifindex uint32 +} /* in.h:303:1 */ + +type ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t + } + Fip6m_mtu uint32_t +} /* in.h:308:1 */ + +type addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:16:1 */ + +// Legacy functions follow (marked OBsolete in SUS) + +type netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t +} /* netdb.h:62:1 */ + +type hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:69:1 */ + +type servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr +} /* netdb.h:78:1 */ + +type protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:85:1 */ + +type aibuf = struct { + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [4]byte +} /* lookup.h:10:1 */ + +type sa = struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte +} /* lookup.h:10:1 */ + +type address = struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 +} /* lookup.h:20:1 */ + +type service = struct { + Fport uint16_t + Fproto uint8 + Fsocktype uint8 +} /* lookup.h:27:1 */ + +type resolvconf = struct { + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 +} /* lookup.h:34:1 */ + +func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ + var cnt size_t + cnt = uint64(1) +__1: + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { + goto __3 + } + goto __2 +__2: + cnt++ + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next + goto __1 + goto __3 +__3: + ; + var b uintptr = p - uintptr(uint64(uintptr(0))) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) + //TODO LOCK(b->lock); + if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { + Xfree(tls, b) + } + //TODO else UNLOCK(b->lock); +} + +type time_t = int64 /* alltypes.h:85:16 */ + +type clockid_t = int32 /* alltypes.h:214:13 */ + +type timespec = struct { + Ftv_sec time_t + Ftv_nsec int64 +} /* alltypes.h:229:1 */ + +type pthread_t = uintptr /* alltypes.h:273:26 */ + +type pthread_once_t = int32 /* alltypes.h:279:13 */ + +type pthread_key_t = uint32 /* alltypes.h:284:18 */ + +type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ + +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */ + +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */ + +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */ + +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */ + +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */ + +type sigset_t = __sigset_t /* alltypes.h:349:71 */ + +type pthread_attr_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 + } +} /* alltypes.h:372:147 */ + +type pthread_mutex_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 + } +} /* alltypes.h:377:157 */ + +type pthread_cond_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 + } +} /* alltypes.h:387:112 */ + +type pthread_rwlock_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 + } +} /* alltypes.h:397:139 */ + +type pthread_barrier_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 + } +} /* alltypes.h:402:137 */ + +type sched_param = struct { + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte +} /* sched.h:19:1 */ + +type timer_t = uintptr /* alltypes.h:209:14 */ + +type clock_t = int64 /* alltypes.h:219:14 */ + +type tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:38:1 */ + +type itimerspec = struct { + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 + } +} /* time.h:80:1 */ + +type __ptcb = struct { + F__f uintptr + F__x uintptr + F__next uintptr +} /* pthread.h:206:1 */ + +type useconds_t = uint32 /* alltypes.h:260:18 */ + +func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ + bp := tls.Alloc(1608) + defer tls.Free(1608) + + // var ports [2]service at bp, 8 + + // var addrs [48]address at bp+8, 1344 + + // var canon [256]int8 at bp+1352, 256 + + var outcanon uintptr + var nservs int32 + var naddrs int32 + var nais int32 + var canon_len int32 + var i int32 + var j int32 + var k int32 + var family int32 = 0 + var flags int32 = 0 + var proto int32 = 0 + var socktype int32 = 0 + var out uintptr + + if !(host != 0) && !(serv != 0) { + return -2 + } + + if hint != 0 { + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype + + var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 + if flags&mask != flags { + return -1 + } + + switch family { + case 2: + fallthrough + case 10: + fallthrough + case 0: + break + fallthrough + default: + return -6 + } + } + + if flags&0x20 != 0 { + Xabort(tls) //TODO- + // /* Define the "an address is configured" condition for address + // * families via ability to create a socket for the family plus + // * routability of the loopback address for the family. */ + // static const struct sockaddr_in lo4 = { + // .sin_family = AF_INET, .sin_port = 65535, + // .sin_addr.s_addr = __BYTE_ORDER == __BIG_ENDIAN + // ? 0x7f000001 : 0x0100007f + // }; + // static const struct sockaddr_in6 lo6 = { + // .sin6_family = AF_INET6, .sin6_port = 65535, + // .sin6_addr = IN6ADDR_LOOPBACK_INIT + // }; + // int tf[2] = { AF_INET, AF_INET6 }; + // const void *ta[2] = { &lo4, &lo6 }; + // socklen_t tl[2] = { sizeof lo4, sizeof lo6 }; + // for (i=0; i<2; i++) { + // if (family==tf[1-i]) continue; + // int s = socket(tf[i], SOCK_CLOEXEC|SOCK_DGRAM, + // IPPROTO_UDP); + // if (s>=0) { + // int cs; + // pthread_setcancelstate( + // PTHREAD_CANCEL_DISABLE, &cs); + // int r = connect(s, ta[i], tl[i]); + // pthread_setcancelstate(cs, 0); + // close(s); + // if (!r) continue; + // } + // switch (errno) { + // case EADDRNOTAVAIL: + // case EAFNOSUPPORT: + // case EHOSTUNREACH: + // case ENETDOWN: + // case ENETUNREACH: + // break; + // default: + // return EAI_SYSTEM; + // } + // if (family == tf[i]) return EAI_NONAME; + // family = tf[1-i]; + // } + } + + nservs = X__lookup_serv(tls, bp, serv, proto, socktype, flags) + if nservs < 0 { + return nservs + } + + naddrs = X__lookup_name(tls, bp+8, bp+1352, host, family, flags) + if naddrs < 0 { + return naddrs + } + + nais = nservs * naddrs + canon_len = int32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(unsafe.Sizeof(aibuf{}))+uint64(canon_len)+uint64(1)) + if !(out != 0) { + return -10 + } + + if canon_len != 0 { + outcanon = out + uintptr(nais)*88 + Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+1)) + } else { + outcanon = uintptr(0) + } + + for k = AssignInt32(&i, 0); i < naddrs; i++ { + j = 0 + __1: + if !(j < nservs) { + goto __3 + } + { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) + //TODO out[k].ai = (struct addrinfo){ + //TODO .ai_family = addrs[i].family, + //TODO .ai_socktype = ports[j].socktype, + //TODO .ai_protocol = ports[j].proto, + //TODO .ai_addrlen = addrs[i].family == AF_INET + //TODO ? sizeof(struct sockaddr_in) + //TODO : sizeof(struct sockaddr_in6), + //TODO .ai_addr = (void *)&out[k].sa, + //TODO .ai_canonname = outcanon }; + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { + return uint32(unsafe.Sizeof(sockaddr_in{})) + } + return uint32(unsafe.Sizeof(sockaddr_in6{})) + }() + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon + if k != 0 { + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 + } + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { + case 2: + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) + break + case 10: + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid + Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) + break + } + + } + goto __2 + __2: + j++ + k++ + goto __1 + goto __3 + __3: + } + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) + *(*uintptr)(unsafe.Pointer(res)) = out + return 0 +} + +type ucred = struct { + Fpid pid_t + Fuid uid_t + Fgid gid_t +} /* socket.h:57:1 */ + +type mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte +} /* socket.h:63:1 */ + +func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh) + _sh = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyaddr_r(tls, a, l, af, _sh, + _sh+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh +} + +var _sh uintptr /* gethostbyaddr.c:9:24: */ + +func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */ + return Xgethostbyname2(tls, name, 2) +} + +func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh1) + _sh1 = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh1 != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyname2_r(tls, name, af, _sh1, + _sh1+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh1 +} + +var _sh1 uintptr /* gethostbyname2.c:10:24: */ + +func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname2_r.c:11:5: */ + bp := tls.Alloc(1600) + defer tls.Free(1600) + + // var addrs [48]address at bp, 1344 + + // var canon [256]int8 at bp+1344, 256 + + var i int32 + var cnt int32 + var align size_t + var need size_t + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + cnt = X__lookup_name(tls, bp, bp+1344, name, af, 0x02) + if cnt < 0 { + switch cnt { + case -2: + *(*int32)(unsafe.Pointer(err)) = 1 + return 2 + fallthrough + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + fallthrough + default: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return 74 + fallthrough + case -10: + fallthrough + case -11: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + } + } + + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { + if af == 10 { + return 16 + } + return 4 + }() + + // Align buffer + align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) + + need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) + need = need + (Xstrlen(tls, name) + uint64(1)) + need = need + (Xstrlen(tls, bp+1344) + uint64(1)) + need = need + align + + if need > buflen { + return 34 + } + + buf += uintptr(align) + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf + buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf + buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < cnt; i++ { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) + } + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0) + + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1)) + + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1)) + } else { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) + + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +type if_nameindex = struct { + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr +} /* if.h:12:1 */ + +type ifaddr = struct { + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + } + Fifa_ifp uintptr + Fifa_next uintptr +} /* if.h:51:1 */ + +type ifmap = struct { + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte +} /* if.h:64:1 */ + +type ifreq = struct { + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + F__ccgo_pad2 [8]byte + } +} /* if.h:76:1 */ + +type ifconf = struct { + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_buf uintptr } +} /* if.h:116:1 */ + +type ns_sect = uint32 /* nameser.h:37:3 */ + +type __ns_msg = struct { + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr +} /* nameser.h:39:9 */ + +type ns_msg = __ns_msg /* nameser.h:46:3 */ + +type _ns_flagdata = struct { + Fmask int32 + Fshift int32 +} /* nameser.h:48:1 */ + +type __ns_rr = struct { + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr +} /* nameser.h:59:9 */ + +type ns_rr = __ns_rr /* nameser.h:66:3 */ + +type ns_flag = uint32 /* nameser.h:87:3 */ + +type ns_opcode = uint32 /* nameser.h:96:3 */ + +type ns_rcode = uint32 /* nameser.h:115:3 */ + +type ns_update_operation = uint32 /* nameser.h:121:3 */ + +type ns_tsig_key1 = struct { + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [4]byte +} /* nameser.h:123:1 */ + +type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ + +type ns_tcp_tsig_state1 = struct { + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte +} /* nameser.h:130:1 */ + +type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ + +type ns_type = uint32 /* nameser.h:200:3 */ + +type ns_class = uint32 /* nameser.h:219:3 */ + +type ns_key_types = uint32 /* nameser.h:226:3 */ + +type ns_cert_types = uint32 /* nameser.h:234:3 */ + +type HEADER = struct { + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ +} /* nameser.h:353:3 */ + +// unused; purely for broken apps +type __res_state = struct { + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte + } +} /* resolv.h:26:9 */ + +// unused; purely for broken apps +type res_state = uintptr /* resolv.h:62:3 */ + +type res_sym = struct { + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr +} /* resolv.h:70:1 */ + +func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ + p += uintptr(uint64(3) * uint64(unsafe.Sizeof(int32(0)))) + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(uint32('0') + x%uint32(10)) + x = x / uint32(10) + } + return p +} + +func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + Xsprintf(tls, s, ts+64, + VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) +} + +func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ + var i int32 + for i = 15; i >= 0; i-- { + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&15] + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') + } + Xstrcpy(tls, s, ts+89) +} + +var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 98)) /* getnameinfo.c:36:20 */ + +func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */ + bp := tls.Alloc(556) + defer tls.Free(556) + + // var line [512]int8 at bp+16, 512 + + var p uintptr + var z uintptr + var _buf [1032]uint8 + _ = _buf + // var atmp [16]uint8 at bp, 16 + + // var iplit address at bp+528, 28 + + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var f uintptr = Xfopen(tls, ts+115, ts+126) + if !(f != 0) { + return + } + if family == 2 { + Xmemcpy(tls, bp+uintptr(12), a, uint64(4)) + Xmemcpy(tls, bp, ts+129, uint64(12)) + a = bp /* &atmp[0] */ + } + for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { + if AssignUintptr(&p, Xstrchr(tls, bp+16, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + + for p = bp + 16; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + if X__lookup_ipliteral(tls, bp+528, bp+16, 0) <= 0 { + continue + } + + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { + Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) + Xmemcpy(tls, bp+528+8, ts+129, uint64(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) + } + + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { + continue + } + + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if (int64(z)-int64(p))/1 < int64(256) { + Xmemcpy(tls, buf, p, uint64((int64(z)-int64(p))/1+int64(1))) + break + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) +} + +func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getnameinfo.c:87:13: */ + Xabort(tls) //TODO- + // unsigned long svport; + // char line[128], *p, *z; + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) return; + // while (fgets(line, sizeof line, f)) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // for (p=line; *p && !isspace(*p); p++); + // if (!*p) continue; + // *p++ = 0; + // svport = strtoul(p, &z, 10); + + // if (svport != port || z==p) continue; + // if (dgram && strncmp(z, "/udp", 4)) continue; + // if (!dgram && strncmp(z, "/tcp", 4)) continue; + // if (p-line > 32) continue; + + // memcpy(buf, line, p-line); + // break; + // } + // __fclose_ca(f); +} + +var Xh_errno int32 /* h_errno.c:4:5: */ + +func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */ + return uintptr(unsafe.Pointer(&Xh_errno)) +} + +func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var s uintptr = s0 + var d uintptr = dest + *(*[4]uint64)(unsafe.Pointer(bp /* a */)) = [4]uint64{0: uint64(0)} + // var z uintptr at bp+32, 8 + + var i int32 + + for i = 0; i < 4; i++ { + *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) = Xstrtoul(tls, s, bp+32, 0) + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != '.' || !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s)))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) + }() != 0) { + return 0 + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != 0) { + break + } + s = *(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(1) + } + if i == 4 { + return 0 + } + switch i { + case 0: + *(*uint64)(unsafe.Pointer(bp + 1*8)) = *(*uint64)(unsafe.Pointer(bp)) & uint64(0xffffff) + AssignShrPtrUint64(bp, int(24)) + fallthrough + case 1: + *(*uint64)(unsafe.Pointer(bp + 2*8)) = *(*uint64)(unsafe.Pointer(bp + 1*8)) & uint64(0xffff) + AssignShrPtrUint64(bp+1*8, int(16)) + fallthrough + case 2: + *(*uint64)(unsafe.Pointer(bp + 3*8)) = *(*uint64)(unsafe.Pointer(bp + 2*8)) & uint64(0xff) + AssignShrPtrUint64(bp+2*8, int(8)) + } + for i = 0; i < 4; i++ { + if *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) > uint64(255) { + return 0 + } + *(*uint8)(unsafe.Pointer(d + uintptr(i))) = uint8(*(*uint64)(unsafe.Pointer(bp + uintptr(i)*8))) + } + return 1 +} + +func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var a uintptr = a0 + var i int32 + var j int32 + var max int32 + var best int32 + // var buf [100]int8 at bp+176, 100 + + switch af { + case 2: + if socklen_t(Xsnprintf(tls, s, uint64(l), ts+142, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + return s + } + break + case 10: + if Xmemcmp(tls, a, ts+129, uint64(12)) != 0 { + Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), + ts+154, + VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } else { + Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), + ts+178, + VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } + // Replace longest /(^0|:)[:0]{2,}/ with "::" + i = AssignInt32(&best, 0) + max = 2 + for ; *(*int8)(unsafe.Pointer(bp + 176 + uintptr(i))) != 0; i++ { + if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { + continue + } + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+208)) + if j > max { + best = i + max = j + } + } + if max > 3 { + *(*int8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrInt8(bp+176+uintptr(best+1), int8(':')) + Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint64(i-best-max+1)) + } + if Xstrlen(tls, bp+176) < size_t(l) { + Xstrcpy(tls, s, bp+176) + return s + } + break + default: + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return uintptr(0) + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 28 + return uintptr(0) +} + +func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */ + if c-uint32('0') < uint32(10) { + return int32(c - uint32('0')) + } + c = c | uint32(32) + if c-uint32('a') < uint32(6) { + return int32(c - uint32('a') + uint32(10)) + } + return -1 +} + +func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var ip [8]uint16_t at bp, 16 + + var a uintptr = a0 + var i int32 + var j int32 + var v int32 + var d int32 + var brk int32 = -1 + var need_v4 int32 = 0 + + if af == 2 { + for i = 0; i < 4; i++ { + for v = AssignInt32(&j, 0); j < 3 && func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s + uintptr(j))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) + }() != 0; j++ { + v = 10*v + int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) - '0' + } + if j == 0 || j > 1 && int32(*(*int8)(unsafe.Pointer(s))) == '0' || v > 255 { + return 0 + } + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == 3 { + return 1 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' { + return 0 + } + s += uintptr(j + 1) + } + return 0 + } else if af != 10 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return -1 + } + + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != ':' { + return 0 + } + + for i = 0; ; i++ { + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && brk < 0 { + brk = i + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(0) + if !(int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != 0) { + break + } + if i == 7 { + return 0 + } + continue + } + for v = AssignInt32(&j, 0); j < 4 && AssignInt32(&d, hexval(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(j)))))) >= 0; j++ { + v = 16*v + d + } + if j == 0 { + return 0 + } + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(v) + if !(int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != 0) && (brk >= 0 || i == 7) { + break + } + if i == 7 { + return 0 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != ':' { + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' || i < 6 && brk < 0 { + return 0 + } + need_v4 = 1 + i++ + break + } + s += uintptr(j + 1) + } + if brk >= 0 { + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(2*(i+1-brk))) + for j = 0; j < 7-i; j++ { + *(*uint16_t)(unsafe.Pointer(bp + uintptr(brk+j)*2)) = uint16_t(0) + } + } + for j = 0; j < 8; j++ { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(int32(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) >> 8) + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) + } + if need_v4 != 0 && Xinet_pton(tls, 2, s, a-uintptr(4)) <= 0 { + return 0 + } + return 1 +} + +func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + // var a4 in_addr at bp, 4 + + // var a6 in6_addr at bp+68, 16 + + if X__inet_aton(tls, name, bp) > 0 { + if family == 10 { // wrong family + return -2 + } + Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) + return 1 + } + // var tmp [64]int8 at bp+4, 64 + + var p uintptr = Xstrchr(tls, name, '%') + // var z uintptr at bp+88, 8 + + var scopeid uint64 = uint64(0) + if p != 0 && (int64(p)-int64(name))/1 < int64(64) { + Xmemcpy(tls, bp+4, name, uint64((int64(p)-int64(name))/1)) + *(*int8)(unsafe.Pointer(bp + 4 + uintptr((int64(p)-int64(name))/1))) = int8(0) + name = bp + 4 /* &tmp[0] */ + } + + if Xinet_pton(tls, 10, name, bp+68) <= 0 { + return 0 + } + if family == 2 { // wrong family + return -2 + } + + Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 10 + if p != 0 { + if func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))-uint32('0') < uint32(10)) + }() != 0 { + scopeid = Xstrtoull(tls, p, bp+88, 10) + } else { + *(*uintptr)(unsafe.Pointer(bp + 88 /* z */)) = p - uintptr(1) + } + if *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { + Xabort(tls) //TODO- + // if (!IN6_IS_ADDR_LINKLOCAL(&a6) && + // !IN6_IS_ADDR_MC_LINKLOCAL(&a6)) + // return EAI_NONAME; + // scopeid = if_nametoindex(p); + // if (!scopeid) return EAI_NONAME; + } + if scopeid > uint64(0xffffffff) { + return -2 + } + } + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) + return 1 +} + +type mode_t = uint32 /* alltypes.h:152:18 */ + +type flock = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:24:1 */ + +func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ + var s uintptr + //TODO if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) { + return 0 + } + for s = host; int32(*(*uint8)(unsafe.Pointer(s))) >= 0x80 || int32(*(*uint8)(unsafe.Pointer(s))) == '.' || int32(*(*uint8)(unsafe.Pointer(s))) == '-' || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0; s++ { + } + return BoolInt32(!(*(*uint8)(unsafe.Pointer(s)) != 0)) +} + +var Xzero_struct_address address /* lookup_name.c:27:16: */ + +func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:29:12: */ + var cnt int32 = 0 + if name != 0 { + return 0 + } + if flags&0x01 != 0 { + //TODO if (family != AF_INET6) + //TODO buf[cnt++] = (struct address){ .family = AF_INET }; + if family != 10 { + var x = Xzero_struct_address + x.Ffamily = 2 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + //TODO if (family != AF_INET) + //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; + if family != 2 { + var x = Xzero_struct_address + x.Ffamily = 10 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + } else { + Xabort(tls) //TODO- + // if (family != AF_INET6) + // buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } }; + // if (family != AF_INET) + // buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } }; + } + return cnt +} + +func name_from_numeric(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_name.c:58:12: */ + return X__lookup_ipliteral(tls, buf, name, family) +} + +func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:63:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var line [512]int8 at bp, 512 + + var l size_t = Xstrlen(tls, name) + var cnt int32 = 0 + var badfam int32 = 0 + var _buf [1032]uint8 + _ = _buf + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var _f FILE + _ = _f + var f uintptr = Xfopen(tls, ts+115, ts+126) + if !(f != 0) { + switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { + case 2: + fallthrough + case 20: + fallthrough + case 13: + return 0 + fallthrough + default: + return -11 + } + } + for Xfgets(tls, bp, int32(unsafe.Sizeof([512]int8{})), f) != 0 && cnt < 48 { + var p uintptr + var z uintptr + + if AssignUintptr(&p, Xstrchr(tls, bp, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + for p = bp + uintptr(1); AssignUintptr(&p, Xstrstr(tls, p, name)) != 0 && (!(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + UintptrFromInt32(-1))))) != 0) || !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + uintptr(l))))) != 0)); p++ { + } + if !(p != 0) { + continue + } + + // Isolate IP address to parse + for p = bp; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + switch name_from_numeric(tls, buf+uintptr(cnt)*28, bp, family) { + case 1: + cnt++ + break + case 0: + continue + default: + badfam = -2 + continue + } + + // Extract first name as canonical name + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if is_valid_hostname(tls, p) != 0 { + Xmemcpy(tls, canon, p, uint64((int64(z)-int64(p))/1+int64(1))) + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) + if cnt != 0 { + return cnt + } + return badfam +} + +type dpc_ctx = struct { + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [4]byte +} /* lookup_name.c:112:1 */ + +func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ + return -1 //TODO- + Xabort(tls) + return int32(0) //TODO- + // char search[256]; + // struct resolvconf conf; + // size_t l, dots; + // char *p, *z; + + // if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; + + // /* Count dots, suppress search when >=ndots or name ends in + // * a dot, which is an explicit request for global scope. */ + // for (dots=l=0; name[l]; l++) if (name[l]=='.') dots++; + // if (dots >= conf.ndots || name[l-1]=='.') *search = 0; + + // /* Strip final dot for canon, fail if multiple trailing dots. */ + // if (name[l-1]=='.') l--; + // if (!l || name[l-1]=='.') return EAI_NONAME; + + // /* This can never happen; the caller already checked length. */ + // if (l >= 256) return EAI_NONAME; + + // /* Name with search domain appended is setup in canon[]. This both + // * provides the desired default canonical name (if the requested + // * name is not a CNAME record) and serves as a buffer for passing + // * the full requested name to name_from_dns. */ + // memcpy(canon, name, l); + // canon[l] = '.'; + + // for (p=search; *p; p=z) { + // for (; isspace(*p); p++); + // for (z=p; *z && !isspace(*z); z++); + // if (z==p) break; + // if (z-p < 256 - l - 1) { + // memcpy(canon+l+1, p, z-p); + // canon[z-p+1+l] = 0; + // int cnt = name_from_dns(buf, canon, canon, family, &conf); + // if (cnt) return cnt; + // } + // } + + // canon[l] = 0; + // return name_from_dns(buf, canon, name, family, &conf); +} + +type policy = struct { + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 +} /* lookup_name.c:237:14 */ + +var defpolicy = [6]policy{ + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, + // Last rule must match all addresses to stop loop. + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), Fprec: uint8(40), Flabel: uint8(1)}, +} /* lookup_name.c:241:3 */ + +func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ + var i int32 + for i = 0; ; i++ { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 { + continue + } + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { + continue + } + return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + } + return uintptr(0) +} + +func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) +} + +func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xff { + return int32(*(*uint8_t)(unsafe.Pointer(a + 1))) & 15 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 { + return 2 + } + if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 { + return 2 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0xc0 { + return 5 + } + return 14 +} + +func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12: */ + // FIXME: The common prefix length should be limited to no greater + // than the nominal length of the prefix portion of the source + // address. However the definition of the source prefix length is + // not clear and thus this limiting is not yet implemented. + var i uint32 + for i = uint32(0); i < uint32(128) && !((int32(*(*uint8_t)(unsafe.Pointer(s /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8)))))^int32(*(*uint8_t)(unsafe.Pointer(d /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8))))))&(int32(128)>>(i%uint32(8))) != 0); i++ { + } + return int32(i) +} + +func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ + var a uintptr = _a + var b uintptr = _b + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey +} + +func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var cnt int32 = 0 + var i int32 + var j int32 + _ = j + + *(*int8)(unsafe.Pointer(canon)) = int8(0) + if name != 0 { + // reject empty name and check len so it fits into temp bufs + var l size_t = Xstrnlen(tls, name, uint64(255)) + if l-uint64(1) >= uint64(254) { + return -2 + } + Xmemcpy(tls, canon, name, l+uint64(1)) + } + + // Procedurally, a request for v6 addresses with the v4-mapped + // flag set is like a request for unspecified family, followed + // by filtering of the results. + if flags&0x08 != 0 { + if family == 10 { + family = 0 + } else { + flags = flags - 0x08 + } + } + + // Try each backend until there's at least one result. + cnt = name_from_null(tls, buf, name, family, flags) + if !(cnt != 0) { + cnt = name_from_numeric(tls, buf, name, family) + } + if !(cnt != 0) && !(flags&0x04 != 0) { + cnt = name_from_hosts(tls, buf, canon, name, family) + if !(cnt != 0) { + cnt = name_from_dns_search(tls, buf, canon, name, family) + } + } + if cnt <= 0 { + if cnt != 0 { + return cnt + } + return -2 + } + + // Filter/transform results for v4-mapped lookup, if requested. + if flags&0x08 != 0 { + Xabort(tls) //TODO- + // if (!(flags & AI_ALL)) { + // /* If any v6 results exist, remove v4 results. */ + // for (i=0; i<cnt && buf[i].family != AF_INET6; i++); + // if (i<cnt) { + // for (j=0; i<cnt; i++) { + // if (buf[i].family == AF_INET6) + // buf[j++] = buf[i]; + // } + // cnt = i = j; + // } + // } + // /* Translate any remaining v4 results to v6 */ + // for (i=0; i<cnt; i++) { + // if (buf[i].family != AF_INET) continue; + // memcpy(buf[i].addr+12, buf[i].addr, 4); + // memcpy(buf[i].addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); + // buf[i].family = AF_INET6; + // } + } + + // No further processing is needed if there are fewer than 2 + // results or if there are only IPv4 results. + if cnt < 2 || family == 2 { + return cnt + } + for i = 0; i < cnt; i++ { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { + break + } + } + if i == cnt { + return cnt + } + var cs int32 + _ = cs + //TODO pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); + + // The following implements a subset of RFC 3484/6724 destination + // address selection by generating a single 31-bit sort key for + // each address. Rules 3, 4, and 7 are omitted for having + // excessive runtime and code size cost and dubious benefit. + // So far the label/precedence table cannot be customized. + for i = 0; i < cnt; i++ { + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily + var key int32 = 0 + *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} + *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} + var sa1 uintptr + var da uintptr + // var salen socklen_t at bp+88, 4 + + var dalen socklen_t + if family == 10 { + Xmemcpy(tls, bp+8, buf+uintptr(i)*28+8, uint64(16)) + da = bp /* &da6 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + sa1 = bp + 28 /* &sa6 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + } else { + Xmemcpy(tls, bp+28+8, + ts+129, uint64(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) + Xmemcpy(tls, bp+8, + ts+129, uint64(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) + Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint64(4)) + da = bp + 56 /* &da4 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in{})) + sa1 = bp + 72 /* &sa4 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in{})) + } + var dpolicy uintptr = policyof(tls, bp+8) + var dscope int32 = scopeof(tls, bp+8) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) + var prefixlen int32 = 0 + var fd int32 = Xsocket(tls, family, 2|02000000, 17) + if fd >= 0 { + if !(Xconnect(tls, fd, da, dalen) != 0) { + key = key | 0x40000000 + if !(Xgetsockname(tls, fd, sa1, bp+88) != 0) { + if family == 2 { + Xmemcpy(tls, + bp+28+8+uintptr(12), + bp+72+4, uint64(4)) + } + if dscope == scopeof(tls, bp+28+8) { + key = key | 0x20000000 + } + if dlabel == labelof(tls, bp+28+8) { + key = key | 0x10000000 + } + prefixlen = prefixmatch(tls, bp+28+8, + bp+8) + } + } + Xclose(tls, fd) + } + key = key | dprec<<20 + key = key | (15-dscope)<<16 + key = key | prefixlen<<8 + key = key | (48-i)<<0 + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key + } + Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr) int32 + }{addrcmp}))) + + //TODO pthread_setcancelstate(cs, 0); + + return cnt +} + +func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var line [128]int8 + _ = line + var cnt int32 = 0 + var p uintptr + _ = p + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 54 /* "" */ + var port uint64 = uint64(0) + + switch socktype { + case 1: + switch proto { + case 0: + proto = 6 + fallthrough + case 6: + break + default: + return -8 + } + break + case 2: + switch proto { + case 0: + proto = 17 + fallthrough + case 17: + break + default: + return -8 + } + fallthrough + case 0: + break + default: + if name != 0 { + return -8 + } + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) + return 1 + } + + if name != 0 { + if !(int32(*(*int8)(unsafe.Pointer(name))) != 0) { + return -8 + } + port = Xstrtoul(tls, name, bp, 10) + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0) { + if port > uint64(65535) { + return -8 + } + if proto != 17 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) + } + if proto != 6 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) + } + return cnt + } + + if flags&0x400 != 0 { + return -2 + } + + var l size_t = Xstrlen(tls, name) + _ = l + + Xabort(tls) //TODO- + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) switch (errno) { + // case ENOENT: + // case ENOTDIR: + // case EACCES: + // return EAI_SERVICE; + // default: + // return EAI_SYSTEM; + // } + + Xabort(tls) //TODO- + // while (fgets(line, sizeof line, f) && cnt < MAXSERVS) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // /* Find service name */ + // for(p=line; (p=strstr(p, name)); p++) { + // if (p>line && !isspace(p[-1])) continue; + // if (p[l] && !isspace(p[l])) continue; + // break; + // } + // if (!p) continue; + + // /* Skip past canonical name at beginning of line */ + // for (p=line; *p && !isspace(*p); p++); + + // port = strtoul(p, &z, 10); + // if (port > 65535 || z==p) continue; + // if (!strncmp(z, "/udp", 4)) { + // if (proto == IPPROTO_TCP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_DGRAM; + // buf[cnt++].proto = IPPROTO_UDP; + // } + // if (!strncmp(z, "/tcp", 4)) { + // if (proto == IPPROTO_UDP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_STREAM; + // buf[cnt++].proto = IPPROTO_TCP; + // } + // } + // __fclose_ca(f); + // return cnt > 0 ? cnt : EAI_SERVICE; + Xabort(tls) + return int32(0) //TODO- +} + +func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { + (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0)) + } + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { + *(*uint32)(unsafe.Pointer(f)) |= uint32(32) + return -1 + } + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { + return -1 + } + return 0 +} + +func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */ + X__builtin_abort(tls) //TODO- + // __stdio_exit_needed(); +} + +// This function assumes it will never be called if there is already +// data buffered for reading. + +func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ + bp := tls.Alloc(1) + defer tls.Free(1) + + // var c uint8 at bp, 1 + + if !(X__toread(tls, f) != 0) && (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { + return int32(*(*uint8)(unsafe.Pointer(bp))) + } + return -1 +} + +func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ + var try uintptr + var sign int32 + for nel > uint64(0) { + try = base + uintptr(width*(nel/uint64(2))) + sign = (*struct { + f func(*TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) + if sign < 0 { + nel = nel / uint64(2) + } else if sign > 0 { + base = try + uintptr(width) + nel = nel - (nel/uint64(2) + uint64(1)) + } else { + return try + } + } + return uintptr(0) +} + +func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y float64 = X__floatscan(tls, bp, prec, 1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 + if p != 0 { + *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { + if cnt != 0 { + return s + uintptr(cnt) + } + return s + }() + } + return y +} + +func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */ + return float32(strtox(tls, s, p, 0)) +} + +func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */ + return strtox(tls, s, p, 1) +} + +func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */ + return strtox(tls, s, p, 2) +} + +func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* strtol.c:8:27: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) + if p != 0 { + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) + *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) + } + return y +} + +func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */ + return strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1)) +} + +func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:26:11: */ + return int64(strtox1(tls, s, p, base, Uint64FromInt64(-0x7fffffffffffffff-int64(1)))) +} + +func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:31:15: */ + return uint64(strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1))) +} + +func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:36:6: */ + return int64(strtox1(tls, s, p, base, 0+Uint64FromInt64(Int64(-Int64(0x7fffffffffffffff))-Int64FromInt32(1)))) +} + +func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) intmax_t { /* strtol.c:41:10: */ + return intmax_t(Xstrtoll(tls, s, p, base)) +} + +func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */ + return uintmax_t(Xstrtoull(tls, s, p, base)) +} + +func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */ + var l size_t = Xstrlen(tls, s) + var d uintptr = Xmalloc(tls, l+uint64(1)) + if !(d != 0) { + return uintptr(0) + } + return Xmemcpy(tls, d, s, l+uint64(1)) +} + +func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */ + var p uintptr = Xmemchr(tls, s, 0, n) + if p != 0 { + return uint64((int64(p) - int64(s)) / 1) + } + return n +} + +func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var a uintptr = s + *(*[4]size_t)(unsafe.Pointer(bp /* byteset */)) = [4]size_t{0: uint64(0)} + + if !(int32(*(*int8)(unsafe.Pointer(c))) != 0) { + return uint64(0) + } + if !(int32(*(*int8)(unsafe.Pointer(c + 1))) != 0) { + for ; int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(c))); s++ { + } + return size_t((int64(s) - int64(a)) / 1) + } + + for ; *(*int8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint64(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8, size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; c++ { + } + for ; *(*int8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8))&(size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; s++ { + } + return size_t((int64(s) - int64(a)) / 1) +} + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.cpp.c:4092:41: +} + +var ts1 = "RuneMagi\x00NONE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/libc/musl_netbsd_amd64.go b/vendor/modernc.org/libc/musl_netbsd_amd64.go index ee693563..b21d3d94 100644 --- a/vendor/modernc.org/libc/musl_netbsd_amd64.go +++ b/vendor/modernc.org/libc/musl_netbsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_netbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../netbsd/ctype_.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/isprint.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_netbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../netbsd/ctype_.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/isprint.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc @@ -360,57 +360,57 @@ type wchar_t = int32 /* <builtin>:15:24 */ type ssize_t = int64 /* ctype_.cpp.c:111:18 */ type __sfpos = struct { - _pos int64 - _mbstate_in struct { - __mbstateL int64 - _ [120]byte + F_pos int64 + F_mbstate_in struct { + F__mbstateL int64 + F__ccgo_pad1 [120]byte } - _mbstate_out struct { - __mbstateL int64 - _ [120]byte + F_mbstate_out struct { + F__mbstateL int64 + F__ccgo_pad1 [120]byte } } /* ctype_.cpp.c:121:9 */ type fpos_t = __sfpos /* ctype_.cpp.c:124:3 */ type __sbuf = struct { - _base uintptr - _size int32 - _ [4]byte + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte } /* ctype_.cpp.c:126:1 */ type __sFILE = struct { - _p uintptr - _r int32 - _w int32 - _flags uint16 - _file int16 - _ [4]byte - _bf struct { - _base uintptr - _size int32 - _ [4]byte - } - _lbfsize int32 - _ [4]byte - _cookie uintptr - _close uintptr - _read uintptr - _seek uintptr - _write uintptr - _ext struct { - _base uintptr - _size int32 - _ [4]byte - } - _up uintptr - _ur int32 - _ubuf [3]uint8 - _nbuf [1]uint8 - _flush uintptr - _lb_unused [8]int8 - _blksize int32 - _ [4]byte - _offset int64 + F_p uintptr + F_r int32 + F_w int32 + F_flags uint16 + F_file int16 + F__ccgo_pad1 [4]byte + F_bf struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_lbfsize int32 + F__ccgo_pad2 [4]byte + F_cookie uintptr + F_close uintptr + F_read uintptr + F_seek uintptr + F_write uintptr + F_ext struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_up uintptr + F_ur int32 + F_ubuf [3]uint8 + F_nbuf [1]uint8 + F_flush uintptr + F_lb_unused [8]int8 + F_blksize int32 + F__ccgo_pad3 [4]byte + F_offset int64 } /* ctype_.cpp.c:131:9 */ type FILE = __sFILE /* ctype_.cpp.c:165:3 */ @@ -947,39 +947,39 @@ type uint_fast16_t = uint32_t /* stdint.h:3:18 */ type uint_fast32_t = uint32_t /* stdint.h:4:18 */ type _IO_FILE = struct { - flags uint32 - _ [4]byte - rpos uintptr - rend uintptr - close uintptr - wend uintptr - wpos uintptr - mustbezero_1 uintptr - wbase uintptr - read uintptr - write uintptr - seek uintptr - buf uintptr - buf_size size_t - prev uintptr - next uintptr - fd int32 - pipe_pid int32 - lockcount int64 - mode int32 - lock int32 - lbf int32 - _ [4]byte - cookie uintptr - off off_t - getln_buf uintptr - mustbezero_2 uintptr - shend uintptr - shlim off_t - shcnt off_t - prev_locked uintptr - next_locked uintptr - locale uintptr + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:320:9 */ type FILE1 = _IO_FILE /* alltypes.h:320:25 */ @@ -987,8 +987,8 @@ type FILE1 = _IO_FILE /* alltypes.h:320:25 */ type va_list = uintptr /* alltypes.h:326:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t1 = _G_fpos64_t /* stdio.h:58:3 */ @@ -1001,7 +1001,7 @@ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) - // var __u struct {__f float32;} at bp, 4 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -1011,7 +1011,7 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) - // var __u struct {__f float64;} at bp, 8 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -1026,58 +1026,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var neg int32 = 0 c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -1116,8 +1116,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1126,13 +1126,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if c == '.' { gotrad = 1 for c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1143,8 +1143,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1185,8 +1185,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1197,8 +1197,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1440,16 +1440,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 var c int32 c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() // Skip leading zeros for ; c == '0'; c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1459,8 +1459,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 if c == '.' { gotrad = 1 c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1474,8 +1474,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 goto __2 __2: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1486,8 +1486,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -1516,18 +1516,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1547,8 +1547,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = scanexp(tls, f, pok) if e2 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -1558,8 +1558,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1639,8 +1639,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } for __isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -1649,8 +1649,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '+' || c == '-' { sign = sign - 2*Bool32(c == '-') c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1659,8 +1659,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { if i < uint64(7) { c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1668,14 +1668,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { if i != uint64(8) { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1687,8 +1687,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { if i < uint64(2) { c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1697,21 +1697,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) { if func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } return float64(X__builtin_nanf(tls, ts+13)) } for i = uint64(1); ; i++ { c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1721,8 +1721,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == ')' { return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -1731,8 +1731,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -1742,8 +1742,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i != 0 { - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -1753,16 +1753,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '0' { c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c|32 == 'x' { return hexfloat(tls, f, bits, emin, sign, pok) } - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -1809,8 +1809,8 @@ __1: ; __2: if !(__isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -1824,8 +1824,8 @@ __3: } neg = -Bool32(c == '-') c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1835,8 +1835,8 @@ __4: goto __5 } c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1844,23 +1844,23 @@ __4: goto __7 } c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { goto __9 } - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -1893,8 +1893,8 @@ __13: if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { goto __14 } - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -1916,8 +1916,8 @@ __17: goto __18 __18: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1934,8 +1934,8 @@ __20: goto __21 __21: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1964,8 +1964,8 @@ __26: goto __27 __27: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -1982,8 +1982,8 @@ __29: goto __30 __30: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -2002,8 +2002,8 @@ __32: goto __33 __33: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -2020,8 +2020,8 @@ __35: goto __36 __36: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -2043,8 +2043,8 @@ __39: goto __40 __40: c = func() int32 { - if (*FILE1)(unsafe.Pointer(f)).rpos != (*FILE1)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -2063,8 +2063,8 @@ __42: __38: ; done: - if (*FILE1)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE1)(unsafe.Pointer(f)).rpos-- + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -2097,34 +2097,34 @@ __43: // the actual count. func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ - (*FILE1)(unsafe.Pointer(f)).shlim = lim - (*FILE1)(unsafe.Pointer(f)).shcnt = (int64((*FILE1)(unsafe.Pointer(f)).buf) - int64((*FILE1)(unsafe.Pointer(f)).rpos)) / 1 + (*FILE1)(unsafe.Pointer(f)).Fshlim = lim + (*FILE1)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE1)(unsafe.Pointer(f)).Fbuf) - int64((*FILE1)(unsafe.Pointer(f)).Frpos)) / 1 // If lim is nonzero, rend must be a valid pointer. - if lim != 0 && (int64((*FILE1)(unsafe.Pointer(f)).rend)-int64((*FILE1)(unsafe.Pointer(f)).rpos))/1 > lim { - (*FILE1)(unsafe.Pointer(f)).shend = (*FILE1)(unsafe.Pointer(f)).rpos + uintptr(lim) + if lim != 0 && (int64((*FILE1)(unsafe.Pointer(f)).Frend)-int64((*FILE1)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE1)(unsafe.Pointer(f)).shend = (*FILE1)(unsafe.Pointer(f)).rend + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frend } } func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ var c int32 - var cnt off_t = (*FILE1)(unsafe.Pointer(f)).shcnt + (int64((*FILE1)(unsafe.Pointer(f)).rpos)-int64((*FILE1)(unsafe.Pointer(f)).buf))/1 - if (*FILE1)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE1)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { - (*FILE1)(unsafe.Pointer(f)).shcnt = (int64((*FILE1)(unsafe.Pointer(f)).buf)-int64((*FILE1)(unsafe.Pointer(f)).rpos))/1 + cnt - (*FILE1)(unsafe.Pointer(f)).shend = (*FILE1)(unsafe.Pointer(f)).rpos - (*FILE1)(unsafe.Pointer(f)).shlim = int64(-1) + var cnt off_t = (*FILE1)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE1)(unsafe.Pointer(f)).Frpos)-int64((*FILE1)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE1)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE1)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE1)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE1)(unsafe.Pointer(f)).Fbuf)-int64((*FILE1)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frpos + (*FILE1)(unsafe.Pointer(f)).Fshlim = int64(-1) return -1 } cnt++ - if (*FILE1)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE1)(unsafe.Pointer(f)).rend)-int64((*FILE1)(unsafe.Pointer(f)).rpos))/1 > (*FILE1)(unsafe.Pointer(f)).shlim-cnt { - (*FILE1)(unsafe.Pointer(f)).shend = (*FILE1)(unsafe.Pointer(f)).rpos + uintptr((*FILE1)(unsafe.Pointer(f)).shlim-cnt) + if (*FILE1)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE1)(unsafe.Pointer(f)).Frend)-int64((*FILE1)(unsafe.Pointer(f)).Frpos))/1 > (*FILE1)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frpos + uintptr((*FILE1)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE1)(unsafe.Pointer(f)).shend = (*FILE1)(unsafe.Pointer(f)).rend + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frend } - (*FILE1)(unsafe.Pointer(f)).shcnt = (int64((*FILE1)(unsafe.Pointer(f)).buf)-int64((*FILE1)(unsafe.Pointer(f)).rpos))/1 + cnt - if (*FILE1)(unsafe.Pointer(f)).rpos <= (*FILE1)(unsafe.Pointer(f)).buf { - *(*uint8)(unsafe.Pointer((*FILE1)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + (*FILE1)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE1)(unsafe.Pointer(f)).Fbuf)-int64((*FILE1)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE1)(unsafe.Pointer(f)).Frpos <= (*FILE1)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE1)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } @@ -2151,7 +2151,7 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -2180,7 +2180,7 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ bp := tls.Alloc(8) defer tls.Free(8) - // var u struct {f float64;} at bp, 8 + // var u struct {Ff float64;} at bp, 8 var y double_t = x @@ -2217,26 +2217,26 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:41:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type pid_t = int32 /* alltypes.h:235:13 */ @@ -2246,8 +2246,8 @@ type uid_t = uint32 /* alltypes.h:245:18 */ type gid_t = uint32 /* alltypes.h:250:18 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:355:1 */ type socklen_t = uint32 /* alltypes.h:361:18 */ @@ -2255,311 +2255,311 @@ type socklen_t = uint32 /* alltypes.h:361:18 */ type sa_family_t = uint16 /* alltypes.h:366:24 */ type msghdr = struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } /* socket.h:372:1 */ -type in_port_t = uint16_t /* in.h:12:18 */ -type in_addr_t = uint32_t /* in.h:13:18 */ -type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ type sockaddr_in = struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } /* in.h:23:1 */ type sockaddr_in6 = struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } /* in.h:34:1 */ type ipv6_mreq = struct { - ipv6mr_multiaddr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } } /* in.h:247:1 */ type ip_mreqn = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_address struct{ s_addr in_addr_t } - imr_ifindex int32 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 } /* in.h:252:1 */ type ip_mreq_source = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } - imr_sourceaddr struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } } /* in.h:258:1 */ type ip_msfilter = struct { - imsf_multiaddr struct{ s_addr in_addr_t } - imsf_interface struct{ s_addr in_addr_t } - imsf_fmode uint32_t - imsf_numsrc uint32_t - imsf_slist [1]struct{ s_addr in_addr_t } + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } } /* in.h:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:275:1 */ type group_source_req = struct { - gsr_interface uint32_t - _ [4]byte - gsr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:280:1 */ type group_filter = struct { - gf_interface uint32_t - _ [4]byte - gf_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:286:1 */ type in_pktinfo = struct { - ipi_ifindex int32 - ipi_spec_dst struct{ s_addr in_addr_t } - ipi_addr struct{ s_addr in_addr_t } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } } /* in.h:297:1 */ type in6_pktinfo = struct { - ipi6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_ifindex uint32 } /* in.h:303:1 */ type ip6_mtuinfo = struct { - ip6m_addr struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_mtu uint32_t } /* in.h:308:1 */ type addrinfo = struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr } /* netdb.h:16:1 */ // Legacy functions follow (marked OBsolete in SUS) type netent = struct { - n_name uintptr - n_aliases uintptr - n_addrtype int32 - n_net uint32_t + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t } /* netdb.h:62:1 */ type hostent = struct { - h_name uintptr - h_aliases uintptr - h_addrtype int32 - h_length int32 - h_addr_list uintptr + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte } /* netdb.h:85:1 */ type aibuf = struct { - ai struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr - } - sa struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - _ [12]byte - } - lock [1]int32 - slot int16 - ref int16 - _ [4]byte + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [4]byte } /* lookup.h:10:1 */ type sa = struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype uint8 } /* lookup.h:27:1 */ type resolvconf = struct { - ns [3]struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 - } - nns uint32 - attempts uint32 - ndots uint32 - timeout uint32 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 } /* lookup.h:34:1 */ func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ var cnt size_t cnt = uint64(1) __1: - if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -2572,8 +2572,8 @@ type time_t = int64 /* alltypes.h:85:16 */ type clockid_t = int32 /* alltypes.h:214:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:229:1 */ type pthread_t = uintptr /* alltypes.h:273:26 */ @@ -2584,62 +2584,62 @@ type pthread_key_t = uint32 /* alltypes.h:284:18 */ type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */ type sigset_t = __sigset_t /* alltypes.h:349:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:372:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:377:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:387:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:397:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:402:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:209:14 */ @@ -2647,35 +2647,35 @@ type timer_t = uintptr /* alltypes.h:209:14 */ type clock_t = int64 /* alltypes.h:219:14 */ type tm = struct { - tm_sec int32 - tm_min int32 - tm_hour int32 - tm_mday int32 - tm_mon int32 - tm_year int32 - tm_wday int32 - tm_yday int32 - tm_isdst int32 - _ [4]byte - tm_gmtoff int64 - tm_zone uintptr + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ type useconds_t = uint32 /* alltypes.h:260:18 */ @@ -2709,10 +2709,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } if hint != 0 { - family = (*addrinfo)(unsafe.Pointer(hint)).ai_family - flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags - proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol - socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -2808,7 +2808,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -2818,30 +2818,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //TODO : sizeof(struct sockaddr_in6), //TODO .ai_addr = (void *)&out[k].sa, //TODO .ai_canonname = outcanon }; - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 { - if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { return uint32(unsafe.Sizeof(sockaddr_in{})) } return uint32(unsafe.Sizeof(sockaddr_in6{})) }() - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48 - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { case 2: - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2) - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) break case 10: - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -2855,33 +2855,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid gid_t } /* socket.h:57:1 */ type mmsghdr = struct { - msg_hdr struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte - } - msg_len uint32 - _ [4]byte + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -2979,8 +2979,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -2991,7 +2991,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) - need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -3001,117 +3001,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) for i = 0; i < cnt; i++ { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf - buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0) - (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) - Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) - buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1)) - if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf - Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name) - buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1)) } else { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_next uintptr } /* if.h:51:1 */ type ifmap = struct { - mem_start uint64 - mem_end uint64 - base_addr uint16 - irq uint8 - dma uint8 - port uint8 - _ [3]byte + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_buf uintptr } } /* if.h:116:1 */ type ns_sect = uint32 /* nameser.h:37:3 */ type __ns_msg = struct { - _msg uintptr - _eom uintptr - _id uint16_t - _flags uint16_t - _counts [4]uint16_t - _ [4]byte - _sections [4]uintptr - _sect ns_sect - _rrnum int32 - _msg_ptr uintptr + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -3125,24 +3125,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:123:1 */ type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ type ns_tcp_tsig_state1 = struct { - counter int32 - _ [4]byte - key uintptr - ctx uintptr - sig [512]uint8 - siglen int32 - _ [4]byte + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -3156,45 +3156,45 @@ type ns_key_types = uint32 /* nameser.h:226:3 */ type ns_cert_types = uint32 /* nameser.h:234:3 */ type HEADER = struct { - _ [0]uint32 - id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ - qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ - nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ } /* nameser.h:353:3 */ // unused; purely for broken apps type __res_state = struct { - retrans int32 - retry int32 - options uint64 - nscount int32 - nsaddr_list [3]struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - id uint16 - _ [2]byte - dnsrch [7]uintptr - defdname [256]int8 - pfcode uint64 - ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ - _ [4]byte - sort_list [10]struct { - addr struct{ s_addr in_addr_t } - mask uint32_t - } - qhook uintptr - rhook uintptr - res_h_errno int32 - _vcsock int32 - _flags uint32 - _ [4]byte - _u struct { - _ [0]uint64 - pad [52]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -3202,10 +3202,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -3276,13 +3276,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) Xmemcpy(tls, bp+528+8, ts+88, uint64(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -3567,8 +3567,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 2 - (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -3591,7 +3591,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -3615,20 +3615,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:152:18 */ type flock = struct { - l_type int16 - l_whence int16 - _ [4]byte - l_start off_t - l_len off_t - l_pid pid_t - _ [4]byte + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -3654,14 +3654,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 2 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } //TODO if (family != AF_INET) //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; if family != 2 { var x = Xzero_struct_address - x.family = 10 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -3754,10 +3754,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [4]byte } /* lookup_name.c:112:1 */ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ @@ -3807,31 +3807,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: uint8(1)}, } /* lookup_name.c:241:3 */ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ var i int32 for i = 0; ; i++ { - if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 { continue } - if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != - int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -3840,7 +3840,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -3873,7 +3873,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ var a uintptr = _a var b uintptr = _b - return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -3953,7 +3953,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -3970,12 +3970,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -4002,8 +4002,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -4031,7 +4031,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -4083,9 +4083,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if name != 0 { return -8 } - (*service)(unsafe.Pointer(buf)).port = uint16_t(0) - (*service)(unsafe.Pointer(buf)).proto = uint8(proto) - (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -4100,14 +4100,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -8 } if proto != 17 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) } if proto != 6 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -4168,19 +4168,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ - *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE1)(unsafe.Pointer(f)).mode - 1 - if (*FILE1)(unsafe.Pointer(f)).wpos != (*FILE1)(unsafe.Pointer(f)).wbase { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE1)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE1)(unsafe.Pointer(f)).Fwpos != (*FILE1)(unsafe.Pointer(f)).Fwbase { (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE1)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE1)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0)) } - (*FILE1)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) - if (*FILE1)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + (*FILE1)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE1)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { *(*uint32)(unsafe.Pointer(f)) |= uint32(32) return -1 } - (*FILE1)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE1)(unsafe.Pointer(f)).buf+uintptr((*FILE1)(unsafe.Pointer(f)).buf_size)) - if (*FILE1)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + (*FILE1)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE1)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE1)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE1)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -4202,7 +4202,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ if !(X__toread(tls, f) != 0) && (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE1)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE1)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -4234,11 +4234,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE1 at bp, 232 - (*FILE1)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE1)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE1)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE1)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y float64 = X__floatscan(tls, bp, prec, 1) - var cnt off_t = (*FILE1)(unsafe.Pointer(bp)).shcnt + (int64((*FILE1)(unsafe.Pointer(bp)).rpos)-int64((*FILE1)(unsafe.Pointer(bp)).buf))/1 + var cnt off_t = (*FILE1)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE1)(unsafe.Pointer(bp)).Frpos)-int64((*FILE1)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -4268,12 +4268,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE1 at bp, 232 - (*FILE1)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE1)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE1)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE1)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) if p != 0 { - var cnt size_t = size_t((*FILE1)(unsafe.Pointer(bp)).shcnt + (int64((*FILE1)(unsafe.Pointer(bp)).rpos)-int64((*FILE1)(unsafe.Pointer(bp)).buf))/1) + var cnt size_t = size_t((*FILE1)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE1)(unsafe.Pointer(bp)).Frpos)-int64((*FILE1)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y diff --git a/vendor/modernc.org/libc/musl_netbsd_arm.go b/vendor/modernc.org/libc/musl_netbsd_arm.go new file mode 100644 index 00000000..5eea7fb2 --- /dev/null +++ b/vendor/modernc.org/libc/musl_netbsd_arm.go @@ -0,0 +1,4292 @@ +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_netbsd_arm.go -pkgname libc -static-locals-prefix _s -Iarch/arm -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../netbsd/ctype_.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/isprint.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. + +package libc + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +// musl as a whole is licensed under the following standard MIT license: +// +// ---------------------------------------------------------------------- +// Copyright © 2005-2020 Rich Felker, et al. +// +// 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. +// ---------------------------------------------------------------------- +// +// Authors/contributors include: +// +// A. Wilcox +// Ada Worcester +// Alex Dowad +// Alex Suykov +// Alexander Monakov +// Andre McCurdy +// Andrew Kelley +// Anthony G. Basile +// Aric Belsito +// Arvid Picciani +// Bartosz Brachaczek +// Benjamin Peterson +// Bobby Bingham +// Boris Brezillon +// Brent Cook +// Chris Spiegel +// Clément Vasseur +// Daniel Micay +// Daniel Sabogal +// Daurnimator +// David Carlier +// David Edelsohn +// Denys Vlasenko +// Dmitry Ivanov +// Dmitry V. Levin +// Drew DeVault +// Emil Renner Berthing +// Fangrui Song +// Felix Fietkau +// Felix Janda +// Gianluca Anzolin +// Hauke Mehrtens +// He X +// Hiltjo Posthuma +// Isaac Dunham +// Jaydeep Patil +// Jens Gustedt +// Jeremy Huntwork +// Jo-Philipp Wich +// Joakim Sindholt +// John Spencer +// Julien Ramseier +// Justin Cormack +// Kaarle Ritvanen +// Khem Raj +// Kylie McClain +// Leah Neukirchen +// Luca Barbato +// Luka Perkov +// M Farkas-Dyck (Strake) +// Mahesh Bodapati +// Markus Wichmann +// Masanori Ogino +// Michael Clark +// Michael Forney +// Mikhail Kremnyov +// Natanael Copa +// Nicholas J. Kain +// orc +// Pascal Cuoq +// Patrick Oppenlander +// Petr Hosek +// Petr Skocik +// Pierre Carrier +// Reini Urban +// Rich Felker +// Richard Pennington +// Ryan Fairfax +// Samuel Holland +// Segev Finer +// Shiz +// sin +// Solar Designer +// Stefan Kristiansson +// Stefan O'Rear +// Szabolcs Nagy +// Timo Teräs +// Trutz Behn +// Valentin Ochs +// Will Dietz +// William Haddon +// William Pitcock +// +// Portions of this software are derived from third-party works licensed +// under terms compatible with the above MIT license: +// +// The TRE regular expression implementation (src/regex/reg* and +// src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +// under a 2-clause BSD license (license text in the source files). The +// included version has been heavily modified by Rich Felker in 2012, in +// the interests of size, simplicity, and namespace cleanliness. +// +// Much of the math library code (src/math/* and src/complex/*) is +// Copyright © 1993,2004 Sun Microsystems or +// Copyright © 2003-2011 David Schultz or +// Copyright © 2003-2009 Steven G. Kargl or +// Copyright © 2003-2009 Bruce D. Evans or +// Copyright © 2008 Stephen L. Moshier or +// Copyright © 2017-2018 Arm Limited +// and labelled as such in comments in the individual source files. All +// have been licensed under extremely permissive terms. +// +// The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +// The Android Open Source Project and is licensed under a two-clause BSD +// license. It was taken from Bionic libc, used on Android. +// +// The AArch64 memcpy and memset code (src/string/aarch64/*) are +// Copyright © 1999-2019, Arm Limited. +// +// The implementation of DES for crypt (src/crypt/crypt_des.c) is +// Copyright © 1994 David Burren. It is licensed under a BSD license. +// +// The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +// originally written by Solar Designer and placed into the public +// domain. The code also comes with a fallback permissive license for use +// in jurisdictions that may not recognize the public domain. +// +// The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +// Valentin Ochs and is licensed under an MIT-style license. +// +// The x86_64 port was written by Nicholas J. Kain and is licensed under +// the standard MIT terms. +// +// The mips and microblaze ports were originally written by Richard +// Pennington for use in the ellcc project. The original code was adapted +// by Rich Felker for build system and code conventions during upstream +// integration. It is licensed under the standard MIT terms. +// +// The mips64 port was contributed by Imagination Technologies and is +// licensed under the standard MIT terms. +// +// The powerpc port was also originally written by Richard Pennington, +// and later supplemented and integrated by John Spencer. It is licensed +// under the standard MIT terms. +// +// All other files which have no copyright comments are original works +// produced specifically for use as part of this library, written either +// by Rich Felker, the main author of the library, or by one or more +// contibutors listed above. Details on authorship of individual files +// can be found in the git version control history of the project. The +// omission of copyright and license comments in each file is in the +// interest of source tree size. +// +// In addition, permission is hereby granted for all public header files +// (include/* and arch/*/bits/*) and crt files intended to be linked into +// applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +// the copyright notice and permission notice otherwise required by the +// license, and to use these files without any requirement of +// attribution. These files include substantial contributions from: +// +// Bobby Bingham +// John Spencer +// Nicholas J. Kain +// Rich Felker +// Richard Pennington +// Stefan Kristiansson +// Szabolcs Nagy +// +// all of whom have explicitly granted such permission. +// +// This file previously contained text expressing a belief that most of +// the files covered by the above exception were sufficiently trivial not +// to be subject to copyright, resulting in confusion over whether it +// negated the permissions granted in the license. In the spirit of +// permissive licensing, and of not having licensing issues being an +// obstacle to adoption, that text has been removed. +const ( /* copyright.c:194:1: */ + __musl__copyright__ = 0 +) + +const ( /* nameser.h:117:1: */ + ns_uop_delete = 0 + ns_uop_add = 1 + ns_uop_max = 2 +) + +const ( /* nameser.h:147:1: */ + ns_t_invalid = 0 + ns_t_a = 1 + ns_t_ns = 2 + ns_t_md = 3 + ns_t_mf = 4 + ns_t_cname = 5 + ns_t_soa = 6 + ns_t_mb = 7 + ns_t_mg = 8 + ns_t_mr = 9 + ns_t_null = 10 + ns_t_wks = 11 + ns_t_ptr = 12 + ns_t_hinfo = 13 + ns_t_minfo = 14 + ns_t_mx = 15 + ns_t_txt = 16 + ns_t_rp = 17 + ns_t_afsdb = 18 + ns_t_x25 = 19 + ns_t_isdn = 20 + ns_t_rt = 21 + ns_t_nsap = 22 + ns_t_nsap_ptr = 23 + ns_t_sig = 24 + ns_t_key = 25 + ns_t_px = 26 + ns_t_gpos = 27 + ns_t_aaaa = 28 + ns_t_loc = 29 + ns_t_nxt = 30 + ns_t_eid = 31 + ns_t_nimloc = 32 + ns_t_srv = 33 + ns_t_atma = 34 + ns_t_naptr = 35 + ns_t_kx = 36 + ns_t_cert = 37 + ns_t_a6 = 38 + ns_t_dname = 39 + ns_t_sink = 40 + ns_t_opt = 41 + ns_t_apl = 42 + ns_t_tkey = 249 + ns_t_tsig = 250 + ns_t_ixfr = 251 + ns_t_axfr = 252 + ns_t_mailb = 253 + ns_t_maila = 254 + ns_t_any = 255 + ns_t_zxfr = 256 + ns_t_max = 65536 +) + +const ( /* nameser.h:210:1: */ + ns_c_invalid = 0 + ns_c_in = 1 + ns_c_2 = 2 + ns_c_chaos = 3 + ns_c_hs = 4 + ns_c_none = 254 + ns_c_any = 255 + ns_c_max = 65536 +) + +const ( /* nameser.h:221:1: */ + ns_kt_rsa = 1 + ns_kt_dh = 2 + ns_kt_dsa = 3 + ns_kt_private = 254 +) + +const ( /* nameser.h:228:1: */ + cert_t_pkix = 1 + cert_t_spki = 2 + cert_t_pgp = 3 + cert_t_url = 253 + cert_t_oid = 254 +) + +const ( /* nameser.h:28:1: */ + ns_s_qd = 0 + ns_s_zn = 0 + ns_s_an = 1 + ns_s_pr = 1 + ns_s_ns = 2 + ns_s_ud = 2 + ns_s_ar = 3 + ns_s_max = 4 +) + +const ( /* nameser.h:75:1: */ + ns_f_qr = 0 + ns_f_opcode = 1 + ns_f_aa = 2 + ns_f_tc = 3 + ns_f_rd = 4 + ns_f_ra = 5 + ns_f_z = 6 + ns_f_ad = 7 + ns_f_cd = 8 + ns_f_rcode = 9 + ns_f_max = 10 +) + +const ( /* nameser.h:89:1: */ + ns_o_query = 0 + ns_o_iquery = 1 + ns_o_status = 2 + ns_o_notify = 4 + ns_o_update = 5 + ns_o_max = 6 +) + +const ( /* nameser.h:98:1: */ + ns_r_noerror = 0 + ns_r_formerr = 1 + ns_r_servfail = 2 + ns_r_nxdomain = 3 + ns_r_notimpl = 4 + ns_r_refused = 5 + ns_r_yxdomain = 6 + ns_r_yxrrset = 7 + ns_r_nxrrset = 8 + ns_r_notauth = 9 + ns_r_notzone = 10 + ns_r_max = 11 + ns_r_badvers = 16 + ns_r_badsig = 16 + ns_r_badkey = 17 + ns_r_badtime = 18 +) + +type ptrdiff_t = int32 /* <builtin>:3:26 */ + +type size_t = uint32 /* <builtin>:9:23 */ + +type wchar_t = int32 /* <builtin>:15:24 */ + +type ssize_t = int32 /* ctype_.cpp.c:111:18 */ + +type __sfpos = struct { + F_pos int32 + F_mbstate_in struct { + F__mbstateL int32 + F__ccgo_pad1 [124]byte + } + F_mbstate_out struct { + F__mbstateL int32 + F__ccgo_pad1 [124]byte + } +} /* ctype_.cpp.c:121:9 */ + +type fpos_t = __sfpos /* ctype_.cpp.c:124:3 */ +type __sbuf = struct { + F_base uintptr + F_size int32 +} /* ctype_.cpp.c:126:1 */ + +type __sFILE = struct { + F_p uintptr + F_r int32 + F_w int32 + F_flags uint16 + F_file int16 + F_bf struct { + F_base uintptr + F_size int32 + } + F_lbfsize int32 + F_cookie uintptr + F_close uintptr + F_read uintptr + F_seek uintptr + F_write uintptr + F_ext struct { + F_base uintptr + F_size int32 + } + F_up uintptr + F_ur int32 + F_ubuf [3]uint8 + F_nbuf [1]uint8 + F_flush uintptr + F_lb_unused [4]uint8 + F_blksize int32 + F_offset int32 +} /* ctype_.cpp.c:131:9 */ + +type FILE = __sFILE /* ctype_.cpp.c:165:3 */ + +type off_t = int32 /* ctype_.cpp.c:365:17 */ + +type locale_t = uintptr /* ctype_.cpp.c:514:24 */ +var X_C_ctype_tab_ = [257]uint16{ + 0: uint16(0), + + 1: uint16(0x0002), + 2: uint16(0x0002), + 3: uint16(0x0002), + 4: uint16(0x0002), + + 5: uint16(0x0002), + 6: uint16(0x0002), + 7: uint16(0x0002), + 8: uint16(0x0002), + + 9: uint16(0x0002), + 10: uint16(0x0200 | + 0x0002 | + 0x0040), + 11: uint16(0x0002 | + 0x0040), + 12: uint16(0x0002 | + 0x0040), + + 13: uint16(0x0002 | + 0x0040), + 14: uint16(0x0002 | + 0x0040), + 15: uint16(0x0002), + 16: uint16(0x0002), + + 17: uint16(0x0002), + 18: uint16(0x0002), + 19: uint16(0x0002), + 20: uint16(0x0002), + + 21: uint16(0x0002), + 22: uint16(0x0002), + 23: uint16(0x0002), + 24: uint16(0x0002), + + 25: uint16(0x0002), + 26: uint16(0x0002), + 27: uint16(0x0002), + 28: uint16(0x0002), + + 29: uint16(0x0002), + 30: uint16(0x0002), + 31: uint16(0x0002), + 32: uint16(0x0002), + + 33: uint16(0x0200 | + 0x0400 | + 0x0040), + 34: uint16(0x0008 | + 0x0400 | + 0x0020), + 35: uint16(0x0008 | + 0x0400 | + 0x0020), + 36: uint16(0x0008 | + 0x0400 | + 0x0020), + + 37: uint16(0x0008 | + 0x0400 | + 0x0020), + 38: uint16(0x0008 | + 0x0400 | + 0x0020), + 39: uint16(0x0008 | + 0x0400 | + 0x0020), + 40: uint16(0x0008 | + 0x0400 | + 0x0020), + + 41: uint16(0x0008 | + 0x0400 | + 0x0020), + 42: uint16(0x0008 | + 0x0400 | + 0x0020), + 43: uint16(0x0008 | + 0x0400 | + 0x0020), + 44: uint16(0x0008 | + 0x0400 | + 0x0020), + + 45: uint16(0x0008 | + 0x0400 | + 0x0020), + 46: uint16(0x0008 | + 0x0400 | + 0x0020), + 47: uint16(0x0008 | + 0x0400 | + 0x0020), + 48: uint16(0x0008 | + 0x0400 | + 0x0020), + + 49: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 50: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 51: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 52: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + + 53: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 54: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 55: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 56: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + + 57: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 58: uint16(0x0004 | + 0x0008 | + 0x0400 | + 0x0100), + 59: uint16(0x0008 | + 0x0400 | + 0x0020), + 60: uint16(0x0008 | + 0x0400 | + 0x0020), + + 61: uint16(0x0008 | + 0x0400 | + 0x0020), + 62: uint16(0x0008 | + 0x0400 | + 0x0020), + 63: uint16(0x0008 | + 0x0400 | + 0x0020), + 64: uint16(0x0008 | + 0x0400 | + 0x0020), + + 65: uint16(0x0008 | + 0x0400 | + 0x0020), + 66: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080 | + 0x0100), + 67: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080 | + 0x0100), + 68: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080 | + 0x0100), + + 69: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080 | + 0x0100), + 70: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080 | + 0x0100), + 71: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080 | + 0x0100), + 72: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + + 73: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 74: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 75: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 76: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + + 77: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 78: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 79: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 80: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + + 81: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 82: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 83: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 84: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + + 85: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 86: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 87: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 88: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + + 89: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 90: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 91: uint16(0x0001 | + 0x0008 | + 0x0400 | + 0x0080), + 92: uint16(0x0008 | + 0x0400 | + 0x0020), + + 93: uint16(0x0008 | + 0x0400 | + 0x0020), + 94: uint16(0x0008 | + 0x0400 | + 0x0020), + 95: uint16(0x0008 | + 0x0400 | + 0x0020), + 96: uint16(0x0008 | + 0x0400 | + 0x0020), + + 97: uint16(0x0008 | + 0x0400 | + 0x0020), + 98: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400 | + 0x0100), + 99: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400 | + 0x0100), + 100: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400 | + 0x0100), + + 101: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400 | + 0x0100), + 102: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400 | + 0x0100), + 103: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400 | + 0x0100), + 104: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + + 105: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 106: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 107: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 108: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + + 109: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 110: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 111: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 112: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + + 113: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 114: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 115: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 116: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + + 117: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 118: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 119: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 120: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + + 121: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 122: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 123: uint16(0x0001 | + 0x0008 | + 0x0010 | + 0x0400), + 124: uint16(0x0008 | + 0x0400 | + 0x0020), + + 125: uint16(0x0008 | + 0x0400 | + 0x0020), + 126: uint16(0x0008 | + 0x0400 | + 0x0020), + 127: uint16(0x0008 | + 0x0400 | + 0x0020), + 128: uint16(0x0002), +} /* ctype_.cpp.c:601:22 */ +var X_ctype_tab_ uintptr = 0 /* ctype_.cpp.c:2233:22 */ + +func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ + return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) +} + +type locale_t1 = uintptr /* alltypes.h:336:32 */ + +func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisalpha(tls, c) + } + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + }() != 0 || func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0) +} + +func X__isalnum_l(tls *TLS, c int32, l locale_t1) int32 { /* isalnum.c:8:5: */ + return Xisalnum(tls, c) +} + +func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) +} + +func X__isalpha_l(tls *TLS, c int32, l locale_t1) int32 { /* isalpha.c:9:5: */ + return Xisalpha(tls, c) +} + +func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ + return Bool32(uint32(c)-uint32('0') < uint32(10)) +} + +func X__isdigit_l(tls *TLS, c int32, l locale_t1) int32 { /* isdigit.c:9:5: */ + return Xisdigit(tls, c) +} + +func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ + return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) +} + +func X__isprint_l(tls *TLS, c int32, l locale_t1) int32 { /* isprint.c:9:5: */ + return Xisprint(tls, c) +} + +type uintptr_t = uint32 /* alltypes.h:48:24 */ + +type intptr_t = int32 /* alltypes.h:63:15 */ + +type int8_t = int8 /* alltypes.h:89:25 */ + +type int16_t = int16 /* alltypes.h:94:25 */ + +type int32_t = int32 /* alltypes.h:99:25 */ + +type int64_t = int64 /* alltypes.h:104:25 */ + +type intmax_t = int64 /* alltypes.h:109:25 */ + +type uint8_t = uint8 /* alltypes.h:114:25 */ + +type uint16_t = uint16 /* alltypes.h:119:25 */ + +type uint32_t = uint32 /* alltypes.h:124:25 */ + +type uint64_t = uint64 /* alltypes.h:129:25 */ + +type uintmax_t = uint64 /* alltypes.h:139:25 */ + +type int_fast8_t = int8_t /* stdint.h:22:16 */ +type int_fast64_t = int64_t /* stdint.h:23:17 */ + +type int_least8_t = int8_t /* stdint.h:25:17 */ +type int_least16_t = int16_t /* stdint.h:26:17 */ +type int_least32_t = int32_t /* stdint.h:27:17 */ +type int_least64_t = int64_t /* stdint.h:28:17 */ + +type uint_fast8_t = uint8_t /* stdint.h:30:17 */ +type uint_fast64_t = uint64_t /* stdint.h:31:18 */ + +type uint_least8_t = uint8_t /* stdint.h:33:18 */ +type uint_least16_t = uint16_t /* stdint.h:34:18 */ +type uint_least32_t = uint32_t /* stdint.h:35:18 */ +type uint_least64_t = uint64_t /* stdint.h:36:18 */ + +type int_fast16_t = int32_t /* stdint.h:1:17 */ +type int_fast32_t = int32_t /* stdint.h:2:17 */ +type uint_fast16_t = uint32_t /* stdint.h:3:18 */ +type uint_fast32_t = uint32_t /* stdint.h:4:18 */ + +type off_t1 = int64 /* alltypes.h:155:16 */ + +type _IO_FILE = struct { + Fflags uint32 + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int32 + Fmode int32 + Flock int32 + Flbf int32 + Fcookie uintptr + Foff off_t1 + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + F__ccgo_pad1 [4]byte + Fshlim off_t1 + Fshcnt off_t1 + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr + F__ccgo_pad2 [4]byte +} /* alltypes.h:313:9 */ + +type FILE1 = _IO_FILE /* alltypes.h:313:25 */ + +type va_list = uintptr /* alltypes.h:319:27 */ + +type _G_fpos64_t = struct { + F__ccgo_pad1 [0]uint64 + F__opaque [16]uint8 +} /* stdio.h:54:9 */ + +type fpos_t1 = _G_fpos64_t /* stdio.h:58:3 */ + +type float_t = float32 /* alltypes.h:23:15 */ + +type double_t = float64 /* alltypes.h:28:16 */ + +func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var __u struct {F__f float32;} at bp, 4 + + *(*float32)(unsafe.Pointer(bp)) = __f + return *(*uint32)(unsafe.Pointer(bp)) +} + +func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var __u struct {F__f float64;} at bp, 8 + + *(*float64)(unsafe.Pointer(bp)) = __f + return *(*uint64)(unsafe.Pointer(bp)) +} + +type syscall_arg_t = int32 /* syscall.h:22:14 */ + +func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ + var c int32 + var x int32 + var y int64 + var neg int32 = 0 + + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c == '+' || c == '-' { + neg = Bool32(c == '-') + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') >= 10 && pok != 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + if uint32(c-'0') >= 10 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + return -0x7fffffffffffffff - int64(1) + } + for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + x = 10*x + c - '0' + } + for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + y = int64(10)*y + int64(c) - int64('0') + } + for ; uint32(c-'0') < 10; c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + } + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + if neg != 0 { + return -y + } + return y +} + +func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var x [128]uint32_t at bp, 512 + + var i int32 + var j int32 + var k int32 + var a int32 + var z int32 + var lrp int64 = int64(0) + var dc int64 = int64(0) + var e10 int64 = int64(0) + var lnz int32 = 0 + var gotdig int32 = 0 + var gotrad int32 = 0 + var rp int32 + var e2 int32 + var emax int32 = -emin - bits + 3 + var denormal int32 = 0 + var y float64 + var frac float64 = float64(0) + var bias float64 = float64(0) + + j = 0 + k = 0 + + // Don't let leading zeros consume buffer space + for ; c == '0'; c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + if c == '.' { + gotrad = 1 + for c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }(); c == '0'; c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + lrp-- + } + } + + *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) + for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + gotrad = 1 + lrp = dc + } else if k < 128-3 { + dc++ + if c != '0' { + lnz = int32(dc) + } + if j != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') + } + if PreIncInt32(&j, 1) == 9 { + k++ + j = 0 + } + gotdig = 1 + } else { + dc++ + if c != '0' { + lnz = (128 - 4) * 9 + *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) + } + } + } + if !(gotrad != 0) { + lrp = dc + } + + if gotdig != 0 && c|32 == 'e' { + e10 = scanexp(tls, f, pok) + if e10 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e10 = int64(0) + } + lrp = lrp + e10 + } else if c >= 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + if !(gotdig != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + // Handle zero specially to avoid nasty special cases later + if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { + return float64(sign) * 0.0 + } + + // Optimize small integers (w/no exponent) and over/under-flow + if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if lrp > int64(-emin/2) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if lrp < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + // Align incomplete final B1B digit + if j != 0 { + for ; j < 9; j++ { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10) + } + k++ + j = 0 + } + + a = 0 + z = k + e2 = 0 + rp = int32(lrp) + + // Optimize small to mid-size integers (even in exp. notation) + if lnz < 9 && lnz <= rp && rp < 18 { + if rp == 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if rp < 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp]) + } + var bitlim int32 = bits - 3*(rp-9) + if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10]) + } + } + + // Drop trailing zeros + for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- { + } + + // Align radix point to B1B digit boundary + if rp%9 != 0 { + var rpm9 int32 + if rp >= 0 { + rpm9 = rp % 9 + } else { + rpm9 = rp%9 + 9 + } + var p10 int32 = _sp10s[8-rpm9] + var carry uint32_t = uint32_t(0) + for k = a; k != z; k++ { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry + carry = uint32_t(1000000000/p10) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + rp = rp - 9 + } + } + if carry != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry + } + rp = rp + (9 - rpm9) + } + + // Upscale until desired number of bits are left of radix point + for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] { + var carry uint32_t = uint32_t(0) + e2 = e2 - 29 + for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) { + var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry) + if tmp > uint64(1000000000) { + carry = uint32_t(tmp / uint64(1000000000)) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000)) + } else { + carry = uint32_t(0) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp) + } + if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + z = k + } + if k == a { + break + } + } + if carry != 0 { + rp = rp + 9 + a = (a - 1) & (128 - 1) + if a == z { + z = (z - 1) & (128 - 1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) + } + *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry + } + } + + // Downscale until exactly number of bits are left of radix point + for { + var carry uint32_t = uint32_t(0) + var sh int32 = 1 + for i = 0; i < 2; i++ { + k = (a + i) & (128 - 1) + if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] { + i = 2 + break + } + if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] { + break + } + } + if i == 2 && rp == 9*2 { + break + } + // FIXME: find a way to compute optimal sh + if rp > 9+9*2 { + sh = 9 + } + e2 = e2 + sh + for k = a; k != z; k = (k + 1) & (128 - 1) { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry + carry = uint32_t(int32(1000000000)>>sh) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + i-- + rp = rp - 9 + } + } + if carry != 0 { + if (z+1)&(128-1) != a { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry + z = (z + 1) & (128 - 1) + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1) + } + } + } + + // Assemble desired bits into floating point variable + for y = float64(AssignInt32(&i, 0)); i < 2; i++ { + if (a+i)&(128-1) == z { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0) + } + y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4))) + } + + y = y * float64(sign) + + // Limit precision for denormal results + if bits > 53+e2-emin { + bits = 53 + e2 - emin + if bits < 0 { + bits = 0 + } + denormal = 1 + } + + // Calculate bias term to force rounding, move out lower bits + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 2*53-bits-1), y) + frac = Xfmodl(tls, y, Xscalbn(tls, float64(1), 53-bits)) + y = y - frac + y = y + bias + } + + // Process tail of decimal input so it can affect rounding + if (a+i)&(128-1) != z { + var t uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) + if t < uint32_t(500000000) && (t != 0 || (a+i+1)&(128-1) != z) { + frac = frac + 0.25*float64(sign) + } else if t > uint32_t(500000000) { + frac = frac + 0.75*float64(sign) + } else if t == uint32_t(500000000) { + if (a+i+1)&(128-1) == z { + frac = frac + 0.5*float64(sign) + } else { + frac = frac + 0.75*float64(sign) + } + } + if 53-bits >= 2 && !(Xfmodl(tls, frac, float64(1)) != 0) { + frac += 1 + } + } + + y = y + frac + y = y - bias + + if (e2+53)&0x7fffffff > emax-5 { + if Xfabsl(tls, y) >= float64(float64(2))/2.22044604925031308085e-16 { + if denormal != 0 && bits == 53+e2-emin { + denormal = 0 + } + y = y * 0.5 + e2++ + } + if e2+53 > emax || denormal != 0 && frac != 0 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + } + + return Xscalbnl(tls, y, e2) +} + +var _sth = [2]uint32_t{uint32_t(9007199), uint32_t(254740991)} /* floatscan.c:67:24 */ +var _sp10s = [8]int32{10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000} /* floatscan.c:80:19 */ + +func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:315:20: */ + var x uint32_t = uint32_t(0) + var y float64 = float64(0) + var scale float64 = float64(1) + var bias float64 = float64(0) + var gottail int32 = 0 + var gotrad int32 = 0 + var gotdig int32 = 0 + var rp int64 = int64(0) + var dc int64 = int64(0) + var e2 int64 = int64(0) + var d int32 + var c int32 + + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + + // Skip leading zeros + for ; c == '0'; c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + + if c == '.' { + gotrad = 1 + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + // Count zeros after the radix point before significand + rp = int64(0) + __1: + if !(c == '0') { + goto __3 + } + gotdig = 1 + goto __2 + __2: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + rp-- + goto __1 + goto __3 + __3: + } + + for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + rp = dc + gotrad = 1 + } else { + gotdig = 1 + if c > '9' { + d = c | 32 + 10 - 'a' + } else { + d = c - '0' + } + if dc < int64(8) { + x = x*uint32_t(16) + uint32_t(d) + } else if dc < int64(53/4+1) { + y = y + float64(d)*AssignDivFloat64(&scale, float64(16)) + } else if d != 0 && !(gottail != 0) { + y = y + 0.5*scale + gottail = 1 + } + dc++ + } + } + if !(gotdig != 0) { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + if gotrad != 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } else { + X__shlim(tls, f, int64(0)) + } + return float64(sign) * 0.0 + } + if !(gotrad != 0) { + rp = dc + } + for dc < int64(8) { + x = x * uint32_t(16) + dc++ + } + if c|32 == 'p' { + e2 = scanexp(tls, f, pok) + if e2 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e2 = int64(0) + } + } else { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + e2 = e2 + (int64(4)*rp - int64(32)) + + if !(x != 0) { + return float64(sign) * 0.0 + } + if e2 > int64(-emin) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if e2 < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + for x < 0x80000000 { + if y >= 0.5 { + x = x + (x + uint32_t(1)) + y = y + (y - float64(1)) + } else { + x = x + x + y = y + y + } + e2-- + } + + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) + if bits < 0 { + bits = 0 + } + } + + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 32+53-bits-1), float64(sign)) + } + + if bits < 32 && y != 0 && !(x&uint32_t(1) != 0) { + x++ + y = float64(0) + } + + y = bias + float64(sign)*float64(x) + float64(sign)*y + y = y - bias + + if !(y != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + + return Xscalbnl(tls, y, int32(e2)) +} + +func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */ + var sign int32 = 1 + var i size_t + var bits int32 + var emin int32 + var c int32 + + switch prec { + case 0: + bits = 24 + emin = -125 - bits + break + case 1: + bits = 53 + emin = -1021 - bits + break + case 2: + bits = 53 + emin = -1021 - bits + break + default: + return float64(0) + } + + for __isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0 { + } + + if c == '+' || c == '-' { + sign = sign - 2*Bool32(c == '-') + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + + for i = size_t(0); i < size_t(8) && c|32 == int32(*(*uint8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { + if i < size_t(7) { + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + if i == size_t(3) || i == size_t(8) || i > size_t(3) && pok != 0 { + if i != size_t(8) { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + for ; i > size_t(3); i-- { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + } + return float64(float32(sign) * X__builtin_inff(tls)) + } + if !(i != 0) { + for i = size_t(0); i < size_t(3) && c|32 == int32(*(*uint8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { + if i < size_t(2) { + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + } + if i == size_t(3) { + if func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() != '(' { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + return float64(X__builtin_nanf(tls, ts+13)) + } + for i = size_t(1); ; i++ { + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') < 10 || uint32(c-'A') < 26 || uint32(c-'a') < 26 || c == '_' { + continue + } + if c == ')' { + return float64(X__builtin_nanf(tls, ts+13)) + } + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + for PostDecUint32(&i, 1) != 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + return float64(X__builtin_nanf(tls, ts+13)) + } + return float64(X__builtin_nanf(tls, ts+13)) + } + + if i != 0 { + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + if c == '0' { + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c|32 == 'x' { + return hexfloat(tls, f, bits, emin, sign, pok) + } + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + c = '0' + } + + return decfloat(tls, f, c, bits, emin, sign, pok) +} + +// Lookup table for digit values. -1==255>=36 -> invalid +var table = [257]uint8{Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), +} /* intscan.c:7:28 */ + +func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */ + var val uintptr + var c int32 + var neg int32 + var x uint32 + var y uint64 + var bs int32 + val = uintptr(unsafe.Pointer(&table)) + uintptr(1) + neg = 0 + if !(base > uint32(36) || base == uint32(1)) { + goto __1 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__1: + ; +__2: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __3 + } + goto __2 +__3: + ; + if !(c == '+' || c == '-') { + goto __4 + } + neg = -Bool32(c == '-') + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() +__4: + ; + if !((base == uint32(0) || base == uint32(16)) && c == '0') { + goto __5 + } + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(c|32 == 'x') { + goto __7 + } + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { + goto __9 + } + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + goto __10 + } + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + goto __11 +__10: + X__shlim(tls, f, int64(0)) +__11: + ; + return uint64(0) +__9: + ; + base = uint32(16) + goto __8 +__7: + if !(base == uint32(0)) { + goto __12 + } + base = uint32(8) +__12: + ; +__8: + ; + goto __6 +__5: + if !(base == uint32(0)) { + goto __13 + } + base = uint32(10) +__13: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { + goto __14 + } + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + X__shlim(tls, f, int64(0)) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__14: + ; +__6: + ; + if !(base == uint32(10)) { + goto __15 + } + x = uint32(0) +__17: + if !(uint32(c-'0') < 10 && x <= 0xffffffff/uint32(10)-uint32(1)) { + goto __19 + } + x = x*uint32(10) + uint32(c-'0') + goto __18 +__18: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __17 + goto __19 +__19: + ; + y = uint64(x) +__20: + if !(uint32(c-'0') < 10 && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(10) && uint64(10)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(c-'0')) { + goto __22 + } + y = y*uint64(10) + uint64(c-'0') + goto __21 +__21: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __20 + goto __22 +__22: + ; + if !(uint32(c-'0') >= 10) { + goto __23 + } + goto done +__23: + ; + goto __16 +__15: + if !!(base&(base-uint32(1)) != 0) { + goto __24 + } + bs = int32(*(*uint8)(unsafe.Pointer(ts + 14 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + x = uint32(0) +__26: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { + goto __28 + } + x = x<<bs | uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __27 +__27: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __26 + goto __28 +__28: + ; + y = uint64(x) +__29: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= uint64(2*uint64(0x7fffffffffffffff)+uint64(1))>>bs) { + goto __31 + } + y = y<<bs | uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __30 +__30: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __29 + goto __31 +__31: + ; + goto __25 +__24: + x = uint32(0) +__32: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(36)-uint32(1)) { + goto __34 + } + x = x*base + uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __33 +__33: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __32 + goto __34 +__34: + ; + y = uint64(x) +__35: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(base) && uint64(base)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { + goto __37 + } + y = y*uint64(base) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __36 +__36: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __35 + goto __37 +__37: + ; +__25: + ; +__16: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __38 + } +__39: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __41 + } + goto __40 +__40: + c = func() int32 { + if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __39 + goto __41 +__41: + ; + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + y = lim + if !(lim&uint64(1) != 0) { + goto __42 + } + neg = 0 +__42: + ; +__38: + ; +done: + if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE1)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(y >= lim) { + goto __43 + } + if !(!(lim&uint64(1) != 0) && !(neg != 0)) { + goto __44 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim - uint64(1) + goto __45 +__44: + if !(y > lim) { + goto __46 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim +__46: + ; +__45: + ; +__43: + ; + return y ^ uint64(neg) - uint64(neg) +} + +// The shcnt field stores the number of bytes read so far, offset by +// the value of buf-rpos at the last function call (__shlim or __shgetc), +// so that between calls the inline shcnt macro can add rpos-buf to get +// the actual count. + +func X__shlim(tls *TLS, f uintptr, lim off_t1) { /* shgetc.c:8:6: */ + (*FILE1)(unsafe.Pointer(f)).Fshlim = lim + (*FILE1)(unsafe.Pointer(f)).Fshcnt = off_t1((int32((*FILE1)(unsafe.Pointer(f)).Fbuf) - int32((*FILE1)(unsafe.Pointer(f)).Frpos)) / 1) + // If lim is nonzero, rend must be a valid pointer. + if lim != 0 && off_t1((int32((*FILE1)(unsafe.Pointer(f)).Frend)-int32((*FILE1)(unsafe.Pointer(f)).Frpos))/1) > lim { + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frpos + uintptr(lim) + } else { + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frend + } +} + +func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ + var c int32 + var cnt off_t1 = (*FILE1)(unsafe.Pointer(f)).Fshcnt + off_t1((int32((*FILE1)(unsafe.Pointer(f)).Frpos)-int32((*FILE1)(unsafe.Pointer(f)).Fbuf))/1) + if (*FILE1)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE1)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE1)(unsafe.Pointer(f)).Fshcnt = off_t1((int32((*FILE1)(unsafe.Pointer(f)).Fbuf)-int32((*FILE1)(unsafe.Pointer(f)).Frpos))/1) + cnt + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frpos + (*FILE1)(unsafe.Pointer(f)).Fshlim = int64(-1) + return -1 + } + cnt++ + if (*FILE1)(unsafe.Pointer(f)).Fshlim != 0 && off_t1((int32((*FILE1)(unsafe.Pointer(f)).Frend)-int32((*FILE1)(unsafe.Pointer(f)).Frpos))/1) > (*FILE1)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frpos + uintptr((*FILE1)(unsafe.Pointer(f)).Fshlim-cnt) + } else { + (*FILE1)(unsafe.Pointer(f)).Fshend = (*FILE1)(unsafe.Pointer(f)).Frend + } + (*FILE1)(unsafe.Pointer(f)).Fshcnt = off_t1((int32((*FILE1)(unsafe.Pointer(f)).Fbuf)-int32((*FILE1)(unsafe.Pointer(f)).Frpos))/1) + cnt + if (*FILE1)(unsafe.Pointer(f)).Frpos <= (*FILE1)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE1)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) + } + return c +} + +func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */ + return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24 +} + +func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */ + return Xcopysign(tls, x, y) +} + +func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */ + return Xfabs(tls, x) +} + +func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */ + return Xfmod(tls, x, y) +} + +var toint double_t = float64(float64(1)) / 2.22044604925031308085e-16 /* rint.c:10:23 */ + +func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + var s int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 63) + var y double_t + + if e >= 0x3ff+52 { + return x + } + if s != 0 { + y = x - toint + toint + } else { + y = x + toint - toint + } + if y == float64(0) { + if s != 0 { + return -Float64FromFloat64(0.0) + } + return float64(0) + } + return y +} + +func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var u struct {Ff float64;} at bp, 8 + + var y double_t = x + + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + n = 1023 + } + } + } else if n < -1022 { + // make sure final n < -53 to avoid double + // rounding in the subnormal range + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + n = -1022 + } + } + } + *(*uint64_t)(unsafe.Pointer(bp)) = uint64_t(0x3ff+n) << 52 + x = y * *(*float64)(unsafe.Pointer(bp)) + return x +} + +func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ + return Xscalbn(tls, x, n) +} + +type div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:35 */ +type ldiv_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:63:36 */ +type lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:64:41 */ + +type max_align_t = struct { + F__ll int64 + F__ld float64 +} /* alltypes.h:34:54 */ + +type imaxdiv_t = struct { + Fquot intmax_t + Frem intmax_t +} /* inttypes.h:14:40 */ + +type pid_t = int32 /* alltypes.h:228:13 */ + +type uid_t = uint32 /* alltypes.h:238:18 */ + +type gid_t = uint32 /* alltypes.h:243:18 */ + +type iovec = struct { + Fiov_base uintptr + Fiov_len size_t +} /* alltypes.h:348:1 */ + +type socklen_t = uint32 /* alltypes.h:354:18 */ + +type sa_family_t = uint16 /* alltypes.h:359:24 */ + +type msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 +} /* socket.h:22:1 */ + +type cmsghdr = struct { + Fcmsg_len socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:44:1 */ + +type linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:74:1 */ + +type sockaddr = struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 +} /* socket.h:367:1 */ + +type sockaddr_storage = struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 +} /* socket.h:372:1 */ + +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ + +type sockaddr_in = struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t +} /* in.h:16:1 */ + +type in6_addr = struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } +} /* in.h:23:1 */ + +type sockaddr_in6 = struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t +} /* in.h:34:1 */ + +type ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:42:1 */ + +type ip_opts = struct { + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]uint8 +} /* in.h:229:1 */ + +type ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } +} /* in.h:247:1 */ + +type ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 +} /* in.h:252:1 */ + +type ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } +} /* in.h:258:1 */ + +type ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } +} /* in.h:264:1 */ + +type group_req = struct { + Fgr_interface uint32_t + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } +} /* in.h:275:1 */ + +type group_source_req = struct { + Fgsr_interface uint32_t + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } +} /* in.h:280:1 */ + +type group_filter = struct { + Fgf_interface uint32_t + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [122]uint8 + F__ss_align uint32 + } +} /* in.h:286:1 */ + +type in_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } +} /* in.h:297:1 */ + +type in6_pktinfo = struct { + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipi6_ifindex uint32 +} /* in.h:303:1 */ + +type ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t + } + Fip6m_mtu uint32_t +} /* in.h:308:1 */ + +type addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:16:1 */ + +// Legacy functions follow (marked OBsolete in SUS) + +type netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t +} /* netdb.h:62:1 */ + +type hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:69:1 */ + +type servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr +} /* netdb.h:78:1 */ + +type protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 +} /* netdb.h:85:1 */ + +type aibuf = struct { + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 +} /* lookup.h:10:1 */ + +type sa = struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte +} /* lookup.h:10:1 */ + +type address = struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 +} /* lookup.h:20:1 */ + +type service = struct { + Fport uint16_t + Fproto uint8 + Fsocktype uint8 +} /* lookup.h:27:1 */ + +type resolvconf = struct { + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 +} /* lookup.h:34:1 */ + +func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ + var cnt size_t + cnt = size_t(1) +__1: + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { + goto __3 + } + goto __2 +__2: + cnt++ + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next + goto __1 + goto __3 +__3: + ; + var b uintptr = p - uintptr(uint32(uintptr(0))) + b -= 68 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) + //TODO LOCK(b->lock); + if !(int32(AssignSubPtrInt16(b+66, int16(cnt))) != 0) { + Xfree(tls, b) + } + //TODO else UNLOCK(b->lock); +} + +type time_t = int64 /* alltypes.h:78:16 */ + +type clockid_t = int32 /* alltypes.h:207:13 */ + +type timespec = struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ +} /* alltypes.h:222:1 */ + +type pthread_t = uintptr /* alltypes.h:266:26 */ + +type pthread_once_t = int32 /* alltypes.h:272:13 */ + +type pthread_key_t = uint32 /* alltypes.h:277:18 */ + +type pthread_spinlock_t = int32 /* alltypes.h:282:13 */ + +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:287:37 */ + +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:292:37 */ + +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:297:37 */ + +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:302:40 */ + +type __sigset_t = struct{ F__bits [32]uint32 } /* alltypes.h:342:9 */ + +type sigset_t = __sigset_t /* alltypes.h:342:71 */ + +type pthread_attr_t = struct{ F__u struct{ F__i [9]int32 } } /* alltypes.h:365:147 */ + +type pthread_mutex_t = struct{ F__u struct{ F__i [6]int32 } } /* alltypes.h:370:157 */ + +type pthread_cond_t = struct{ F__u struct{ F__i [12]int32 } } /* alltypes.h:380:112 */ + +type pthread_rwlock_t = struct{ F__u struct{ F__i [8]int32 } } /* alltypes.h:390:139 */ + +type pthread_barrier_t = struct{ F__u struct{ F__i [5]int32 } } /* alltypes.h:395:137 */ + +type sched_param = struct { + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [4]int32 + F__reserved3 int32 +} /* sched.h:19:1 */ + +type timer_t = uintptr /* alltypes.h:202:14 */ + +type clock_t = int32 /* alltypes.h:212:14 */ + +type tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:38:1 */ + +type itimerspec = struct { + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ + } + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ + } +} /* time.h:80:1 */ + +type __ptcb = struct { + F__f uintptr + F__x uintptr + F__next uintptr +} /* pthread.h:206:1 */ + +type useconds_t = uint32 /* alltypes.h:253:18 */ + +func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ + bp := tls.Alloc(1608) + defer tls.Free(1608) + + // var ports [2]service at bp, 8 + + // var addrs [48]address at bp+8, 1344 + + // var canon [256]uint8 at bp+1352, 256 + + var outcanon uintptr + var nservs int32 + var naddrs int32 + var nais int32 + var canon_len int32 + var i int32 + var j int32 + var k int32 + var family int32 = 0 + var flags int32 = 0 + var proto int32 = 0 + var socktype int32 = 0 + var out uintptr + + if !(host != 0) && !(serv != 0) { + return -2 + } + + if hint != 0 { + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype + + var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 + if flags&mask != flags { + return -1 + } + + switch family { + case 2: + fallthrough + case 10: + fallthrough + case 0: + break + fallthrough + default: + return -6 + } + } + + if flags&0x20 != 0 { + Xabort(tls) //TODO- + // /* Define the "an address is configured" condition for address + // * families via ability to create a socket for the family plus + // * routability of the loopback address for the family. */ + // static const struct sockaddr_in lo4 = { + // .sin_family = AF_INET, .sin_port = 65535, + // .sin_addr.s_addr = __BYTE_ORDER == __BIG_ENDIAN + // ? 0x7f000001 : 0x0100007f + // }; + // static const struct sockaddr_in6 lo6 = { + // .sin6_family = AF_INET6, .sin6_port = 65535, + // .sin6_addr = IN6ADDR_LOOPBACK_INIT + // }; + // int tf[2] = { AF_INET, AF_INET6 }; + // const void *ta[2] = { &lo4, &lo6 }; + // socklen_t tl[2] = { sizeof lo4, sizeof lo6 }; + // for (i=0; i<2; i++) { + // if (family==tf[1-i]) continue; + // int s = socket(tf[i], SOCK_CLOEXEC|SOCK_DGRAM, + // IPPROTO_UDP); + // if (s>=0) { + // int cs; + // pthread_setcancelstate( + // PTHREAD_CANCEL_DISABLE, &cs); + // int r = connect(s, ta[i], tl[i]); + // pthread_setcancelstate(cs, 0); + // close(s); + // if (!r) continue; + // } + // switch (errno) { + // case EADDRNOTAVAIL: + // case EAFNOSUPPORT: + // case EHOSTUNREACH: + // case ENETDOWN: + // case ENETUNREACH: + // break; + // default: + // return EAI_SYSTEM; + // } + // if (family == tf[i]) return EAI_NONAME; + // family = tf[1-i]; + // } + } + + nservs = X__lookup_serv(tls, bp, serv, proto, socktype, flags) + if nservs < 0 { + return nservs + } + + naddrs = X__lookup_name(tls, bp+8, bp+1352, host, family, flags) + if naddrs < 0 { + return naddrs + } + + nais = nservs * naddrs + canon_len = int32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint32(1), uint32(nais)*uint32(unsafe.Sizeof(aibuf{}))+uint32(canon_len)+uint32(1)) + if !(out != 0) { + return -10 + } + + if canon_len != 0 { + outcanon = out + uintptr(nais)*68 + Xmemcpy(tls, outcanon, bp+1352, uint32(canon_len+1)) + } else { + outcanon = uintptr(0) + } + + for k = AssignInt32(&i, 0); i < naddrs; i++ { + j = 0 + __1: + if !(j < nservs) { + goto __3 + } + { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fslot = int16(k) + //TODO out[k].ai = (struct addrinfo){ + //TODO .ai_family = addrs[i].family, + //TODO .ai_socktype = ports[j].socktype, + //TODO .ai_protocol = ports[j].proto, + //TODO .ai_addrlen = addrs[i].family == AF_INET + //TODO ? sizeof(struct sockaddr_in) + //TODO : sizeof(struct sockaddr_in6), + //TODO .ai_addr = (void *)&out[k].sa, + //TODO .ai_canonname = outcanon }; + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { + return uint32(unsafe.Sizeof(sockaddr_in{})) + } + return uint32(unsafe.Sizeof(sockaddr_in6{})) + }() + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addr = out + uintptr(k)*68 + 32 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_canonname = outcanon + if k != 0 { + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*68)).Fai.Fai_next = out + uintptr(k)*68 + } + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { + case 2: + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + Xmemcpy(tls, out+uintptr(k)*68+32+4, bp+8+uintptr(i)*28+8, uint32(4)) + break + case 10: + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid + Xmemcpy(tls, out+uintptr(k)*68+32+8, bp+8+uintptr(i)*28+8, uint32(16)) + break + } + + } + goto __2 + __2: + j++ + k++ + goto __1 + goto __3 + __3: + } + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) + *(*uintptr)(unsafe.Pointer(res)) = out + return 0 +} + +type ucred = struct { + Fpid pid_t + Fuid uid_t + Fgid gid_t +} /* socket.h:57:1 */ + +type mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 +} /* socket.h:63:1 */ + +func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var size size_t = size_t(63) + // var res uintptr at bp, 4 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh) + _sh = Xmalloc(tls, AssignAddUint32(&size, size+size_t(1))) + if !(_sh != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyaddr_r(tls, a, l, af, _sh, + _sh+uintptr(1)*20, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh +} + +var _sh uintptr /* gethostbyaddr.c:9:24: */ + +func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */ + return Xgethostbyname2(tls, name, 2) +} + +func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var size size_t = size_t(63) + // var res uintptr at bp, 4 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh1) + _sh1 = Xmalloc(tls, AssignAddUint32(&size, size+size_t(1))) + if !(_sh1 != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyname2_r(tls, name, af, _sh1, + _sh1+uintptr(1)*20, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh1 +} + +var _sh1 uintptr /* gethostbyname2.c:10:24: */ + +func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname2_r.c:11:5: */ + bp := tls.Alloc(1600) + defer tls.Free(1600) + + // var addrs [48]address at bp, 1344 + + // var canon [256]uint8 at bp+1344, 256 + + var i int32 + var cnt int32 + var align size_t + var need size_t + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + cnt = X__lookup_name(tls, bp, bp+1344, name, af, 0x02) + if cnt < 0 { + switch cnt { + case -2: + *(*int32)(unsafe.Pointer(err)) = 1 + return 2 + fallthrough + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + fallthrough + default: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return 74 + fallthrough + case -10: + fallthrough + case -11: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + } + } + + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { + if af == 10 { + return 16 + } + return 4 + }() + + // Align buffer + align = uint32(-uintptr_t(buf)) & (uint32(unsafe.Sizeof(uintptr(0))) - uint32(1)) + + need = uint32(4) * uint32(unsafe.Sizeof(uintptr(0))) + need = need + uint32(cnt+1)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) + need = need + (Xstrlen(tls, name) + size_t(1)) + need = need + (Xstrlen(tls, bp+1344) + size_t(1)) + need = need + align + + if need > buflen { + return 34 + } + + buf += uintptr(align) + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf + buf += uintptr(uint32(3) * uint32(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf + buf += uintptr(uint32(cnt+1) * uint32(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < cnt; i++ { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) + } + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = uintptr(0) + + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + size_t(1)) + + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4))) + size_t(1)) + } else { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*4)) = uintptr(0) + + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +type if_nameindex = struct { + Fif_index uint32 + Fif_name uintptr +} /* if.h:12:1 */ + +type ifaddr = struct { + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 + } + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 + } + } + Fifa_ifp uintptr + Fifa_next uintptr +} /* if.h:51:1 */ + +type ifmap = struct { + Fmem_start uint32 + Fmem_end uint32 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte +} /* if.h:64:1 */ + +type ifreq = struct { + Fifr_ifrn struct{ Fifrn_name [16]uint8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint32 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]uint8 + } + } +} /* if.h:76:1 */ + +type ifconf = struct { + Fifc_len int32 + Fifc_ifcu struct{ Fifcu_buf uintptr } +} /* if.h:116:1 */ + +type ns_sect = uint32 /* nameser.h:37:3 */ + +type __ns_msg = struct { + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr +} /* nameser.h:39:9 */ + +type ns_msg = __ns_msg /* nameser.h:46:3 */ + +type _ns_flagdata = struct { + Fmask int32 + Fshift int32 +} /* nameser.h:48:1 */ + +type __ns_rr = struct { + Fname [1025]uint8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr +} /* nameser.h:59:9 */ + +type ns_rr = __ns_rr /* nameser.h:66:3 */ + +type ns_flag = uint32 /* nameser.h:87:3 */ + +type ns_opcode = uint32 /* nameser.h:96:3 */ + +type ns_rcode = uint32 /* nameser.h:115:3 */ + +type ns_update_operation = uint32 /* nameser.h:121:3 */ + +type ns_tsig_key1 = struct { + Fname [1025]uint8 + Falg [1025]uint8 + F__ccgo_pad1 [2]byte + Fdata uintptr + Flen int32 +} /* nameser.h:123:1 */ + +type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ + +type ns_tcp_tsig_state1 = struct { + Fcounter int32 + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 +} /* nameser.h:130:1 */ + +type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ + +type ns_type = uint32 /* nameser.h:200:3 */ + +type ns_class = uint32 /* nameser.h:219:3 */ + +type ns_key_types = uint32 /* nameser.h:226:3 */ + +type ns_cert_types = uint32 /* nameser.h:234:3 */ + +type HEADER = struct { + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ +} /* nameser.h:353:3 */ + +// unused; purely for broken apps +type __res_state = struct { + Fretrans int32 + Fretry int32 + Foptions uint32 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]uint8 + Fpfcode uint32 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F_u struct { + F__ccgo_pad1 [0]uint32 + Fpad [52]uint8 + } +} /* resolv.h:26:9 */ + +// unused; purely for broken apps +type res_state = uintptr /* resolv.h:62:3 */ + +type res_sym = struct { + Fnumber int32 + Fname uintptr + Fhumanname uintptr +} /* resolv.h:70:1 */ + +func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ + p += uintptr(uint32(3) * uint32(unsafe.Sizeof(int32(0)))) + *(*uint8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = uint8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*uint8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = uint8(uint32('0') + x%uint32(10)) + x = x / uint32(10) + } + return p +} + +func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + Xsprintf(tls, s, ts+23, + VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) +} + +func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ + var i int32 + for i = 15; i >= 0; i-- { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&15] + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = uint8('.') + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] + *(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = uint8('.') + } + Xstrcpy(tls, s, ts+48) +} + +var _sxdigits = *(*[17]uint8)(unsafe.Pointer(ts + 57)) /* getnameinfo.c:36:20 */ + +func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */ + bp := tls.Alloc(556) + defer tls.Free(556) + + // var line [512]uint8 at bp+16, 512 + + var p uintptr + var z uintptr + var _buf [1032]uint8 + _ = _buf + // var atmp [16]uint8 at bp, 16 + + // var iplit address at bp+528, 28 + + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var f uintptr = Xfopen(tls, ts+74, ts+85) + if !(f != 0) { + return + } + if family == 2 { + Xmemcpy(tls, bp+uintptr(12), a, uint32(4)) + Xmemcpy(tls, bp, ts+88, uint32(12)) + a = bp /* &atmp[0] */ + } + for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]uint8{})), f) != 0 { + if AssignUintptr(&p, Xstrchr(tls, bp+16, '#')) != 0 { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8('\n') + *(*uint8)(unsafe.Pointer(p)) = uint8(0) + } + + for p = bp + 16; /* &line[0] */ *(*uint8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8(0) + if X__lookup_ipliteral(tls, bp+528, bp+16, 0) <= 0 { + continue + } + + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { + Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint32(4)) + Xmemcpy(tls, bp+528+8, ts+88, uint32(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) + } + + if Xmemcmp(tls, a, bp+528+8, uint32(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { + continue + } + + for ; *(*uint8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*uint8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + if (int32(z)-int32(p))/1 < 256 { + Xmemcpy(tls, buf, p, uint32((int32(z)-int32(p))/1+1)) + break + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) +} + +func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getnameinfo.c:87:13: */ + Xabort(tls) //TODO- + // unsigned long svport; + // char line[128], *p, *z; + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) return; + // while (fgets(line, sizeof line, f)) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // for (p=line; *p && !isspace(*p); p++); + // if (!*p) continue; + // *p++ = 0; + // svport = strtoul(p, &z, 10); + + // if (svport != port || z==p) continue; + // if (dgram && strncmp(z, "/udp", 4)) continue; + // if (!dgram && strncmp(z, "/tcp", 4)) continue; + // if (p-line > 32) continue; + + // memcpy(buf, line, p-line); + // break; + // } + // __fclose_ca(f); +} + +var Xh_errno int32 /* h_errno.c:4:5: */ + +func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */ + return uintptr(unsafe.Pointer(&Xh_errno)) +} + +func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var s uintptr = s0 + var d uintptr = dest + *(*[4]uint32)(unsafe.Pointer(bp /* a */)) = [4]uint32{0: uint32(0)} + // var z uintptr at bp+16, 4 + + var i int32 + + for i = 0; i < 4; i++ { + *(*uint32)(unsafe.Pointer(bp + uintptr(i)*4)) = Xstrtoul(tls, s, bp+16, 0) + if *(*uintptr)(unsafe.Pointer(bp + 16)) == s || *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0 && int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != '.' || !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(s)))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) + }() != 0) { + return 0 + } + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != 0) { + break + } + s = *(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(1) + } + if i == 4 { + return 0 + } + switch i { + case 0: + *(*uint32)(unsafe.Pointer(bp + 1*4)) = *(*uint32)(unsafe.Pointer(bp)) & uint32(0xffffff) + AssignShrPtrUint32(bp, int(24)) + fallthrough + case 1: + *(*uint32)(unsafe.Pointer(bp + 2*4)) = *(*uint32)(unsafe.Pointer(bp + 1*4)) & uint32(0xffff) + AssignShrPtrUint32(bp+1*4, int(16)) + fallthrough + case 2: + *(*uint32)(unsafe.Pointer(bp + 3*4)) = *(*uint32)(unsafe.Pointer(bp + 2*4)) & uint32(0xff) + AssignShrPtrUint32(bp+2*4, int(8)) + } + for i = 0; i < 4; i++ { + if *(*uint32)(unsafe.Pointer(bp + uintptr(i)*4)) > uint32(255) { + return 0 + } + *(*uint8)(unsafe.Pointer(d + uintptr(i))) = uint8(*(*uint32)(unsafe.Pointer(bp + uintptr(i)*4))) + } + return 1 +} + +func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var a uintptr = a0 + var i int32 + var j int32 + var max int32 + var best int32 + // var buf [100]uint8 at bp+176, 100 + + switch af { + case 2: + if socklen_t(Xsnprintf(tls, s, uint32(l), ts+101, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + return s + } + break + case 10: + if Xmemcmp(tls, a, ts+88, uint32(12)) != 0 { + Xsnprintf(tls, bp+176, uint32(unsafe.Sizeof([100]uint8{})), + ts+113, + VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } else { + Xsnprintf(tls, bp+176, uint32(unsafe.Sizeof([100]uint8{})), + ts+137, + VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } + // Replace longest /(^0|:)[:0]{2,}/ with "::" + i = AssignInt32(&best, 0) + max = 2 + for ; *(*uint8)(unsafe.Pointer(bp + 176 + uintptr(i))) != 0; i++ { + if i != 0 && int32(*(*uint8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { + continue + } + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167)) + if j > max { + best = i + max = j + } + } + if max > 3 { + *(*uint8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrUint8(bp+176+uintptr(best+1), uint8(':')) + Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint32(i-best-max+1)) + } + if Xstrlen(tls, bp+176) < size_t(l) { + Xstrcpy(tls, s, bp+176) + return s + } + break + default: + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return uintptr(0) + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 28 + return uintptr(0) +} + +func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */ + if c-uint32('0') < uint32(10) { + return int32(c - uint32('0')) + } + c = c | uint32(32) + if c-uint32('a') < uint32(6) { + return int32(c - uint32('a') + uint32(10)) + } + return -1 +} + +func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var ip [8]uint16_t at bp, 16 + + var a uintptr = a0 + var i int32 + var j int32 + var v int32 + var d int32 + var brk int32 = -1 + var need_v4 int32 = 0 + + if af == 2 { + for i = 0; i < 4; i++ { + for v = AssignInt32(&j, 0); j < 3 && func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) + }() != 0; j++ { + v = 10*v + int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) - '0' + } + if j == 0 || j > 1 && int32(*(*uint8)(unsafe.Pointer(s))) == '0' || v > 255 { + return 0 + } + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == 3 { + return 1 + } + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != '.' { + return 0 + } + s += uintptr(j + 1) + } + return 0 + } else if af != 10 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return -1 + } + + if int32(*(*uint8)(unsafe.Pointer(s))) == ':' && int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != ':' { + return 0 + } + + for i = 0; ; i++ { + if int32(*(*uint8)(unsafe.Pointer(s))) == ':' && brk < 0 { + brk = i + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(0) + if !(int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != 0) { + break + } + if i == 7 { + return 0 + } + continue + } + for v = AssignInt32(&j, 0); j < 4 && AssignInt32(&d, hexval(tls, uint32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))))) >= 0; j++ { + v = 16*v + d + } + if j == 0 { + return 0 + } + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(v) + if !(int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != 0) && (brk >= 0 || i == 7) { + break + } + if i == 7 { + return 0 + } + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != ':' { + if int32(*(*uint8)(unsafe.Pointer(s + uintptr(j)))) != '.' || i < 6 && brk < 0 { + return 0 + } + need_v4 = 1 + i++ + break + } + s += uintptr(j + 1) + } + if brk >= 0 { + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint32(2*(i+1-brk))) + for j = 0; j < 7-i; j++ { + *(*uint16_t)(unsafe.Pointer(bp + uintptr(brk+j)*2)) = uint16_t(0) + } + } + for j = 0; j < 8; j++ { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(int32(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) >> 8) + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) + } + if need_v4 != 0 && Xinet_pton(tls, 2, s, a-uintptr(4)) <= 0 { + return 0 + } + return 1 +} + +func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + // var a4 in_addr at bp, 4 + + // var a6 in6_addr at bp+68, 16 + + if X__inet_aton(tls, name, bp) > 0 { + if family == 10 { // wrong family + return -2 + } + Xmemcpy(tls, buf+8, bp, uint32(unsafe.Sizeof(in_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) + return 1 + } + // var tmp [64]uint8 at bp+4, 64 + + var p uintptr = Xstrchr(tls, name, '%') + // var z uintptr at bp+84, 4 + + var scopeid uint64 = uint64(0) + if p != 0 && (int32(p)-int32(name))/1 < 64 { + Xmemcpy(tls, bp+4, name, uint32((int32(p)-int32(name))/1)) + *(*uint8)(unsafe.Pointer(bp + 4 + uintptr((int32(p)-int32(name))/1))) = uint8(0) + name = bp + 4 /* &tmp[0] */ + } + + if Xinet_pton(tls, 10, name, bp+68) <= 0 { + return 0 + } + if family == 2 { // wrong family + return -2 + } + + Xmemcpy(tls, buf+8, bp+68, uint32(unsafe.Sizeof(in6_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 10 + if p != 0 { + if func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1))))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1))))-uint32('0') < uint32(10)) + }() != 0 { + scopeid = Xstrtoull(tls, p, bp+84, 10) + } else { + *(*uintptr)(unsafe.Pointer(bp + 84 /* z */)) = p - uintptr(1) + } + if *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 84)))) != 0 { + Xabort(tls) //TODO- + // if (!IN6_IS_ADDR_LINKLOCAL(&a6) && + // !IN6_IS_ADDR_MC_LINKLOCAL(&a6)) + // return EAI_NONAME; + // scopeid = if_nametoindex(p); + // if (!scopeid) return EAI_NONAME; + } + if scopeid > uint64(0xffffffff) { + return -2 + } + } + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) + return 1 +} + +type mode_t = uint32 /* alltypes.h:145:18 */ + +type flock = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t1 + Fl_len off_t1 + Fl_pid pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:24:1 */ + +func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ + var s uintptr + //TODO if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; + if Xstrnlen(tls, host, uint32(255))-size_t(1) >= size_t(254) { + return 0 + } + for s = host; int32(*(*uint8)(unsafe.Pointer(s))) >= 0x80 || int32(*(*uint8)(unsafe.Pointer(s))) == '.' || int32(*(*uint8)(unsafe.Pointer(s))) == '-' || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0; s++ { + } + return BoolInt32(!(*(*uint8)(unsafe.Pointer(s)) != 0)) +} + +var Xzero_struct_address address /* lookup_name.c:27:16: */ + +func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:29:12: */ + var cnt int32 = 0 + if name != 0 { + return 0 + } + if flags&0x01 != 0 { + //TODO if (family != AF_INET6) + //TODO buf[cnt++] = (struct address){ .family = AF_INET }; + if family != 10 { + var x = Xzero_struct_address + x.Ffamily = 2 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + //TODO if (family != AF_INET) + //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; + if family != 2 { + var x = Xzero_struct_address + x.Ffamily = 10 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + } else { + Xabort(tls) //TODO- + // if (family != AF_INET6) + // buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } }; + // if (family != AF_INET) + // buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } }; + } + return cnt +} + +func name_from_numeric(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_name.c:58:12: */ + return X__lookup_ipliteral(tls, buf, name, family) +} + +func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:63:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var line [512]uint8 at bp, 512 + + var l size_t = Xstrlen(tls, name) + var cnt int32 = 0 + var badfam int32 = 0 + var _buf [1032]uint8 + _ = _buf + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var _f FILE1 + _ = _f + var f uintptr = Xfopen(tls, ts+74, ts+85) + if !(f != 0) { + switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { + case 2: + fallthrough + case 20: + fallthrough + case 13: + return 0 + fallthrough + default: + return -11 + } + } + for Xfgets(tls, bp, int32(unsafe.Sizeof([512]uint8{})), f) != 0 && cnt < 48 { + var p uintptr + var z uintptr + + if AssignUintptr(&p, Xstrchr(tls, bp, '#')) != 0 { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8('\n') + *(*uint8)(unsafe.Pointer(p)) = uint8(0) + } + for p = bp + uintptr(1); AssignUintptr(&p, Xstrstr(tls, p, name)) != 0 && (!(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + UintptrFromInt32(-1))))) != 0) || !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + uintptr(l))))) != 0)); p++ { + } + if !(p != 0) { + continue + } + + // Isolate IP address to parse + for p = bp; /* &line[0] */ *(*uint8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = uint8(0) + switch name_from_numeric(tls, buf+uintptr(cnt)*28, bp, family) { + case 1: + cnt++ + break + case 0: + continue + default: + badfam = -2 + continue + } + + // Extract first name as canonical name + for ; *(*uint8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*uint8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*uint8)(unsafe.Pointer(z)) = uint8(0) + if is_valid_hostname(tls, p) != 0 { + Xmemcpy(tls, canon, p, uint32((int32(z)-int32(p))/1+1)) + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) + if cnt != 0 { + return cnt + } + return badfam +} + +type dpc_ctx = struct { + Faddrs uintptr + Fcanon uintptr + Fcnt int32 +} /* lookup_name.c:112:1 */ + +func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ + return -1 //TODO- + Xabort(tls) + return int32(0) //TODO- + // char search[256]; + // struct resolvconf conf; + // size_t l, dots; + // char *p, *z; + + // if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; + + // /* Count dots, suppress search when >=ndots or name ends in + // * a dot, which is an explicit request for global scope. */ + // for (dots=l=0; name[l]; l++) if (name[l]=='.') dots++; + // if (dots >= conf.ndots || name[l-1]=='.') *search = 0; + + // /* Strip final dot for canon, fail if multiple trailing dots. */ + // if (name[l-1]=='.') l--; + // if (!l || name[l-1]=='.') return EAI_NONAME; + + // /* This can never happen; the caller already checked length. */ + // if (l >= 256) return EAI_NONAME; + + // /* Name with search domain appended is setup in canon[]. This both + // * provides the desired default canonical name (if the requested + // * name is not a CNAME record) and serves as a buffer for passing + // * the full requested name to name_from_dns. */ + // memcpy(canon, name, l); + // canon[l] = '.'; + + // for (p=search; *p; p=z) { + // for (; isspace(*p); p++); + // for (z=p; *z && !isspace(*z); z++); + // if (z==p) break; + // if (z-p < 256 - l - 1) { + // memcpy(canon+l+1, p, z-p); + // canon[z-p+1+l] = 0; + // int cnt = name_from_dns(buf, canon, canon, family, &conf); + // if (cnt) return cnt; + // } + // } + + // canon[l] = 0; + // return name_from_dns(buf, canon, name, family, &conf); +} + +type policy = struct { + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 +} /* lookup_name.c:237:14 */ + +var defpolicy = [6]policy{ + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, + // Last rule must match all addresses to stop loop. + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: uint8(1)}, +} /* lookup_name.c:241:3 */ + +func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ + var i int32 + for i = 0; ; i++ { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint32(defpolicy[i].Flen)) != 0 { + continue + } + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { + continue + } + return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + } + return uintptr(0) +} + +func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) +} + +func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xff { + return int32(*(*uint8_t)(unsafe.Pointer(a + 1))) & 15 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 { + return 2 + } + if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 { + return 2 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0xc0 { + return 5 + } + return 14 +} + +func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12: */ + // FIXME: The common prefix length should be limited to no greater + // than the nominal length of the prefix portion of the source + // address. However the definition of the source prefix length is + // not clear and thus this limiting is not yet implemented. + var i uint32 + for i = uint32(0); i < uint32(128) && !((int32(*(*uint8_t)(unsafe.Pointer(s /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8)))))^int32(*(*uint8_t)(unsafe.Pointer(d /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8))))))&(int32(128)>>(i%uint32(8))) != 0); i++ { + } + return int32(i) +} + +func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ + var a uintptr = _a + var b uintptr = _b + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey +} + +func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var cnt int32 = 0 + var i int32 + var j int32 + _ = j + + *(*uint8)(unsafe.Pointer(canon)) = uint8(0) + if name != 0 { + // reject empty name and check len so it fits into temp bufs + var l size_t = Xstrnlen(tls, name, uint32(255)) + if l-size_t(1) >= size_t(254) { + return -2 + } + Xmemcpy(tls, canon, name, l+size_t(1)) + } + + // Procedurally, a request for v6 addresses with the v4-mapped + // flag set is like a request for unspecified family, followed + // by filtering of the results. + if flags&0x08 != 0 { + if family == 10 { + family = 0 + } else { + flags = flags - 0x08 + } + } + + // Try each backend until there's at least one result. + cnt = name_from_null(tls, buf, name, family, flags) + if !(cnt != 0) { + cnt = name_from_numeric(tls, buf, name, family) + } + if !(cnt != 0) && !(flags&0x04 != 0) { + cnt = name_from_hosts(tls, buf, canon, name, family) + if !(cnt != 0) { + cnt = name_from_dns_search(tls, buf, canon, name, family) + } + } + if cnt <= 0 { + if cnt != 0 { + return cnt + } + return -2 + } + + // Filter/transform results for v4-mapped lookup, if requested. + if flags&0x08 != 0 { + Xabort(tls) //TODO- + // if (!(flags & AI_ALL)) { + // /* If any v6 results exist, remove v4 results. */ + // for (i=0; i<cnt && buf[i].family != AF_INET6; i++); + // if (i<cnt) { + // for (j=0; i<cnt; i++) { + // if (buf[i].family == AF_INET6) + // buf[j++] = buf[i]; + // } + // cnt = i = j; + // } + // } + // /* Translate any remaining v4 results to v6 */ + // for (i=0; i<cnt; i++) { + // if (buf[i].family != AF_INET) continue; + // memcpy(buf[i].addr+12, buf[i].addr, 4); + // memcpy(buf[i].addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); + // buf[i].family = AF_INET6; + // } + } + + // No further processing is needed if there are fewer than 2 + // results or if there are only IPv4 results. + if cnt < 2 || family == 2 { + return cnt + } + for i = 0; i < cnt; i++ { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { + break + } + } + if i == cnt { + return cnt + } + var cs int32 + _ = cs + //TODO pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); + + // The following implements a subset of RFC 3484/6724 destination + // address selection by generating a single 31-bit sort key for + // each address. Rules 3, 4, and 7 are omitted for having + // excessive runtime and code size cost and dubious benefit. + // So far the label/precedence table cannot be customized. + for i = 0; i < cnt; i++ { + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily + var key int32 = 0 + *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} + *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} + var sa1 uintptr + var da uintptr + // var salen socklen_t at bp+88, 4 + + var dalen socklen_t + if family == 10 { + Xmemcpy(tls, bp+8, buf+uintptr(i)*28+8, uint32(16)) + da = bp /* &da6 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + sa1 = bp + 28 /* &sa6 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + } else { + Xmemcpy(tls, bp+28+8, + ts+88, uint32(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) + Xmemcpy(tls, bp+8, + ts+88, uint32(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) + Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint32(4)) + da = bp + 56 /* &da4 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in{})) + sa1 = bp + 72 /* &sa4 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in{})) + } + var dpolicy uintptr = policyof(tls, bp+8) + var dscope int32 = scopeof(tls, bp+8) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) + var prefixlen int32 = 0 + var fd int32 = Xsocket(tls, family, 2|02000000, 17) + if fd >= 0 { + if !(Xconnect(tls, fd, da, dalen) != 0) { + key = key | 0x40000000 + if !(Xgetsockname(tls, fd, sa1, bp+88) != 0) { + if family == 2 { + Xmemcpy(tls, + bp+28+8+uintptr(12), + bp+72+4, uint32(4)) + } + if dscope == scopeof(tls, bp+28+8) { + key = key | 0x20000000 + } + if dlabel == labelof(tls, bp+28+8) { + key = key | 0x10000000 + } + prefixlen = prefixmatch(tls, bp+28+8, + bp+8) + } + } + Xclose(tls, fd) + } + key = key | dprec<<20 + key = key | (15-dscope)<<16 + key = key | prefixlen<<8 + key = key | (48-i)<<0 + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key + } + Xqsort(tls, buf, uint32(cnt), uint32(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr) int32 + }{addrcmp}))) + + //TODO pthread_setcancelstate(cs, 0); + + return cnt +} + +func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var line [128]uint8 + _ = line + var cnt int32 = 0 + var p uintptr + _ = p + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ + var port uint32 = uint32(0) + + switch socktype { + case 1: + switch proto { + case 0: + proto = 6 + fallthrough + case 6: + break + default: + return -8 + } + break + case 2: + switch proto { + case 0: + proto = 17 + fallthrough + case 17: + break + default: + return -8 + } + fallthrough + case 0: + break + default: + if name != 0 { + return -8 + } + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) + return 1 + } + + if name != 0 { + if !(int32(*(*uint8)(unsafe.Pointer(name))) != 0) { + return -8 + } + port = Xstrtoul(tls, name, bp, 10) + } + if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0) { + if port > uint32(65535) { + return -8 + } + if proto != 17 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) + } + if proto != 6 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) + } + return cnt + } + + if flags&0x400 != 0 { + return -2 + } + + var l size_t = Xstrlen(tls, name) + _ = l + + Xabort(tls) //TODO- + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) switch (errno) { + // case ENOENT: + // case ENOTDIR: + // case EACCES: + // return EAI_SERVICE; + // default: + // return EAI_SYSTEM; + // } + + Xabort(tls) //TODO- + // while (fgets(line, sizeof line, f) && cnt < MAXSERVS) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // /* Find service name */ + // for(p=line; (p=strstr(p, name)); p++) { + // if (p>line && !isspace(p[-1])) continue; + // if (p[l] && !isspace(p[l])) continue; + // break; + // } + // if (!p) continue; + + // /* Skip past canonical name at beginning of line */ + // for (p=line; *p && !isspace(*p); p++); + + // port = strtoul(p, &z, 10); + // if (port > 65535 || z==p) continue; + // if (!strncmp(z, "/udp", 4)) { + // if (proto == IPPROTO_TCP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_DGRAM; + // buf[cnt++].proto = IPPROTO_UDP; + // } + // if (!strncmp(z, "/tcp", 4)) { + // if (proto == IPPROTO_UDP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_STREAM; + // buf[cnt++].proto = IPPROTO_TCP; + // } + // } + // __fclose_ca(f); + // return cnt > 0 ? cnt : EAI_SERVICE; + Xabort(tls) + return int32(0) //TODO- +} + +func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ + *(*int32)(unsafe.Pointer(f + 72)) |= (*FILE1)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE1)(unsafe.Pointer(f)).Fwpos != (*FILE1)(unsafe.Pointer(f)).Fwbase { + (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE1)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint32(0)) + } + (*FILE1)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+28, AssignPtrUintptr(f+16, uintptr(0))) + if (*FILE1)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { + *(*uint32)(unsafe.Pointer(f)) |= uint32(32) + return -1 + } + (*FILE1)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+8, (*FILE1)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE1)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE1)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { + return -1 + } + return 0 +} + +func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */ + X__builtin_abort(tls) //TODO- + // __stdio_exit_needed(); +} + +// This function assumes it will never be called if there is already +// data buffered for reading. + +func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ + bp := tls.Alloc(1) + defer tls.Free(1) + + // var c uint8 at bp, 1 + + if !(X__toread(tls, f) != 0) && (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE1)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint32(1)) == size_t(1) { + return int32(*(*uint8)(unsafe.Pointer(bp))) + } + return -1 +} + +func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ + var try uintptr + var sign int32 + for nel > size_t(0) { + try = base + uintptr(width*(nel/size_t(2))) + sign = (*struct { + f func(*TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) + if sign < 0 { + nel = nel / size_t(2) + } else if sign > 0 { + base = try + uintptr(width) + nel = nel - (nel/size_t(2) + size_t(1)) + } else { + return try + } + } + return uintptr(0) +} + +func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + // var f FILE1 at bp, 144 + + (*FILE1)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE1)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y float64 = X__floatscan(tls, bp, prec, 1) + var cnt off_t1 = (*FILE1)(unsafe.Pointer(bp)).Fshcnt + off_t1((int32((*FILE1)(unsafe.Pointer(bp)).Frpos)-int32((*FILE1)(unsafe.Pointer(bp)).Fbuf))/1) + if p != 0 { + *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { + if cnt != 0 { + return s + uintptr(cnt) + } + return s + }() + } + return y +} + +func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */ + return float32(strtox(tls, s, p, 0)) +} + +func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */ + return strtox(tls, s, p, 1) +} + +func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */ + return strtox(tls, s, p, 2) +} + +func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* strtol.c:8:27: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + // var f FILE1 at bp, 144 + + (*FILE1)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE1)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) + if p != 0 { + var cnt size_t = size_t((*FILE1)(unsafe.Pointer(bp)).Fshcnt + off_t1((int32((*FILE1)(unsafe.Pointer(bp)).Frpos)-int32((*FILE1)(unsafe.Pointer(bp)).Fbuf))/1)) + *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) + } + return y +} + +func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */ + return strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1)) +} + +func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:26:11: */ + return int64(strtox1(tls, s, p, base, Uint64FromInt64(-0x7fffffffffffffff-int64(1)))) +} + +func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) uint32 { /* strtol.c:31:15: */ + return uint32(strtox1(tls, s, p, base, uint64(2*uint32(0x7fffffff)+uint32(1)))) +} + +func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) int32 { /* strtol.c:36:6: */ + return int32(strtox1(tls, s, p, base, uint64(0+Uint32FromInt32(Int32(-Int32(0x7fffffff))-Int32FromInt32(1))))) +} + +func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) intmax_t { /* strtol.c:41:10: */ + return Xstrtoll(tls, s, p, base) +} + +func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */ + return Xstrtoull(tls, s, p, base) +} + +func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */ + var l size_t = Xstrlen(tls, s) + var d uintptr = Xmalloc(tls, l+size_t(1)) + if !(d != 0) { + return uintptr(0) + } + return Xmemcpy(tls, d, s, l+size_t(1)) +} + +func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */ + var p uintptr = Xmemchr(tls, s, 0, n) + if p != 0 { + return uint32((int32(p) - int32(s)) / 1) + } + return n +} + +func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var a uintptr = s + *(*[8]size_t)(unsafe.Pointer(bp /* byteset */)) = [8]size_t{0: size_t(0)} + + if !(int32(*(*uint8)(unsafe.Pointer(c))) != 0) { + return size_t(0) + } + if !(int32(*(*uint8)(unsafe.Pointer(c + 1))) != 0) { + for ; int32(*(*uint8)(unsafe.Pointer(s))) == int32(*(*uint8)(unsafe.Pointer(c))); s++ { + } + return size_t((int32(s) - int32(a)) / 1) + } + + for ; *(*uint8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint32(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4, size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; c++ { + } + for ; *(*uint8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4))&(size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; s++ { + } + return size_t((int32(s) - int32(a)) / 1) +} + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_tab_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_tab_)) // ctype_.cpp.c:2233:37: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_tab_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_tab_)) // ctype_.cpp.c:2233:37: +} + +var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/libc/musl_openbsd_386.go b/vendor/modernc.org/libc/musl_openbsd_386.go new file mode 100644 index 00000000..3bc61739 --- /dev/null +++ b/vendor/modernc.org/libc/musl_openbsd_386.go @@ -0,0 +1,4153 @@ +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. + +package libc + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +// musl as a whole is licensed under the following standard MIT license: +// +// ---------------------------------------------------------------------- +// Copyright © 2005-2020 Rich Felker, et al. +// +// 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. +// ---------------------------------------------------------------------- +// +// Authors/contributors include: +// +// A. Wilcox +// Ada Worcester +// Alex Dowad +// Alex Suykov +// Alexander Monakov +// Andre McCurdy +// Andrew Kelley +// Anthony G. Basile +// Aric Belsito +// Arvid Picciani +// Bartosz Brachaczek +// Benjamin Peterson +// Bobby Bingham +// Boris Brezillon +// Brent Cook +// Chris Spiegel +// Clément Vasseur +// Daniel Micay +// Daniel Sabogal +// Daurnimator +// David Carlier +// David Edelsohn +// Denys Vlasenko +// Dmitry Ivanov +// Dmitry V. Levin +// Drew DeVault +// Emil Renner Berthing +// Fangrui Song +// Felix Fietkau +// Felix Janda +// Gianluca Anzolin +// Hauke Mehrtens +// He X +// Hiltjo Posthuma +// Isaac Dunham +// Jaydeep Patil +// Jens Gustedt +// Jeremy Huntwork +// Jo-Philipp Wich +// Joakim Sindholt +// John Spencer +// Julien Ramseier +// Justin Cormack +// Kaarle Ritvanen +// Khem Raj +// Kylie McClain +// Leah Neukirchen +// Luca Barbato +// Luka Perkov +// M Farkas-Dyck (Strake) +// Mahesh Bodapati +// Markus Wichmann +// Masanori Ogino +// Michael Clark +// Michael Forney +// Mikhail Kremnyov +// Natanael Copa +// Nicholas J. Kain +// orc +// Pascal Cuoq +// Patrick Oppenlander +// Petr Hosek +// Petr Skocik +// Pierre Carrier +// Reini Urban +// Rich Felker +// Richard Pennington +// Ryan Fairfax +// Samuel Holland +// Segev Finer +// Shiz +// sin +// Solar Designer +// Stefan Kristiansson +// Stefan O'Rear +// Szabolcs Nagy +// Timo Teräs +// Trutz Behn +// Valentin Ochs +// Will Dietz +// William Haddon +// William Pitcock +// +// Portions of this software are derived from third-party works licensed +// under terms compatible with the above MIT license: +// +// The TRE regular expression implementation (src/regex/reg* and +// src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +// under a 2-clause BSD license (license text in the source files). The +// included version has been heavily modified by Rich Felker in 2012, in +// the interests of size, simplicity, and namespace cleanliness. +// +// Much of the math library code (src/math/* and src/complex/*) is +// Copyright © 1993,2004 Sun Microsystems or +// Copyright © 2003-2011 David Schultz or +// Copyright © 2003-2009 Steven G. Kargl or +// Copyright © 2003-2009 Bruce D. Evans or +// Copyright © 2008 Stephen L. Moshier or +// Copyright © 2017-2018 Arm Limited +// and labelled as such in comments in the individual source files. All +// have been licensed under extremely permissive terms. +// +// The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +// The Android Open Source Project and is licensed under a two-clause BSD +// license. It was taken from Bionic libc, used on Android. +// +// The AArch64 memcpy and memset code (src/string/aarch64/*) are +// Copyright © 1999-2019, Arm Limited. +// +// The implementation of DES for crypt (src/crypt/crypt_des.c) is +// Copyright © 1994 David Burren. It is licensed under a BSD license. +// +// The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +// originally written by Solar Designer and placed into the public +// domain. The code also comes with a fallback permissive license for use +// in jurisdictions that may not recognize the public domain. +// +// The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +// Valentin Ochs and is licensed under an MIT-style license. +// +// The x86_64 port was written by Nicholas J. Kain and is licensed under +// the standard MIT terms. +// +// The mips and microblaze ports were originally written by Richard +// Pennington for use in the ellcc project. The original code was adapted +// by Rich Felker for build system and code conventions during upstream +// integration. It is licensed under the standard MIT terms. +// +// The mips64 port was contributed by Imagination Technologies and is +// licensed under the standard MIT terms. +// +// The powerpc port was also originally written by Richard Pennington, +// and later supplemented and integrated by John Spencer. It is licensed +// under the standard MIT terms. +// +// All other files which have no copyright comments are original works +// produced specifically for use as part of this library, written either +// by Rich Felker, the main author of the library, or by one or more +// contibutors listed above. Details on authorship of individual files +// can be found in the git version control history of the project. The +// omission of copyright and license comments in each file is in the +// interest of source tree size. +// +// In addition, permission is hereby granted for all public header files +// (include/* and arch/*/bits/*) and crt files intended to be linked into +// applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +// the copyright notice and permission notice otherwise required by the +// license, and to use these files without any requirement of +// attribution. These files include substantial contributions from: +// +// Bobby Bingham +// John Spencer +// Nicholas J. Kain +// Rich Felker +// Richard Pennington +// Stefan Kristiansson +// Szabolcs Nagy +// +// all of whom have explicitly granted such permission. +// +// This file previously contained text expressing a belief that most of +// the files covered by the above exception were sufficiently trivial not +// to be subject to copyright, resulting in confusion over whether it +// negated the permissions granted in the license. In the spirit of +// permissive licensing, and of not having licensing issues being an +// obstacle to adoption, that text has been removed. +const ( /* copyright.c:194:1: */ + __musl__copyright__ = 0 +) + +const ( /* nameser.h:117:1: */ + ns_uop_delete = 0 + ns_uop_add = 1 + ns_uop_max = 2 +) + +const ( /* nameser.h:147:1: */ + ns_t_invalid = 0 + ns_t_a = 1 + ns_t_ns = 2 + ns_t_md = 3 + ns_t_mf = 4 + ns_t_cname = 5 + ns_t_soa = 6 + ns_t_mb = 7 + ns_t_mg = 8 + ns_t_mr = 9 + ns_t_null = 10 + ns_t_wks = 11 + ns_t_ptr = 12 + ns_t_hinfo = 13 + ns_t_minfo = 14 + ns_t_mx = 15 + ns_t_txt = 16 + ns_t_rp = 17 + ns_t_afsdb = 18 + ns_t_x25 = 19 + ns_t_isdn = 20 + ns_t_rt = 21 + ns_t_nsap = 22 + ns_t_nsap_ptr = 23 + ns_t_sig = 24 + ns_t_key = 25 + ns_t_px = 26 + ns_t_gpos = 27 + ns_t_aaaa = 28 + ns_t_loc = 29 + ns_t_nxt = 30 + ns_t_eid = 31 + ns_t_nimloc = 32 + ns_t_srv = 33 + ns_t_atma = 34 + ns_t_naptr = 35 + ns_t_kx = 36 + ns_t_cert = 37 + ns_t_a6 = 38 + ns_t_dname = 39 + ns_t_sink = 40 + ns_t_opt = 41 + ns_t_apl = 42 + ns_t_tkey = 249 + ns_t_tsig = 250 + ns_t_ixfr = 251 + ns_t_axfr = 252 + ns_t_mailb = 253 + ns_t_maila = 254 + ns_t_any = 255 + ns_t_zxfr = 256 + ns_t_max = 65536 +) + +const ( /* nameser.h:210:1: */ + ns_c_invalid = 0 + ns_c_in = 1 + ns_c_2 = 2 + ns_c_chaos = 3 + ns_c_hs = 4 + ns_c_none = 254 + ns_c_any = 255 + ns_c_max = 65536 +) + +const ( /* nameser.h:221:1: */ + ns_kt_rsa = 1 + ns_kt_dh = 2 + ns_kt_dsa = 3 + ns_kt_private = 254 +) + +const ( /* nameser.h:228:1: */ + cert_t_pkix = 1 + cert_t_spki = 2 + cert_t_pgp = 3 + cert_t_url = 253 + cert_t_oid = 254 +) + +const ( /* nameser.h:28:1: */ + ns_s_qd = 0 + ns_s_zn = 0 + ns_s_an = 1 + ns_s_pr = 1 + ns_s_ns = 2 + ns_s_ud = 2 + ns_s_ar = 3 + ns_s_max = 4 +) + +const ( /* nameser.h:75:1: */ + ns_f_qr = 0 + ns_f_opcode = 1 + ns_f_aa = 2 + ns_f_tc = 3 + ns_f_rd = 4 + ns_f_ra = 5 + ns_f_z = 6 + ns_f_ad = 7 + ns_f_cd = 8 + ns_f_rcode = 9 + ns_f_max = 10 +) + +const ( /* nameser.h:89:1: */ + ns_o_query = 0 + ns_o_iquery = 1 + ns_o_status = 2 + ns_o_notify = 4 + ns_o_update = 5 + ns_o_max = 6 +) + +const ( /* nameser.h:98:1: */ + ns_r_noerror = 0 + ns_r_formerr = 1 + ns_r_servfail = 2 + ns_r_nxdomain = 3 + ns_r_notimpl = 4 + ns_r_refused = 5 + ns_r_yxdomain = 6 + ns_r_yxrrset = 7 + ns_r_nxrrset = 8 + ns_r_notauth = 9 + ns_r_notzone = 10 + ns_r_max = 11 + ns_r_badvers = 16 + ns_r_badsig = 16 + ns_r_badkey = 17 + ns_r_badtime = 18 +) + +type ptrdiff_t = int32 /* <builtin>:3:26 */ + +type size_t = uint32 /* <builtin>:9:23 */ + +type wchar_t = int32 /* <builtin>:15:24 */ + +// # 1 "lib/libc/gen/ctype_.c" +// # 1 "<built-in>" +// # 1 "<command-line>" +// # 1 "lib/libc/gen/ctype_.c" +// # 36 "lib/libc/gen/ctype_.c" +// # 1 "./include/ctype.h" 1 +// # 43 "./include/ctype.h" +// # 1 "./sys/sys/cdefs.h" 1 +// # 41 "./sys/sys/cdefs.h" +// # 1 "./machine/cdefs.h" 1 +// # 42 "./sys/sys/cdefs.h" 2 +// # 44 "./include/ctype.h" 2 +// # 57 "./include/ctype.h" +// typedef void *locale_t; +// +// +// +// +// +// extern const char *_ctype_; +// extern const short *_tolower_tab_; +// extern const short *_toupper_tab_; +// +// +// 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); +// +// +// +// int isblank(int); +// +// +// +// int isascii(int); +// int toascii(int); +// int _tolower(int); +// int _toupper(int); +// +// +// +// 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); +// +// +// +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int islower(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_tolower_tab_ + 1)[_c]); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_toupper_tab_ + 1)[_c]); +// } +// +// + +// extern __inline __attribute__((__gnu_inline__)) +func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ + return Bool32(_c == ' ' || _c == '\t') +} + +// extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) +// { +// return ((unsigned int)_c <= 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) +// { +// return (_c & 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) +// { +// return (_c - 'A' + 'a'); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) +// { +// return (_c - 'a' + 'A'); +// } +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalnum_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalnum(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalpha_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalpha(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isblank_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isblank(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return iscntrl(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isgraph_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isgraph(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// islower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return islower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isprint_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isprint(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// ispunct_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return ispunct(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isspace_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isspace(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isupper(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isxdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// tolower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return tolower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// toupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return toupper(_c); +// } +// +// +// +// +// +// # 37 "lib/libc/gen/ctype_.c" 2 +// # 1 "./lib/libc/include/ctype_private.h" 1 +// +// +// +// +// +// # 5 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility push(hidden) +// # 5 "./lib/libc/include/ctype_private.h" +// +// extern const char _C_ctype_[]; +// extern const short _C_toupper_[]; +// extern const short _C_tolower_[]; +// +// # 9 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility pop +// # 9 "./lib/libc/include/ctype_private.h" +// +// # 38 "lib/libc/gen/ctype_.c" 2 + +var X_C_ctype_ = [257]int8{ + int8(0), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), + int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), + + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), +} /* ctype_.c:282:12 */ + +var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ + +func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ + return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) +} + +type locale_t = uintptr /* alltypes.h:366:32 */ + +func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisalpha(tls, c) + } + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + }() != 0 || func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0) +} + +func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ + return Xisalnum(tls, c) +} + +func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) +} + +func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ + return Xisalpha(tls, c) +} + +func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ + return Bool32(uint32(c)-uint32('0') < uint32(10)) +} + +func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ + return Xisdigit(tls, c) +} + +func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */ + return Bool32(uint32(c)-uint32('a') < uint32(26)) +} + +func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ + return Xislower(tls, c) +} + +func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ + return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) +} + +func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ + return Xisprint(tls, c) +} + +func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */ + return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5)) +} + +func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */ + return Xisspace(tls, c) +} + +func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */ + return Bool32(uint32(c)-uint32('A') < uint32(26)) +} + +func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */ + return Xisupper(tls, c) +} + +func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) +} + +func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ + return Xisxdigit(tls, c) +} + +type uintptr_t = uint32 /* alltypes.h:78:24 */ + +type intptr_t = int32 /* alltypes.h:93:15 */ + +type int8_t = int8 /* alltypes.h:119:25 */ + +type int16_t = int16 /* alltypes.h:124:25 */ + +type int32_t = int32 /* alltypes.h:129:25 */ + +type int64_t = int64 /* alltypes.h:134:25 */ + +type intmax_t = int64 /* alltypes.h:139:25 */ + +type uint8_t = uint8 /* alltypes.h:144:25 */ + +type uint16_t = uint16 /* alltypes.h:149:25 */ + +type uint32_t = uint32 /* alltypes.h:154:25 */ + +type uint64_t = uint64 /* alltypes.h:159:25 */ + +type uintmax_t = uint64 /* alltypes.h:169:25 */ + +type int_fast8_t = int8_t /* stdint.h:22:16 */ +type int_fast64_t = int64_t /* stdint.h:23:17 */ + +type int_least8_t = int8_t /* stdint.h:25:17 */ +type int_least16_t = int16_t /* stdint.h:26:17 */ +type int_least32_t = int32_t /* stdint.h:27:17 */ +type int_least64_t = int64_t /* stdint.h:28:17 */ + +type uint_fast8_t = uint8_t /* stdint.h:30:17 */ +type uint_fast64_t = uint64_t /* stdint.h:31:18 */ + +type uint_least8_t = uint8_t /* stdint.h:33:18 */ +type uint_least16_t = uint16_t /* stdint.h:34:18 */ +type uint_least32_t = uint32_t /* stdint.h:35:18 */ +type uint_least64_t = uint64_t /* stdint.h:36:18 */ + +type int_fast16_t = int32_t /* stdint.h:1:17 */ +type int_fast32_t = int32_t /* stdint.h:2:17 */ +type uint_fast16_t = uint32_t /* stdint.h:3:18 */ +type uint_fast32_t = uint32_t /* stdint.h:4:18 */ + +type ssize_t = int32 /* alltypes.h:88:15 */ + +type off_t = int64 /* alltypes.h:185:16 */ + +type _IO_FILE = struct { + Fflags uint32 + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int32 + Fmode int32 + Flock int32 + Flbf int32 + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr +} /* alltypes.h:343:9 */ + +type FILE = _IO_FILE /* alltypes.h:343:25 */ + +type va_list = uintptr /* alltypes.h:349:27 */ + +type _G_fpos64_t = struct { + F__ccgo_pad1 [0]uint32 + F__opaque [16]int8 +} /* stdio.h:54:9 */ + +type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ + +type float_t = float64 /* alltypes.h:38:21 */ + +type double_t = float64 /* alltypes.h:43:21 */ + +func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var __u struct {F__f float32;} at bp, 4 + + *(*float32)(unsafe.Pointer(bp)) = __f + return *(*uint32)(unsafe.Pointer(bp)) +} + +func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var __u struct {F__f float64;} at bp, 8 + + *(*float64)(unsafe.Pointer(bp)) = __f + return *(*uint64)(unsafe.Pointer(bp)) +} + +type syscall_arg_t = int32 /* syscall.h:22:14 */ + +func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ + var c int32 + var x int32 + var y int64 + var neg int32 = 0 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c == '+' || c == '-' { + neg = Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') >= 10 && pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + if uint32(c-'0') >= 10 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return -0x7fffffffffffffff - int64(1) + } + for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + x = 10*x + c - '0' + } + for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + y = int64(10)*y + int64(c) - int64('0') + } + for ; uint32(c-'0') < 10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if neg != 0 { + return -y + } + return y +} + +func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var x [128]uint32_t at bp, 512 + + var i int32 + var j int32 + var k int32 + var a int32 + var z int32 + var lrp int64 = int64(0) + var dc int64 = int64(0) + var e10 int64 = int64(0) + var lnz int32 = 0 + var gotdig int32 = 0 + var gotrad int32 = 0 + var rp int32 + var e2 int32 + var emax int32 = -emin - bits + 3 + var denormal int32 = 0 + var y float64 + var frac float64 = float64(0) + var bias float64 = float64(0) + + j = 0 + k = 0 + + // Don't let leading zeros consume buffer space + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + if c == '.' { + gotrad = 1 + for c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }(); c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + lrp-- + } + } + + *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) + for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + gotrad = 1 + lrp = dc + } else if k < 128-3 { + dc++ + if c != '0' { + lnz = int32(dc) + } + if j != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') + } + if PreIncInt32(&j, 1) == 9 { + k++ + j = 0 + } + gotdig = 1 + } else { + dc++ + if c != '0' { + lnz = (128 - 4) * 9 + *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) + } + } + } + if !(gotrad != 0) { + lrp = dc + } + + if gotdig != 0 && c|32 == 'e' { + e10 = scanexp(tls, f, pok) + if e10 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e10 = int64(0) + } + lrp = lrp + e10 + } else if c >= 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + if !(gotdig != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + // Handle zero specially to avoid nasty special cases later + if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { + return float64(sign) * 0.0 + } + + // Optimize small integers (w/no exponent) and over/under-flow + if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if lrp > int64(-emin/2) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if lrp < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + // Align incomplete final B1B digit + if j != 0 { + for ; j < 9; j++ { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10) + } + k++ + j = 0 + } + + a = 0 + z = k + e2 = 0 + rp = int32(lrp) + + // Optimize small to mid-size integers (even in exp. notation) + if lnz < 9 && lnz <= rp && rp < 18 { + if rp == 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if rp < 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp]) + } + var bitlim int32 = bits - 3*(rp-9) + if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10]) + } + } + + // Drop trailing zeros + for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- { + } + + // Align radix point to B1B digit boundary + if rp%9 != 0 { + var rpm9 int32 + if rp >= 0 { + rpm9 = rp % 9 + } else { + rpm9 = rp%9 + 9 + } + var p10 int32 = _sp10s[8-rpm9] + var carry uint32_t = uint32_t(0) + for k = a; k != z; k++ { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry + carry = uint32_t(1000000000/p10) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + rp = rp - 9 + } + } + if carry != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry + } + rp = rp + (9 - rpm9) + } + + // Upscale until desired number of bits are left of radix point + for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] { + var carry uint32_t = uint32_t(0) + e2 = e2 - 29 + for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) { + var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry) + if tmp > uint64(1000000000) { + carry = uint32_t(tmp / uint64(1000000000)) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000)) + } else { + carry = uint32_t(0) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp) + } + if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + z = k + } + if k == a { + break + } + } + if carry != 0 { + rp = rp + 9 + a = (a - 1) & (128 - 1) + if a == z { + z = (z - 1) & (128 - 1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) + } + *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry + } + } + + // Downscale until exactly number of bits are left of radix point + for { + var carry uint32_t = uint32_t(0) + var sh int32 = 1 + for i = 0; i < 2; i++ { + k = (a + i) & (128 - 1) + if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] { + i = 2 + break + } + if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] { + break + } + } + if i == 2 && rp == 9*2 { + break + } + // FIXME: find a way to compute optimal sh + if rp > 9+9*2 { + sh = 9 + } + e2 = e2 + sh + for k = a; k != z; k = (k + 1) & (128 - 1) { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry + carry = uint32_t(int32(1000000000)>>sh) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + i-- + rp = rp - 9 + } + } + if carry != 0 { + if (z+1)&(128-1) != a { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry + z = (z + 1) & (128 - 1) + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1) + } + } + } + + // Assemble desired bits into floating point variable + for y = float64(AssignInt32(&i, 0)); i < 2; i++ { + if (a+i)&(128-1) == z { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0) + } + y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4))) + } + + y = y * float64(sign) + + // Limit precision for denormal results + if bits > 53+e2-emin { + bits = 53 + e2 - emin + if bits < 0 { + bits = 0 + } + denormal = 1 + } + + // Calculate bias term to force rounding, move out lower bits + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 2*53-bits-1), y) + frac = Xfmodl(tls, y, Xscalbn(tls, float64(1), 53-bits)) + y = y - frac + y = y + bias + } + + // Process tail of decimal input so it can affect rounding + if (a+i)&(128-1) != z { + var t uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) + if t < uint32_t(500000000) && (t != 0 || (a+i+1)&(128-1) != z) { + frac = frac + 0.25*float64(sign) + } else if t > uint32_t(500000000) { + frac = frac + 0.75*float64(sign) + } else if t == uint32_t(500000000) { + if (a+i+1)&(128-1) == z { + frac = frac + 0.5*float64(sign) + } else { + frac = frac + 0.75*float64(sign) + } + } + if 53-bits >= 2 && !(Xfmodl(tls, frac, float64(1)) != 0) { + frac += 1 + } + } + + y = y + frac + y = y - bias + + if (e2+53)&0x7fffffff > emax-5 { + if Xfabsl(tls, y) >= float64(float64(2))/2.22044604925031308085e-16 { + if denormal != 0 && bits == 53+e2-emin { + denormal = 0 + } + y = y * 0.5 + e2++ + } + if e2+53 > emax || denormal != 0 && frac != 0 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + } + + return Xscalbnl(tls, y, e2) +} + +var _sth = [2]uint32_t{uint32_t(9007199), uint32_t(254740991)} /* floatscan.c:67:24 */ +var _sp10s = [8]int32{10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000} /* floatscan.c:80:19 */ + +func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:315:20: */ + var x uint32_t = uint32_t(0) + var y float64 = float64(0) + var scale float64 = float64(1) + var bias float64 = float64(0) + var gottail int32 = 0 + var gotrad int32 = 0 + var gotdig int32 = 0 + var rp int64 = int64(0) + var dc int64 = int64(0) + var e2 int64 = int64(0) + var d int32 + var c int32 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + + // Skip leading zeros + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + + if c == '.' { + gotrad = 1 + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + // Count zeros after the radix point before significand + rp = int64(0) + __1: + if !(c == '0') { + goto __3 + } + gotdig = 1 + goto __2 + __2: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + rp-- + goto __1 + goto __3 + __3: + } + + for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + rp = dc + gotrad = 1 + } else { + gotdig = 1 + if c > '9' { + d = c | 32 + 10 - 'a' + } else { + d = c - '0' + } + if dc < int64(8) { + x = x*uint32_t(16) + uint32_t(d) + } else if dc < int64(53/4+1) { + y = y + float64(d)*AssignDivFloat64(&scale, float64(16)) + } else if d != 0 && !(gottail != 0) { + y = y + 0.5*scale + gottail = 1 + } + dc++ + } + } + if !(gotdig != 0) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if gotrad != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } else { + X__shlim(tls, f, int64(0)) + } + return float64(sign) * 0.0 + } + if !(gotrad != 0) { + rp = dc + } + for dc < int64(8) { + x = x * uint32_t(16) + dc++ + } + if c|32 == 'p' { + e2 = scanexp(tls, f, pok) + if e2 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e2 = int64(0) + } + } else { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + e2 = e2 + (int64(4)*rp - int64(32)) + + if !(x != 0) { + return float64(sign) * 0.0 + } + if e2 > int64(-emin) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if e2 < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + for x < 0x80000000 { + if y >= 0.5 { + x = x + (x + uint32_t(1)) + y = y + (y - float64(1)) + } else { + x = x + x + y = y + y + } + e2-- + } + + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) + if bits < 0 { + bits = 0 + } + } + + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 32+53-bits-1), float64(sign)) + } + + if bits < 32 && y != 0 && !(x&uint32_t(1) != 0) { + x++ + y = float64(0) + } + + y = bias + float64(sign)*float64(x) + float64(sign)*y + y = y - bias + + if !(y != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + + return Xscalbnl(tls, y, int32(e2)) +} + +func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */ + var sign int32 = 1 + var i size_t + var bits int32 + var emin int32 + var c int32 + + switch prec { + case 0: + bits = 24 + emin = -125 - bits + break + case 1: + bits = 53 + emin = -1021 - bits + break + case 2: + bits = 53 + emin = -1021 - bits + break + default: + return float64(0) + } + + for __isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0 { + } + + if c == '+' || c == '-' { + sign = sign - 2*Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + + for i = size_t(0); i < size_t(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { + if i < size_t(7) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + if i == size_t(3) || i == size_t(8) || i > size_t(3) && pok != 0 { + if i != size_t(8) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + for ; i > size_t(3); i-- { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + } + return float64(float32(sign) * X__builtin_inff(tls)) + } + if !(i != 0) { + for i = size_t(0); i < size_t(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { + if i < size_t(2) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + } + if i == size_t(3) { + if func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() != '(' { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return float64(X__builtin_nanf(tls, ts+13)) + } + for i = size_t(1); ; i++ { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') < 10 || uint32(c-'A') < 26 || uint32(c-'a') < 26 || c == '_' { + continue + } + if c == ')' { + return float64(X__builtin_nanf(tls, ts+13)) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + for PostDecUint32(&i, 1) != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + return float64(X__builtin_nanf(tls, ts+13)) + } + return float64(X__builtin_nanf(tls, ts+13)) + } + + if i != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + if c == '0' { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c|32 == 'x' { + return hexfloat(tls, f, bits, emin, sign, pok) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + c = '0' + } + + return decfloat(tls, f, c, bits, emin, sign, pok) +} + +// Lookup table for digit values. -1==255>=36 -> invalid +var table = [257]uint8{Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), +} /* intscan.c:7:28 */ + +func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */ + var val uintptr + var c int32 + var neg int32 + var x uint32 + var y uint64 + var bs int32 + val = uintptr(unsafe.Pointer(&table)) + uintptr(1) + neg = 0 + if !(base > uint32(36) || base == uint32(1)) { + goto __1 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__1: + ; +__2: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __3 + } + goto __2 +__3: + ; + if !(c == '+' || c == '-') { + goto __4 + } + neg = -Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() +__4: + ; + if !((base == uint32(0) || base == uint32(16)) && c == '0') { + goto __5 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(c|32 == 'x') { + goto __7 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { + goto __9 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + goto __10 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + goto __11 +__10: + X__shlim(tls, f, int64(0)) +__11: + ; + return uint64(0) +__9: + ; + base = uint32(16) + goto __8 +__7: + if !(base == uint32(0)) { + goto __12 + } + base = uint32(8) +__12: + ; +__8: + ; + goto __6 +__5: + if !(base == uint32(0)) { + goto __13 + } + base = uint32(10) +__13: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { + goto __14 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + X__shlim(tls, f, int64(0)) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__14: + ; +__6: + ; + if !(base == uint32(10)) { + goto __15 + } + x = uint32(0) +__17: + if !(uint32(c-'0') < 10 && x <= 0xffffffff/uint32(10)-uint32(1)) { + goto __19 + } + x = x*uint32(10) + uint32(c-'0') + goto __18 +__18: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __17 + goto __19 +__19: + ; + y = uint64(x) +__20: + if !(uint32(c-'0') < 10 && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(10) && uint64(10)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(c-'0')) { + goto __22 + } + y = y*uint64(10) + uint64(c-'0') + goto __21 +__21: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __20 + goto __22 +__22: + ; + if !(uint32(c-'0') >= 10) { + goto __23 + } + goto done +__23: + ; + goto __16 +__15: + if !!(base&(base-uint32(1)) != 0) { + goto __24 + } + bs = int32(*(*int8)(unsafe.Pointer(ts + 14 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + x = uint32(0) +__26: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { + goto __28 + } + x = x<<bs | uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __27 +__27: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __26 + goto __28 +__28: + ; + y = uint64(x) +__29: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= uint64(2*uint64(0x7fffffffffffffff)+uint64(1))>>bs) { + goto __31 + } + y = y<<bs | uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __30 +__30: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __29 + goto __31 +__31: + ; + goto __25 +__24: + x = uint32(0) +__32: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(36)-uint32(1)) { + goto __34 + } + x = x*base + uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __33 +__33: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __32 + goto __34 +__34: + ; + y = uint64(x) +__35: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(base) && uint64(base)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { + goto __37 + } + y = y*uint64(base) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __36 +__36: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __35 + goto __37 +__37: + ; +__25: + ; +__16: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __38 + } +__39: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __41 + } + goto __40 +__40: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __39 + goto __41 +__41: + ; + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + y = lim + if !(lim&uint64(1) != 0) { + goto __42 + } + neg = 0 +__42: + ; +__38: + ; +done: + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(y >= lim) { + goto __43 + } + if !(!(lim&uint64(1) != 0) && !(neg != 0)) { + goto __44 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim - uint64(1) + goto __45 +__44: + if !(y > lim) { + goto __46 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim +__46: + ; +__45: + ; +__43: + ; + return y ^ uint64(neg) - uint64(neg) +} + +// The shcnt field stores the number of bytes read so far, offset by +// the value of buf-rpos at the last function call (__shlim or __shgetc), +// so that between calls the inline shcnt macro can add rpos-buf to get +// the actual count. + +func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf) - int32((*FILE)(unsafe.Pointer(f)).Frpos)) / 1) + // If lim is nonzero, rend must be a valid pointer. + if lim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } +} + +func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ + var c int32 + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(f)).Frpos)-int32((*FILE)(unsafe.Pointer(f)).Fbuf))/1) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) + return -1 + } + cnt++ + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && off_t((int32((*FILE)(unsafe.Pointer(f)).Frend)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } + (*FILE)(unsafe.Pointer(f)).Fshcnt = off_t((int32((*FILE)(unsafe.Pointer(f)).Fbuf)-int32((*FILE)(unsafe.Pointer(f)).Frpos))/1) + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) + } + return c +} + +func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */ + return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24 +} + +func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */ + return Xcopysign(tls, x, y) +} + +func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */ + return Xfabs(tls, x) +} + +func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */ + return Xfmod(tls, x, y) +} + +var toint double_t = float64(float64(1)) / 2.22044604925031308085e-16 /* rint.c:10:23 */ + +func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + var s int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 63) + var y double_t + + if e >= 0x3ff+52 { + return x + } + if s != 0 { + y = x - toint + toint + } else { + y = x + toint - toint + } + if y == float64(0) { + if s != 0 { + return -Float64FromFloat64(0.0) + } + return float64(0) + } + return y +} + +func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var u struct {Ff float64;} at bp, 8 + + var y double_t = x + + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + n = 1023 + } + } + } else if n < -1022 { + // make sure final n < -53 to avoid double + // rounding in the subnormal range + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + n = -1022 + } + } + } + *(*uint64_t)(unsafe.Pointer(bp)) = uint64_t(0x3ff+n) << 52 + x = y * *(*float64)(unsafe.Pointer(bp)) + return x +} + +func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ + return Xscalbn(tls, x, n) +} + +type div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:35 */ +type ldiv_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:63:36 */ +type lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:64:41 */ + +type max_align_t = struct { + F__ll int64 + F__ld float64 +} /* alltypes.h:51:66 */ + +type imaxdiv_t = struct { + Fquot intmax_t + Frem intmax_t +} /* inttypes.h:14:40 */ + +type pid_t = int32 /* alltypes.h:258:13 */ + +type uid_t = uint32 /* alltypes.h:268:18 */ + +type gid_t = uint32 /* alltypes.h:273:18 */ + +type iovec = struct { + Fiov_base uintptr + Fiov_len size_t +} /* alltypes.h:378:1 */ + +type socklen_t = uint32 /* alltypes.h:384:18 */ + +type sa_family_t = uint16 /* alltypes.h:389:24 */ + +type msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 +} /* socket.h:22:1 */ + +type cmsghdr = struct { + Fcmsg_len socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:44:1 */ + +type linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:74:1 */ + +type sockaddr = struct { + Fsa_family sa_family_t + Fsa_data [14]int8 +} /* socket.h:367:1 */ + +type sockaddr_storage = struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 +} /* socket.h:372:1 */ + +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ + +type sockaddr_in = struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t +} /* in.h:16:1 */ + +type in6_addr = struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } +} /* in.h:23:1 */ + +type sockaddr_in6 = struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t +} /* in.h:34:1 */ + +type ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:42:1 */ + +type ip_opts = struct { + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 +} /* in.h:229:1 */ + +type ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } +} /* in.h:247:1 */ + +type ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 +} /* in.h:252:1 */ + +type ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } +} /* in.h:258:1 */ + +type ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } +} /* in.h:264:1 */ + +type group_req = struct { + Fgr_interface uint32_t + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 + } +} /* in.h:275:1 */ + +type group_source_req = struct { + Fgsr_interface uint32_t + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 + } +} /* in.h:280:1 */ + +type group_filter = struct { + Fgf_interface uint32_t + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [122]int8 + F__ss_align uint32 + } +} /* in.h:286:1 */ + +type in_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } +} /* in.h:297:1 */ + +type in6_pktinfo = struct { + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipi6_ifindex uint32 +} /* in.h:303:1 */ + +type ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t + } + Fip6m_mtu uint32_t +} /* in.h:308:1 */ + +type addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:16:1 */ + +// Legacy functions follow (marked OBsolete in SUS) + +type netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t +} /* netdb.h:62:1 */ + +type hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:69:1 */ + +type servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr +} /* netdb.h:78:1 */ + +type protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 +} /* netdb.h:85:1 */ + +type aibuf = struct { + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 +} /* lookup.h:10:1 */ + +type sa = struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte +} /* lookup.h:10:1 */ + +type address = struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 +} /* lookup.h:20:1 */ + +type service = struct { + Fport uint16_t + Fproto uint8 + Fsocktype uint8 +} /* lookup.h:27:1 */ + +type resolvconf = struct { + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 +} /* lookup.h:34:1 */ + +func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ + var cnt size_t + cnt = size_t(1) +__1: + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { + goto __3 + } + goto __2 +__2: + cnt++ + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next + goto __1 + goto __3 +__3: + ; + var b uintptr = p - uintptr(uint32(uintptr(0))) + b -= 68 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) + //TODO LOCK(b->lock); + if !(int32(AssignSubPtrInt16(b+66, int16(cnt))) != 0) { + Xfree(tls, b) + } + //TODO else UNLOCK(b->lock); +} + +type time_t = int64 /* alltypes.h:108:16 */ + +type clockid_t = int32 /* alltypes.h:237:13 */ + +type timespec = struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ +} /* alltypes.h:252:1 */ + +type pthread_t = uintptr /* alltypes.h:296:26 */ + +type pthread_once_t = int32 /* alltypes.h:302:13 */ + +type pthread_key_t = uint32 /* alltypes.h:307:18 */ + +type pthread_spinlock_t = int32 /* alltypes.h:312:13 */ + +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:317:37 */ + +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:322:37 */ + +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:327:37 */ + +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:332:40 */ + +type __sigset_t = struct{ F__bits [32]uint32 } /* alltypes.h:372:9 */ + +type sigset_t = __sigset_t /* alltypes.h:372:71 */ + +type pthread_attr_t = struct{ F__u struct{ F__i [9]int32 } } /* alltypes.h:395:147 */ + +type pthread_mutex_t = struct{ F__u struct{ F__i [6]int32 } } /* alltypes.h:400:157 */ + +type pthread_cond_t = struct{ F__u struct{ F__i [12]int32 } } /* alltypes.h:410:112 */ + +type pthread_rwlock_t = struct{ F__u struct{ F__i [8]int32 } } /* alltypes.h:420:139 */ + +type pthread_barrier_t = struct{ F__u struct{ F__i [5]int32 } } /* alltypes.h:425:137 */ + +type sched_param = struct { + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [4]int32 + F__reserved3 int32 +} /* sched.h:19:1 */ + +type timer_t = uintptr /* alltypes.h:232:14 */ + +type clock_t = int32 /* alltypes.h:242:14 */ + +type tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:38:1 */ + +type itimerspec = struct { + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ + } + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int32 + __12 uint32 /* int : 32 */ + } +} /* time.h:80:1 */ + +type __ptcb = struct { + F__f uintptr + F__x uintptr + F__next uintptr +} /* pthread.h:206:1 */ + +type useconds_t = uint32 /* alltypes.h:283:18 */ + +func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ + bp := tls.Alloc(1608) + defer tls.Free(1608) + + // var ports [2]service at bp, 8 + + // var addrs [48]address at bp+8, 1344 + + // var canon [256]int8 at bp+1352, 256 + + var outcanon uintptr + var nservs int32 + var naddrs int32 + var nais int32 + var canon_len int32 + var i int32 + var j int32 + var k int32 + var family int32 = 0 + var flags int32 = 0 + var proto int32 = 0 + var socktype int32 = 0 + var out uintptr + + if !(host != 0) && !(serv != 0) { + return -2 + } + + if hint != 0 { + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype + + var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 + if flags&mask != flags { + return -1 + } + + switch family { + case 2: + fallthrough + case 10: + fallthrough + case 0: + break + fallthrough + default: + return -6 + } + } + + if flags&0x20 != 0 { + Xabort(tls) //TODO- + // /* Define the "an address is configured" condition for address + // * families via ability to create a socket for the family plus + // * routability of the loopback address for the family. */ + // static const struct sockaddr_in lo4 = { + // .sin_family = AF_INET, .sin_port = 65535, + // .sin_addr.s_addr = __BYTE_ORDER == __BIG_ENDIAN + // ? 0x7f000001 : 0x0100007f + // }; + // static const struct sockaddr_in6 lo6 = { + // .sin6_family = AF_INET6, .sin6_port = 65535, + // .sin6_addr = IN6ADDR_LOOPBACK_INIT + // }; + // int tf[2] = { AF_INET, AF_INET6 }; + // const void *ta[2] = { &lo4, &lo6 }; + // socklen_t tl[2] = { sizeof lo4, sizeof lo6 }; + // for (i=0; i<2; i++) { + // if (family==tf[1-i]) continue; + // int s = socket(tf[i], SOCK_CLOEXEC|SOCK_DGRAM, + // IPPROTO_UDP); + // if (s>=0) { + // int cs; + // pthread_setcancelstate( + // PTHREAD_CANCEL_DISABLE, &cs); + // int r = connect(s, ta[i], tl[i]); + // pthread_setcancelstate(cs, 0); + // close(s); + // if (!r) continue; + // } + // switch (errno) { + // case EADDRNOTAVAIL: + // case EAFNOSUPPORT: + // case EHOSTUNREACH: + // case ENETDOWN: + // case ENETUNREACH: + // break; + // default: + // return EAI_SYSTEM; + // } + // if (family == tf[i]) return EAI_NONAME; + // family = tf[1-i]; + // } + } + + nservs = X__lookup_serv(tls, bp, serv, proto, socktype, flags) + if nservs < 0 { + return nservs + } + + naddrs = X__lookup_name(tls, bp+8, bp+1352, host, family, flags) + if naddrs < 0 { + return naddrs + } + + nais = nservs * naddrs + canon_len = int32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint32(1), uint32(nais)*uint32(unsafe.Sizeof(aibuf{}))+uint32(canon_len)+uint32(1)) + if !(out != 0) { + return -10 + } + + if canon_len != 0 { + outcanon = out + uintptr(nais)*68 + Xmemcpy(tls, outcanon, bp+1352, uint32(canon_len+1)) + } else { + outcanon = uintptr(0) + } + + for k = AssignInt32(&i, 0); i < naddrs; i++ { + j = 0 + __1: + if !(j < nservs) { + goto __3 + } + { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fslot = int16(k) + //TODO out[k].ai = (struct addrinfo){ + //TODO .ai_family = addrs[i].family, + //TODO .ai_socktype = ports[j].socktype, + //TODO .ai_protocol = ports[j].proto, + //TODO .ai_addrlen = addrs[i].family == AF_INET + //TODO ? sizeof(struct sockaddr_in) + //TODO : sizeof(struct sockaddr_in6), + //TODO .ai_addr = (void *)&out[k].sa, + //TODO .ai_canonname = outcanon }; + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { + return uint32(unsafe.Sizeof(sockaddr_in{})) + } + return uint32(unsafe.Sizeof(sockaddr_in6{})) + }() + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_addr = out + uintptr(k)*68 + 32 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*68)).Fai.Fai_canonname = outcanon + if k != 0 { + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*68)).Fai.Fai_next = out + uintptr(k)*68 + } + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { + case 2: + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + Xmemcpy(tls, out+uintptr(k)*68+32+4, bp+8+uintptr(i)*28+8, uint32(4)) + break + case 10: + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*68 + 32)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid + Xmemcpy(tls, out+uintptr(k)*68+32+8, bp+8+uintptr(i)*28+8, uint32(16)) + break + } + + } + goto __2 + __2: + j++ + k++ + goto __1 + goto __3 + __3: + } + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) + *(*uintptr)(unsafe.Pointer(res)) = out + return 0 +} + +type ucred = struct { + Fpid pid_t + Fuid uid_t + Fgid gid_t +} /* socket.h:57:1 */ + +type mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 +} /* socket.h:63:1 */ + +func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var size size_t = size_t(63) + // var res uintptr at bp, 4 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh) + _sh = Xmalloc(tls, AssignAddUint32(&size, size+size_t(1))) + if !(_sh != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyaddr_r(tls, a, l, af, _sh, + _sh+uintptr(1)*20, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh +} + +var _sh uintptr /* gethostbyaddr.c:9:24: */ + +func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */ + return Xgethostbyname2(tls, name, 2) +} + +func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var size size_t = size_t(63) + // var res uintptr at bp, 4 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh1) + _sh1 = Xmalloc(tls, AssignAddUint32(&size, size+size_t(1))) + if !(_sh1 != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyname2_r(tls, name, af, _sh1, + _sh1+uintptr(1)*20, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh1 +} + +var _sh1 uintptr /* gethostbyname2.c:10:24: */ + +func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname2_r.c:11:5: */ + bp := tls.Alloc(1600) + defer tls.Free(1600) + + // var addrs [48]address at bp, 1344 + + // var canon [256]int8 at bp+1344, 256 + + var i int32 + var cnt int32 + var align size_t + var need size_t + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + cnt = X__lookup_name(tls, bp, bp+1344, name, af, 0x02) + if cnt < 0 { + switch cnt { + case -2: + *(*int32)(unsafe.Pointer(err)) = 1 + return 2 + fallthrough + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + fallthrough + default: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return 74 + fallthrough + case -10: + fallthrough + case -11: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + } + } + + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { + if af == 10 { + return 16 + } + return 4 + }() + + // Align buffer + align = uint32(-uintptr_t(buf)) & (uint32(unsafe.Sizeof(uintptr(0))) - uint32(1)) + + need = uint32(4) * uint32(unsafe.Sizeof(uintptr(0))) + need = need + uint32(cnt+1)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) + need = need + (Xstrlen(tls, name) + size_t(1)) + need = need + (Xstrlen(tls, bp+1344) + size_t(1)) + need = need + align + + if need > buflen { + return 34 + } + + buf += uintptr(align) + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf + buf += uintptr(uint32(3) * uint32(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf + buf += uintptr(uint32(cnt+1) * uint32(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < cnt; i++ { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)), bp+uintptr(i)*28+8, uint32((*hostent)(unsafe.Pointer(h)).Fh_length)) + } + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*4)) = uintptr(0) + + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + size_t(1)) + + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4))) + size_t(1)) + } else { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*4)) = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*4)) = uintptr(0) + + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +type if_nameindex = struct { + Fif_index uint32 + Fif_name uintptr +} /* if.h:12:1 */ + +type ifaddr = struct { + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + } + Fifa_ifp uintptr + Fifa_next uintptr +} /* if.h:51:1 */ + +type ifmap = struct { + Fmem_start uint32 + Fmem_end uint32 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte +} /* if.h:64:1 */ + +type ifreq = struct { + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint32 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + } +} /* if.h:76:1 */ + +type ifconf = struct { + Fifc_len int32 + Fifc_ifcu struct{ Fifcu_buf uintptr } +} /* if.h:116:1 */ + +type ns_sect = uint32 /* nameser.h:37:3 */ + +type __ns_msg = struct { + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr +} /* nameser.h:39:9 */ + +type ns_msg = __ns_msg /* nameser.h:46:3 */ + +type _ns_flagdata = struct { + Fmask int32 + Fshift int32 +} /* nameser.h:48:1 */ + +type __ns_rr = struct { + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr +} /* nameser.h:59:9 */ + +type ns_rr = __ns_rr /* nameser.h:66:3 */ + +type ns_flag = uint32 /* nameser.h:87:3 */ + +type ns_opcode = uint32 /* nameser.h:96:3 */ + +type ns_rcode = uint32 /* nameser.h:115:3 */ + +type ns_update_operation = uint32 /* nameser.h:121:3 */ + +type ns_tsig_key1 = struct { + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [2]byte + Fdata uintptr + Flen int32 +} /* nameser.h:123:1 */ + +type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ + +type ns_tcp_tsig_state1 = struct { + Fcounter int32 + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 +} /* nameser.h:130:1 */ + +type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ + +type ns_type = uint32 /* nameser.h:200:3 */ + +type ns_class = uint32 /* nameser.h:219:3 */ + +type ns_key_types = uint32 /* nameser.h:226:3 */ + +type ns_cert_types = uint32 /* nameser.h:234:3 */ + +type HEADER = struct { + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ +} /* nameser.h:353:3 */ + +// unused; purely for broken apps +type __res_state = struct { + Fretrans int32 + Fretry int32 + Foptions uint32 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint32 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F_u struct { + F__ccgo_pad1 [0]uint32 + Fpad [52]int8 + } +} /* resolv.h:26:9 */ + +// unused; purely for broken apps +type res_state = uintptr /* resolv.h:62:3 */ + +type res_sym = struct { + Fnumber int32 + Fname uintptr + Fhumanname uintptr +} /* resolv.h:70:1 */ + +func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ + p += uintptr(uint32(3) * uint32(unsafe.Sizeof(int32(0)))) + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(uint32('0') + x%uint32(10)) + x = x / uint32(10) + } + return p +} + +func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + Xsprintf(tls, s, ts+23, + VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) +} + +func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ + var i int32 + for i = 15; i >= 0; i-- { + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&15] + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') + } + Xstrcpy(tls, s, ts+48) +} + +var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* getnameinfo.c:36:20 */ + +func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */ + bp := tls.Alloc(556) + defer tls.Free(556) + + // var line [512]int8 at bp+16, 512 + + var p uintptr + var z uintptr + var _buf [1032]uint8 + _ = _buf + // var atmp [16]uint8 at bp, 16 + + // var iplit address at bp+528, 28 + + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var f uintptr = Xfopen(tls, ts+74, ts+85) + if !(f != 0) { + return + } + if family == 2 { + Xmemcpy(tls, bp+uintptr(12), a, uint32(4)) + Xmemcpy(tls, bp, ts+88, uint32(12)) + a = bp /* &atmp[0] */ + } + for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { + if AssignUintptr(&p, Xstrchr(tls, bp+16, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + + for p = bp + 16; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + if X__lookup_ipliteral(tls, bp+528, bp+16, 0) <= 0 { + continue + } + + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { + Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint32(4)) + Xmemcpy(tls, bp+528+8, ts+88, uint32(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) + } + + if Xmemcmp(tls, a, bp+528+8, uint32(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { + continue + } + + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if (int32(z)-int32(p))/1 < 256 { + Xmemcpy(tls, buf, p, uint32((int32(z)-int32(p))/1+1)) + break + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) +} + +func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getnameinfo.c:87:13: */ + Xabort(tls) //TODO- + // unsigned long svport; + // char line[128], *p, *z; + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) return; + // while (fgets(line, sizeof line, f)) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // for (p=line; *p && !isspace(*p); p++); + // if (!*p) continue; + // *p++ = 0; + // svport = strtoul(p, &z, 10); + + // if (svport != port || z==p) continue; + // if (dgram && strncmp(z, "/udp", 4)) continue; + // if (!dgram && strncmp(z, "/tcp", 4)) continue; + // if (p-line > 32) continue; + + // memcpy(buf, line, p-line); + // break; + // } + // __fclose_ca(f); +} + +var Xh_errno int32 /* h_errno.c:4:5: */ + +func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */ + return uintptr(unsafe.Pointer(&Xh_errno)) +} + +func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */ + bp := tls.Alloc(20) + defer tls.Free(20) + + var s uintptr = s0 + var d uintptr = dest + *(*[4]uint32)(unsafe.Pointer(bp /* a */)) = [4]uint32{0: uint32(0)} + // var z uintptr at bp+16, 4 + + var i int32 + + for i = 0; i < 4; i++ { + *(*uint32)(unsafe.Pointer(bp + uintptr(i)*4)) = Xstrtoul(tls, s, bp+16, 0) + if *(*uintptr)(unsafe.Pointer(bp + 16)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != '.' || !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s)))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) + }() != 0) { + return 0 + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != 0) { + break + } + s = *(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(1) + } + if i == 4 { + return 0 + } + switch i { + case 0: + *(*uint32)(unsafe.Pointer(bp + 1*4)) = *(*uint32)(unsafe.Pointer(bp)) & uint32(0xffffff) + AssignShrPtrUint32(bp, int(24)) + fallthrough + case 1: + *(*uint32)(unsafe.Pointer(bp + 2*4)) = *(*uint32)(unsafe.Pointer(bp + 1*4)) & uint32(0xffff) + AssignShrPtrUint32(bp+1*4, int(16)) + fallthrough + case 2: + *(*uint32)(unsafe.Pointer(bp + 3*4)) = *(*uint32)(unsafe.Pointer(bp + 2*4)) & uint32(0xff) + AssignShrPtrUint32(bp+2*4, int(8)) + } + for i = 0; i < 4; i++ { + if *(*uint32)(unsafe.Pointer(bp + uintptr(i)*4)) > uint32(255) { + return 0 + } + *(*uint8)(unsafe.Pointer(d + uintptr(i))) = uint8(*(*uint32)(unsafe.Pointer(bp + uintptr(i)*4))) + } + return 1 +} + +func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var a uintptr = a0 + var i int32 + var j int32 + var max int32 + var best int32 + // var buf [100]int8 at bp+176, 100 + + switch af { + case 2: + if socklen_t(Xsnprintf(tls, s, uint32(l), ts+101, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + return s + } + break + case 10: + if Xmemcmp(tls, a, ts+88, uint32(12)) != 0 { + Xsnprintf(tls, bp+176, uint32(unsafe.Sizeof([100]int8{})), + ts+113, + VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } else { + Xsnprintf(tls, bp+176, uint32(unsafe.Sizeof([100]int8{})), + ts+137, + VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } + // Replace longest /(^0|:)[:0]{2,}/ with "::" + i = AssignInt32(&best, 0) + max = 2 + for ; *(*int8)(unsafe.Pointer(bp + 176 + uintptr(i))) != 0; i++ { + if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { + continue + } + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167)) + if j > max { + best = i + max = j + } + } + if max > 3 { + *(*int8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrInt8(bp+176+uintptr(best+1), int8(':')) + Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint32(i-best-max+1)) + } + if Xstrlen(tls, bp+176) < size_t(l) { + Xstrcpy(tls, s, bp+176) + return s + } + break + default: + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return uintptr(0) + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 28 + return uintptr(0) +} + +func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */ + if c-uint32('0') < uint32(10) { + return int32(c - uint32('0')) + } + c = c | uint32(32) + if c-uint32('a') < uint32(6) { + return int32(c - uint32('a') + uint32(10)) + } + return -1 +} + +func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var ip [8]uint16_t at bp, 16 + + var a uintptr = a0 + var i int32 + var j int32 + var v int32 + var d int32 + var brk int32 = -1 + var need_v4 int32 = 0 + + if af == 2 { + for i = 0; i < 4; i++ { + for v = AssignInt32(&j, 0); j < 3 && func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s + uintptr(j))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) + }() != 0; j++ { + v = 10*v + int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) - '0' + } + if j == 0 || j > 1 && int32(*(*int8)(unsafe.Pointer(s))) == '0' || v > 255 { + return 0 + } + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == 3 { + return 1 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' { + return 0 + } + s += uintptr(j + 1) + } + return 0 + } else if af != 10 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return -1 + } + + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != ':' { + return 0 + } + + for i = 0; ; i++ { + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && brk < 0 { + brk = i + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(0) + if !(int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != 0) { + break + } + if i == 7 { + return 0 + } + continue + } + for v = AssignInt32(&j, 0); j < 4 && AssignInt32(&d, hexval(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(j)))))) >= 0; j++ { + v = 16*v + d + } + if j == 0 { + return 0 + } + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(v) + if !(int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != 0) && (brk >= 0 || i == 7) { + break + } + if i == 7 { + return 0 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != ':' { + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' || i < 6 && brk < 0 { + return 0 + } + need_v4 = 1 + i++ + break + } + s += uintptr(j + 1) + } + if brk >= 0 { + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint32(2*(i+1-brk))) + for j = 0; j < 7-i; j++ { + *(*uint16_t)(unsafe.Pointer(bp + uintptr(brk+j)*2)) = uint16_t(0) + } + } + for j = 0; j < 8; j++ { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(int32(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) >> 8) + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) + } + if need_v4 != 0 && Xinet_pton(tls, 2, s, a-uintptr(4)) <= 0 { + return 0 + } + return 1 +} + +func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */ + bp := tls.Alloc(88) + defer tls.Free(88) + + // var a4 in_addr at bp, 4 + + // var a6 in6_addr at bp+68, 16 + + if X__inet_aton(tls, name, bp) > 0 { + if family == 10 { // wrong family + return -2 + } + Xmemcpy(tls, buf+8, bp, uint32(unsafe.Sizeof(in_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) + return 1 + } + // var tmp [64]int8 at bp+4, 64 + + var p uintptr = Xstrchr(tls, name, '%') + // var z uintptr at bp+84, 4 + + var scopeid uint64 = uint64(0) + if p != 0 && (int32(p)-int32(name))/1 < 64 { + Xmemcpy(tls, bp+4, name, uint32((int32(p)-int32(name))/1)) + *(*int8)(unsafe.Pointer(bp + 4 + uintptr((int32(p)-int32(name))/1))) = int8(0) + name = bp + 4 /* &tmp[0] */ + } + + if Xinet_pton(tls, 10, name, bp+68) <= 0 { + return 0 + } + if family == 2 { // wrong family + return -2 + } + + Xmemcpy(tls, buf+8, bp+68, uint32(unsafe.Sizeof(in6_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 10 + if p != 0 { + if func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))-uint32('0') < uint32(10)) + }() != 0 { + scopeid = Xstrtoull(tls, p, bp+84, 10) + } else { + *(*uintptr)(unsafe.Pointer(bp + 84 /* z */)) = p - uintptr(1) + } + if *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 84)))) != 0 { + Xabort(tls) //TODO- + // if (!IN6_IS_ADDR_LINKLOCAL(&a6) && + // !IN6_IS_ADDR_MC_LINKLOCAL(&a6)) + // return EAI_NONAME; + // scopeid = if_nametoindex(p); + // if (!scopeid) return EAI_NONAME; + } + if scopeid > uint64(0xffffffff) { + return -2 + } + } + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) + return 1 +} + +type mode_t = uint32 /* alltypes.h:175:18 */ + +type flock = struct { + Fl_type int16 + Fl_whence int16 + Fl_start off_t + Fl_len off_t + Fl_pid pid_t +} /* fcntl.h:24:1 */ + +func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ + var s uintptr + //TODO if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; + if Xstrnlen(tls, host, uint32(255))-size_t(1) >= size_t(254) { + return 0 + } + for s = host; int32(*(*uint8)(unsafe.Pointer(s))) >= 0x80 || int32(*(*uint8)(unsafe.Pointer(s))) == '.' || int32(*(*uint8)(unsafe.Pointer(s))) == '-' || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0; s++ { + } + return BoolInt32(!(*(*uint8)(unsafe.Pointer(s)) != 0)) +} + +var Xzero_struct_address address /* lookup_name.c:27:16: */ + +func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:29:12: */ + var cnt int32 = 0 + if name != 0 { + return 0 + } + if flags&0x01 != 0 { + //TODO if (family != AF_INET6) + //TODO buf[cnt++] = (struct address){ .family = AF_INET }; + if family != 10 { + var x = Xzero_struct_address + x.Ffamily = 2 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + //TODO if (family != AF_INET) + //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; + if family != 2 { + var x = Xzero_struct_address + x.Ffamily = 10 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + } else { + Xabort(tls) //TODO- + // if (family != AF_INET6) + // buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } }; + // if (family != AF_INET) + // buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } }; + } + return cnt +} + +func name_from_numeric(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_name.c:58:12: */ + return X__lookup_ipliteral(tls, buf, name, family) +} + +func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:63:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var line [512]int8 at bp, 512 + + var l size_t = Xstrlen(tls, name) + var cnt int32 = 0 + var badfam int32 = 0 + var _buf [1032]uint8 + _ = _buf + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var _f FILE + _ = _f + var f uintptr = Xfopen(tls, ts+74, ts+85) + if !(f != 0) { + switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { + case 2: + fallthrough + case 20: + fallthrough + case 13: + return 0 + fallthrough + default: + return -11 + } + } + for Xfgets(tls, bp, int32(unsafe.Sizeof([512]int8{})), f) != 0 && cnt < 48 { + var p uintptr + var z uintptr + + if AssignUintptr(&p, Xstrchr(tls, bp, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + for p = bp + uintptr(1); AssignUintptr(&p, Xstrstr(tls, p, name)) != 0 && (!(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + UintptrFromInt32(-1))))) != 0) || !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + uintptr(l))))) != 0)); p++ { + } + if !(p != 0) { + continue + } + + // Isolate IP address to parse + for p = bp; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + switch name_from_numeric(tls, buf+uintptr(cnt)*28, bp, family) { + case 1: + cnt++ + break + case 0: + continue + default: + badfam = -2 + continue + } + + // Extract first name as canonical name + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if is_valid_hostname(tls, p) != 0 { + Xmemcpy(tls, canon, p, uint32((int32(z)-int32(p))/1+1)) + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) + if cnt != 0 { + return cnt + } + return badfam +} + +type dpc_ctx = struct { + Faddrs uintptr + Fcanon uintptr + Fcnt int32 +} /* lookup_name.c:112:1 */ + +func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ + return -1 //TODO- + Xabort(tls) + return int32(0) //TODO- + // char search[256]; + // struct resolvconf conf; + // size_t l, dots; + // char *p, *z; + + // if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; + + // /* Count dots, suppress search when >=ndots or name ends in + // * a dot, which is an explicit request for global scope. */ + // for (dots=l=0; name[l]; l++) if (name[l]=='.') dots++; + // if (dots >= conf.ndots || name[l-1]=='.') *search = 0; + + // /* Strip final dot for canon, fail if multiple trailing dots. */ + // if (name[l-1]=='.') l--; + // if (!l || name[l-1]=='.') return EAI_NONAME; + + // /* This can never happen; the caller already checked length. */ + // if (l >= 256) return EAI_NONAME; + + // /* Name with search domain appended is setup in canon[]. This both + // * provides the desired default canonical name (if the requested + // * name is not a CNAME record) and serves as a buffer for passing + // * the full requested name to name_from_dns. */ + // memcpy(canon, name, l); + // canon[l] = '.'; + + // for (p=search; *p; p=z) { + // for (; isspace(*p); p++); + // for (z=p; *z && !isspace(*z); z++); + // if (z==p) break; + // if (z-p < 256 - l - 1) { + // memcpy(canon+l+1, p, z-p); + // canon[z-p+1+l] = 0; + // int cnt = name_from_dns(buf, canon, canon, family, &conf); + // if (cnt) return cnt; + // } + // } + + // canon[l] = 0; + // return name_from_dns(buf, canon, name, family, &conf); +} + +type policy = struct { + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 +} /* lookup_name.c:237:14 */ + +var defpolicy = [6]policy{ + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, + // Last rule must match all addresses to stop loop. + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: uint8(1)}, +} /* lookup_name.c:241:3 */ + +func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ + var i int32 + for i = 0; ; i++ { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint32(defpolicy[i].Flen)) != 0 { + continue + } + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { + continue + } + return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + } + return uintptr(0) +} + +func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) +} + +func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xff { + return int32(*(*uint8_t)(unsafe.Pointer(a + 1))) & 15 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 { + return 2 + } + if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 { + return 2 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0xc0 { + return 5 + } + return 14 +} + +func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12: */ + // FIXME: The common prefix length should be limited to no greater + // than the nominal length of the prefix portion of the source + // address. However the definition of the source prefix length is + // not clear and thus this limiting is not yet implemented. + var i uint32 + for i = uint32(0); i < uint32(128) && !((int32(*(*uint8_t)(unsafe.Pointer(s /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8)))))^int32(*(*uint8_t)(unsafe.Pointer(d /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8))))))&(int32(128)>>(i%uint32(8))) != 0); i++ { + } + return int32(i) +} + +func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ + var a uintptr = _a + var b uintptr = _b + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey +} + +func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var cnt int32 = 0 + var i int32 + var j int32 + _ = j + + *(*int8)(unsafe.Pointer(canon)) = int8(0) + if name != 0 { + // reject empty name and check len so it fits into temp bufs + var l size_t = Xstrnlen(tls, name, uint32(255)) + if l-size_t(1) >= size_t(254) { + return -2 + } + Xmemcpy(tls, canon, name, l+size_t(1)) + } + + // Procedurally, a request for v6 addresses with the v4-mapped + // flag set is like a request for unspecified family, followed + // by filtering of the results. + if flags&0x08 != 0 { + if family == 10 { + family = 0 + } else { + flags = flags - 0x08 + } + } + + // Try each backend until there's at least one result. + cnt = name_from_null(tls, buf, name, family, flags) + if !(cnt != 0) { + cnt = name_from_numeric(tls, buf, name, family) + } + if !(cnt != 0) && !(flags&0x04 != 0) { + cnt = name_from_hosts(tls, buf, canon, name, family) + if !(cnt != 0) { + cnt = name_from_dns_search(tls, buf, canon, name, family) + } + } + if cnt <= 0 { + if cnt != 0 { + return cnt + } + return -2 + } + + // Filter/transform results for v4-mapped lookup, if requested. + if flags&0x08 != 0 { + Xabort(tls) //TODO- + // if (!(flags & AI_ALL)) { + // /* If any v6 results exist, remove v4 results. */ + // for (i=0; i<cnt && buf[i].family != AF_INET6; i++); + // if (i<cnt) { + // for (j=0; i<cnt; i++) { + // if (buf[i].family == AF_INET6) + // buf[j++] = buf[i]; + // } + // cnt = i = j; + // } + // } + // /* Translate any remaining v4 results to v6 */ + // for (i=0; i<cnt; i++) { + // if (buf[i].family != AF_INET) continue; + // memcpy(buf[i].addr+12, buf[i].addr, 4); + // memcpy(buf[i].addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); + // buf[i].family = AF_INET6; + // } + } + + // No further processing is needed if there are fewer than 2 + // results or if there are only IPv4 results. + if cnt < 2 || family == 2 { + return cnt + } + for i = 0; i < cnt; i++ { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { + break + } + } + if i == cnt { + return cnt + } + var cs int32 + _ = cs + //TODO pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); + + // The following implements a subset of RFC 3484/6724 destination + // address selection by generating a single 31-bit sort key for + // each address. Rules 3, 4, and 7 are omitted for having + // excessive runtime and code size cost and dubious benefit. + // So far the label/precedence table cannot be customized. + for i = 0; i < cnt; i++ { + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily + var key int32 = 0 + *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} + *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} + var sa1 uintptr + var da uintptr + // var salen socklen_t at bp+88, 4 + + var dalen socklen_t + if family == 10 { + Xmemcpy(tls, bp+8, buf+uintptr(i)*28+8, uint32(16)) + da = bp /* &da6 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + sa1 = bp + 28 /* &sa6 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + } else { + Xmemcpy(tls, bp+28+8, + ts+88, uint32(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) + Xmemcpy(tls, bp+8, + ts+88, uint32(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint32(4)) + Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint32(4)) + da = bp + 56 /* &da4 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in{})) + sa1 = bp + 72 /* &sa4 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in{})) + } + var dpolicy uintptr = policyof(tls, bp+8) + var dscope int32 = scopeof(tls, bp+8) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) + var prefixlen int32 = 0 + var fd int32 = Xsocket(tls, family, 2|02000000, 17) + if fd >= 0 { + if !(Xconnect(tls, fd, da, dalen) != 0) { + key = key | 0x40000000 + if !(Xgetsockname(tls, fd, sa1, bp+88) != 0) { + if family == 2 { + Xmemcpy(tls, + bp+28+8+uintptr(12), + bp+72+4, uint32(4)) + } + if dscope == scopeof(tls, bp+28+8) { + key = key | 0x20000000 + } + if dlabel == labelof(tls, bp+28+8) { + key = key | 0x10000000 + } + prefixlen = prefixmatch(tls, bp+28+8, + bp+8) + } + } + Xclose(tls, fd) + } + key = key | dprec<<20 + key = key | (15-dscope)<<16 + key = key | prefixlen<<8 + key = key | (48-i)<<0 + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key + } + Xqsort(tls, buf, uint32(cnt), uint32(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr) int32 + }{addrcmp}))) + + //TODO pthread_setcancelstate(cs, 0); + + return cnt +} + +func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var line [128]int8 + _ = line + var cnt int32 = 0 + var p uintptr + _ = p + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ + var port uint32 = uint32(0) + + switch socktype { + case 1: + switch proto { + case 0: + proto = 6 + fallthrough + case 6: + break + default: + return -8 + } + break + case 2: + switch proto { + case 0: + proto = 17 + fallthrough + case 17: + break + default: + return -8 + } + fallthrough + case 0: + break + default: + if name != 0 { + return -8 + } + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) + return 1 + } + + if name != 0 { + if !(int32(*(*int8)(unsafe.Pointer(name))) != 0) { + return -8 + } + port = Xstrtoul(tls, name, bp, 10) + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0) { + if port > uint32(65535) { + return -8 + } + if proto != 17 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) + } + if proto != 6 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) + } + return cnt + } + + if flags&0x400 != 0 { + return -2 + } + + var l size_t = Xstrlen(tls, name) + _ = l + + Xabort(tls) //TODO- + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) switch (errno) { + // case ENOENT: + // case ENOTDIR: + // case EACCES: + // return EAI_SERVICE; + // default: + // return EAI_SYSTEM; + // } + + Xabort(tls) //TODO- + // while (fgets(line, sizeof line, f) && cnt < MAXSERVS) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // /* Find service name */ + // for(p=line; (p=strstr(p, name)); p++) { + // if (p>line && !isspace(p[-1])) continue; + // if (p[l] && !isspace(p[l])) continue; + // break; + // } + // if (!p) continue; + + // /* Skip past canonical name at beginning of line */ + // for (p=line; *p && !isspace(*p); p++); + + // port = strtoul(p, &z, 10); + // if (port > 65535 || z==p) continue; + // if (!strncmp(z, "/udp", 4)) { + // if (proto == IPPROTO_TCP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_DGRAM; + // buf[cnt++].proto = IPPROTO_UDP; + // } + // if (!strncmp(z, "/tcp", 4)) { + // if (proto == IPPROTO_UDP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_STREAM; + // buf[cnt++].proto = IPPROTO_TCP; + // } + // } + // __fclose_ca(f); + // return cnt > 0 ? cnt : EAI_SERVICE; + Xabort(tls) + return int32(0) //TODO- +} + +func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ + *(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { + (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint32(0)) + } + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+28, AssignPtrUintptr(f+16, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { + *(*uint32)(unsafe.Pointer(f)) |= uint32(32) + return -1 + } + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+8, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { + return -1 + } + return 0 +} + +func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */ + X__builtin_abort(tls) //TODO- + // __stdio_exit_needed(); +} + +// This function assumes it will never be called if there is already +// data buffered for reading. + +func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ + bp := tls.Alloc(1) + defer tls.Free(1) + + // var c uint8 at bp, 1 + + if !(X__toread(tls, f) != 0) && (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint32(1)) == size_t(1) { + return int32(*(*uint8)(unsafe.Pointer(bp))) + } + return -1 +} + +func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ + var try uintptr + var sign int32 + for nel > size_t(0) { + try = base + uintptr(width*(nel/size_t(2))) + sign = (*struct { + f func(*TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) + if sign < 0 { + nel = nel / size_t(2) + } else if sign > 0 { + base = try + uintptr(width) + nel = nel - (nel/size_t(2) + size_t(1)) + } else { + return try + } + } + return uintptr(0) +} + +func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + // var f FILE at bp, 136 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y float64 = X__floatscan(tls, bp, prec, 1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) + if p != 0 { + *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { + if cnt != 0 { + return s + uintptr(cnt) + } + return s + }() + } + return y +} + +func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */ + return float32(strtox(tls, s, p, 0)) +} + +func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */ + return strtox(tls, s, p, 1) +} + +func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */ + return strtox(tls, s, p, 2) +} + +func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* strtol.c:8:27: */ + bp := tls.Alloc(136) + defer tls.Free(136) + + // var f FILE at bp, 136 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+4, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) + if p != 0 { + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + off_t((int32((*FILE)(unsafe.Pointer(bp)).Frpos)-int32((*FILE)(unsafe.Pointer(bp)).Fbuf))/1)) + *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) + } + return y +} + +func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */ + return strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1)) +} + +func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:26:11: */ + return int64(strtox1(tls, s, p, base, Uint64FromInt64(-0x7fffffffffffffff-int64(1)))) +} + +func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) uint32 { /* strtol.c:31:15: */ + return uint32(strtox1(tls, s, p, base, uint64(2*uint32(0x7fffffff)+uint32(1)))) +} + +func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) int32 { /* strtol.c:36:6: */ + return int32(strtox1(tls, s, p, base, uint64(0+Uint32FromInt32(Int32(-Int32(0x7fffffff))-Int32FromInt32(1))))) +} + +func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) intmax_t { /* strtol.c:41:10: */ + return Xstrtoll(tls, s, p, base) +} + +func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */ + return Xstrtoull(tls, s, p, base) +} + +func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */ + var l size_t = Xstrlen(tls, s) + var d uintptr = Xmalloc(tls, l+size_t(1)) + if !(d != 0) { + return uintptr(0) + } + return Xmemcpy(tls, d, s, l+size_t(1)) +} + +func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */ + var p uintptr = Xmemchr(tls, s, 0, n) + if p != 0 { + return uint32((int32(p) - int32(s)) / 1) + } + return n +} + +func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var a uintptr = s + *(*[8]size_t)(unsafe.Pointer(bp /* byteset */)) = [8]size_t{0: size_t(0)} + + if !(int32(*(*int8)(unsafe.Pointer(c))) != 0) { + return size_t(0) + } + if !(int32(*(*int8)(unsafe.Pointer(c + 1))) != 0) { + for ; int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(c))); s++ { + } + return size_t((int32(s) - int32(a)) / 1) + } + + for ; *(*int8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint32(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4, size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; c++ { + } + for ; *(*int8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4))&(size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; s++ { + } + return size_t((int32(s) - int32(a)) / 1) +} + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_)) // ctype_.c:319:23: +} + +var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/libc/musl_openbsd_amd64.go b/vendor/modernc.org/libc/musl_openbsd_amd64.go index 6a2a07ba..c0493349 100644 --- a/vendor/modernc.org/libc/musl_openbsd_amd64.go +++ b/vendor/modernc.org/libc/musl_openbsd_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc @@ -357,2964 +357,322 @@ type size_t = uint64 /* <builtin>:9:23 */ type wchar_t = int32 /* <builtin>:15:24 */ -/// typedef __ct_rune_t __wint_t; -/// -/// -/// -/// typedef __uint_least16_t __char16_t; -/// typedef __uint_least32_t __char32_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef struct { -/// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); -/// -/// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); -/// -/// } __max_align_t; -/// -/// typedef __uint64_t __dev_t; -/// -/// typedef __uint32_t __fixpt_t; -/// -/// -/// -/// -/// -/// typedef union { -/// char __mbstate8[128]; -/// __int64_t _mbstateL; -/// } __mbstate_t; -/// -/// typedef __uintmax_t __rman_res_t; -/// -/// -/// -/// -/// -/// -/// typedef __builtin_va_list __va_list; -/// -/// -/// -/// -/// -/// -/// typedef __va_list __gnuc_va_list; -/// -/// -/// -/// -/// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); -/// -/// -/// extern int __mb_sb_limit; - -type _RuneEntry = struct { - __min int32 - __max int32 - __map int32 - _ [4]byte - __types uintptr -} /* table.cpp.c:290:3 */ - -type _RuneRange = struct { - __nranges int32 - _ [4]byte - __ranges uintptr -} /* table.cpp.c:295:3 */ - -type _RuneLocale = struct { - __magic [8]int8 - __encoding [32]int8 - __sgetrune uintptr - __sputrune uintptr - __invalid_rune int32 - _ [4]byte - __runetype [256]uint64 - __maplower [256]int32 - __mapupper [256]int32 - __runetype_ext _RuneRange - __maplower_ext _RuneRange - __mapupper_ext _RuneRange - __variable uintptr - __variable_len int32 - _ [4]byte -} /* table.cpp.c:320:3 */ -/// -/// extern const _RuneLocale _DefaultRuneLocale; -/// extern const _RuneLocale *_CurrentRuneLocale; -/// -/// -/// -/// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; -/// static __inline const _RuneLocale *__getCurrentRuneLocale(void) -/// { -/// -/// if (_ThreadRuneLocale) -/// return _ThreadRuneLocale; -/// return _CurrentRuneLocale; -/// } -/// -/// -/// -/// -/// -/// static __inline int -/// __maskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : -/// (__getCurrentRuneLocale())->__runetype[_c]) & _f; -/// } -/// -/// static __inline int -/// __sbmaskrune(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : -/// (__getCurrentRuneLocale())->__runetype[_c] & _f; -/// } -/// -/// static __inline int -/// __istype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__maskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __sbistype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (!!__sbmaskrune(_c, _f)); -/// } -/// -/// static __inline int -/// __isctype(__ct_rune_t _c, unsigned long _f) -/// { -/// return (_c < 0 || _c >= 128) ? 0 : -/// !!(_DefaultRuneLocale.__runetype[_c] & _f); -/// } -/// -/// static __inline __ct_rune_t -/// __toupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtoupper(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__mapupper[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __tolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline __ct_rune_t -/// __sbtolower(__ct_rune_t _c) -/// { -/// return (_c < 0 || _c >= __mb_sb_limit) ? _c : -/// (__getCurrentRuneLocale())->__maplower[_c]; -/// } -/// -/// static __inline int -/// __wcwidth(__ct_rune_t _c) -/// { -/// unsigned int _x; -/// -/// if (_c == 0) -/// return (0); -/// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); -/// if ((_x & 0xe0000000L) != 0) -/// return ((_x & 0xe0000000L) >> 30); -/// return ((_x & 0x00040000L) != 0 ? 1 : -1); -/// } -/// -/// -/// -/// 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); -/// -/// -/// int isascii(int); -/// int toascii(int); -/// -/// -/// -/// int isblank(int); -/// -/// -/// -/// int digittoint(int); -/// int ishexnumber(int); -/// int isideogram(int); -/// int isnumber(int); -/// int isphonogram(int); -/// int isrune(int); -/// int isspecial(int); -/// -/// -/// -/// -/// -/// typedef struct _xlocale *locale_t; -/// -/// -/// -/// -/// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); -/// _RuneLocale *__runes_for_locale(locale_t, int*); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -/// -/// inline int -/// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// int __limit; -/// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); -/// return (__c < 0 || __c >= __limit) ? 0 : -/// runes->__runetype[__c] & __f; -/// } -/// -/// inline int -/// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) -/// { -/// return (!!__sbmaskrune_l(__c, __f, __loc)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } -/// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } -/// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } -/// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } -/// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } -/// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } -/// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } -/// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } -/// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } -/// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } -/// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } -/// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } -/// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } -/// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } -/// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } -/// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } -/// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } -/// -/// inline int digittoint_l(int, locale_t); -/// inline int tolower_l(int, locale_t); -/// inline int toupper_l(int, locale_t); -/// -/// inline int digittoint_l(int __c, locale_t __l) -/// { return __sbmaskrune_l((__c), 0xFF, __l); } -/// -/// inline int tolower_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__maplower[__c]; -/// } -/// inline int toupper_l(int __c, locale_t __l) -/// { -/// int __limit; -/// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); -/// return (__c < 0 || __c >= __limit) ? __c : -/// __runes->__mapupper[__c]; -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __mbstate_t mbstate_t; -/// -/// -/// -/// -/// typedef __size_t size_t; -/// -/// -/// -/// -/// -/// typedef __va_list va_list; -/// -/// -/// -/// -/// -/// -/// typedef ___wchar_t wchar_t; -/// -/// -/// -/// -/// -/// typedef __wint_t wint_t; -/// -/// typedef struct __sFILE FILE; -/// -/// struct tm; -/// -/// -/// wint_t btowc(int); -/// wint_t fgetwc(FILE *); -/// wchar_t * -/// fgetws(wchar_t * restrict, int, FILE * restrict); -/// wint_t fputwc(wchar_t, FILE *); -/// int fputws(const wchar_t * restrict, FILE * restrict); -/// int fwide(FILE *, int); -/// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); -/// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); -/// wint_t getwc(FILE *); -/// wint_t getwchar(void); -/// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); -/// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, -/// mbstate_t * restrict); -/// int mbsinit(const mbstate_t *); -/// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// mbstate_t * restrict); -/// wint_t putwc(wchar_t, FILE *); -/// wint_t putwchar(wchar_t); -/// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// ...); -/// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); -/// wint_t ungetwc(wint_t, FILE *); -/// int vfwprintf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, -/// __va_list); -/// int vwprintf(const wchar_t * restrict, __va_list); -/// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); -/// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// int wcscoll(const wchar_t *, const wchar_t *); -/// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); -/// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, -/// const struct tm * restrict); -/// size_t wcslen(const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, -/// size_t); -/// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); -/// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); -/// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// mbstate_t * restrict); -/// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); -/// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) -/// __attribute__((__pure__)); -/// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); -/// int wctob(wint_t); -/// double wcstod(const wchar_t * restrict, wchar_t ** restrict); -/// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, -/// wchar_t ** restrict); -/// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); -/// unsigned long -/// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); -/// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); -/// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); -/// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); -/// wchar_t *wmemset(wchar_t *, wchar_t, size_t); -/// int wprintf(const wchar_t * restrict, ...); -/// int wscanf(const wchar_t * restrict, ...); -/// -/// -/// extern FILE *__stdinp; -/// extern FILE *__stdoutp; -/// extern FILE *__stderrp; -/// -/// int vfwscanf(FILE * restrict, const wchar_t * restrict, -/// __va_list); -/// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, -/// __va_list); -/// int vwscanf(const wchar_t * restrict, __va_list); -/// float wcstof(const wchar_t * restrict, wchar_t ** restrict); -/// long double -/// wcstold(const wchar_t * restrict, wchar_t ** restrict); -/// -/// -/// long long -/// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// unsigned long long -/// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); -/// -/// -/// -/// -/// int wcswidth(const wchar_t *, size_t); -/// int wcwidth(wchar_t); -/// -/// -/// -/// -/// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// FILE *open_wmemstream(wchar_t **, size_t *); -/// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); -/// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); -/// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); -/// int wcscasecmp(const wchar_t *, const wchar_t *); -/// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); -/// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); -/// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, -/// size_t, mbstate_t * restrict); -/// -/// -/// -/// wchar_t *fgetwln(FILE * restrict, size_t * restrict); -/// size_t wcslcat(wchar_t *, const wchar_t *, size_t); -/// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); -/// -/// -/// -/// -/// -/// int wcscasecmp_l(const wchar_t *, const wchar_t *, -/// locale_t); -/// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, -/// locale_t); -/// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); -/// size_t wcsxfrm_l(wchar_t * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct lconv { -/// char *decimal_point; -/// char *thousands_sep; -/// char *grouping; -/// char *int_curr_symbol; -/// char *currency_symbol; -/// char *mon_decimal_point; -/// char *mon_thousands_sep; -/// char *mon_grouping; -/// char *positive_sign; -/// char *negative_sign; -/// char int_frac_digits; -/// char frac_digits; -/// char p_cs_precedes; -/// char p_sep_by_space; -/// char n_cs_precedes; -/// char n_sep_by_space; -/// char p_sign_posn; -/// char n_sign_posn; -/// char int_p_cs_precedes; -/// char int_n_cs_precedes; -/// char int_p_sep_by_space; -/// char int_n_sep_by_space; -/// char int_p_sign_posn; -/// char int_n_sign_posn; -/// }; -/// -/// -/// struct lconv *localeconv(void); -/// char *setlocale(int, const char *); -/// -/// -/// -/// -/// locale_t duplocale(locale_t base); -/// void freelocale(locale_t loc); -/// locale_t newlocale(int mask, const char *locale, locale_t base); -/// const char *querylocale(int mask, locale_t loc); -/// locale_t uselocale(locale_t loc); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// wint_t btowc_l(int, locale_t); -/// wint_t fgetwc_l(FILE *, locale_t); -/// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, -/// locale_t); -/// wint_t fputwc_l(wchar_t, FILE *, locale_t); -/// int fputws_l(const wchar_t * restrict, FILE * restrict, -/// locale_t); -/// int fwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// int fwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t getwc_l(FILE *, locale_t); -/// wint_t getwchar_l(locale_t); -/// size_t mbrlen_l(const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t mbrtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// int mbsinit_l(const mbstate_t *, locale_t); -/// size_t mbsrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// wint_t putwc_l(wchar_t, FILE *, locale_t); -/// wint_t putwchar_l(wchar_t, locale_t); -/// int swprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, ...); -/// int swscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t * restrict, ...); -/// wint_t ungetwc_l(wint_t, FILE *, locale_t); -/// int vfwprintf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vwprintf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// size_t wcrtomb_l(char * restrict, wchar_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsftime_l(wchar_t * restrict, size_t, -/// const wchar_t * restrict, -/// const struct tm * restrict, locale_t); -/// size_t wcsrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, -/// mbstate_t * restrict, locale_t); -/// double wcstod_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long wcstol_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long wcstoul_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// int wcswidth_l(const wchar_t *, size_t, locale_t); -/// int wctob_l(wint_t, locale_t); -/// int wcwidth_l(wchar_t, locale_t); -/// int wprintf_l(locale_t, const wchar_t * restrict, ...); -/// int wscanf_l(locale_t, const wchar_t * restrict, ...); -/// int vfwscanf_l(FILE * restrict, locale_t, -/// const wchar_t * restrict, __va_list); -/// int vswscanf_l(const wchar_t * restrict, locale_t, -/// const wchar_t *restrict, __va_list); -/// int vwscanf_l(locale_t, const wchar_t * restrict, -/// __va_list); -/// float wcstof_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long double wcstold_l(const wchar_t * restrict, -/// wchar_t ** restrict, locale_t); -/// long long wcstoll_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// unsigned long long wcstoull_l(const wchar_t * restrict, -/// wchar_t ** restrict, int, locale_t); -/// size_t mbsnrtowcs_l(wchar_t * restrict, -/// const char ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// size_t wcsnrtombs_l(char * restrict, -/// const wchar_t ** restrict, size_t, size_t, -/// mbstate_t * restrict, locale_t); -/// -/// -/// -/// -/// -/// struct lconv *localeconv_l(locale_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __rune_t rune_t; -/// -/// typedef struct { -/// int quot; -/// int rem; -/// } div_t; -/// -/// typedef struct { -/// long quot; -/// long rem; -/// } ldiv_t; -/// -/// -/// -/// -/// -/// double atof_l(const char *, locale_t); -/// int atoi_l(const char *, locale_t); -/// long atol_l(const char *, locale_t); -/// long long atoll_l(const char *, locale_t); -/// int mblen_l(const char *, size_t, locale_t); -/// size_t mbstowcs_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// int mbtowc_l(wchar_t * restrict, -/// const char * restrict, size_t, locale_t); -/// double strtod_l(const char *, char **, locale_t); -/// float strtof_l(const char *, char **, locale_t); -/// long strtol_l(const char *, char **, int, locale_t); -/// long double strtold_l(const char *, char **, locale_t); -/// long long strtoll_l(const char *, char **, int, locale_t); -/// unsigned long strtoul_l(const char *, char **, int, locale_t); -/// unsigned long long strtoull_l(const char *, char **, int, locale_t); -/// size_t wcstombs_l(char * restrict, -/// const wchar_t * restrict, size_t, locale_t); -/// int wctomb_l(char *, wchar_t, locale_t); -/// -/// int ___mb_cur_max_l(locale_t); -/// -/// -/// extern int __mb_cur_max; -/// extern int ___mb_cur_max(void); -/// -/// -/// _Noreturn void abort(void); -/// int abs(int) __attribute__((__const__)); -/// int atexit(void (* )(void)); -/// double atof(const char *); -/// int atoi(const char *); -/// long atol(const char *); -/// void *bsearch(const void *, const void *, size_t, -/// size_t, int (*)(const void * , const void *)); -/// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(1, 2))); -/// div_t div(int, int) __attribute__((__const__)); -/// _Noreturn void exit(int); -/// void free(void *); -/// char *getenv(const char *); -/// long labs(long) __attribute__((__const__)); -/// ldiv_t ldiv(long, long) __attribute__((__const__)); -/// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); -/// int mblen(const char *, size_t); -/// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); -/// int mbtowc(wchar_t * restrict, const char * restrict, size_t); -/// void qsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// int rand(void); -/// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// void srand(unsigned); -/// double strtod(const char * restrict, char ** restrict); -/// float strtof(const char * restrict, char ** restrict); -/// long strtol(const char * restrict, char ** restrict, int); -/// long double -/// strtold(const char * restrict, char ** restrict); -/// unsigned long -/// strtoul(const char * restrict, char ** restrict, int); -/// int system(const char *); -/// int wctomb(char *, wchar_t); -/// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); -/// -/// typedef struct { -/// long long quot; -/// long long rem; -/// } lldiv_t; -/// -/// -/// long long -/// atoll(const char *); -/// -/// long long -/// llabs(long long) __attribute__((__const__)); -/// -/// lldiv_t lldiv(long long, long long) __attribute__((__const__)); -/// -/// long long -/// strtoll(const char * restrict, char ** restrict, int); -/// -/// unsigned long long -/// strtoull(const char * restrict, char ** restrict, int); -/// -/// -/// _Noreturn void _Exit(int); -/// -/// -/// -/// -/// -/// -/// void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) -/// __attribute__((__alloc_size__(2))); -/// int at_quick_exit(void (*)(void)); -/// _Noreturn void -/// quick_exit(int); -/// -/// -/// -/// -/// -/// char *realpath(const char * restrict, char * restrict); -/// -/// -/// int rand_r(unsigned *); -/// -/// -/// int posix_memalign(void **, size_t, size_t); -/// int setenv(const char *, const char *, int); -/// int unsetenv(const char *); -/// -/// -/// -/// int getsubopt(char **, char *const *, char **); -/// -/// char *mkdtemp(char *); -/// -/// -/// -/// int mkstemp(char *); -/// -/// long a64l(const char *); -/// double drand48(void); -/// -/// double erand48(unsigned short[3]); -/// -/// -/// char *initstate(unsigned int, char *, size_t); -/// long jrand48(unsigned short[3]); -/// char *l64a(long); -/// void lcong48(unsigned short[7]); -/// long lrand48(void); -/// -/// char *mktemp(char *); -/// -/// -/// long mrand48(void); -/// long nrand48(unsigned short[3]); -/// int putenv(char *); -/// long random(void); -/// unsigned short -/// *seed48(unsigned short[3]); -/// char *setstate( char *); -/// void srand48(long); -/// void srandom(unsigned int); -/// -/// -/// -/// int grantpt(int); -/// int posix_openpt(int); -/// char *ptsname(int); -/// int unlockpt(int); -/// -/// -/// -/// int ptsname_r(int, char *, size_t); -/// -/// -/// -/// extern const char *malloc_conf; -/// extern void (*malloc_message)(void *, const char *); -/// -/// void abort2(const char *, int, void **) __attribute__((__noreturn__)); -/// __uint32_t -/// arc4random(void); -/// void arc4random_buf(void *, size_t); -/// __uint32_t -/// arc4random_uniform(__uint32_t); -/// -/// -/// -/// -/// -/// -/// char *getbsize(int *, long *); -/// -/// char *cgetcap(char *, const char *, int); -/// int cgetclose(void); -/// int cgetent(char **, char **, const char *); -/// int cgetfirst(char **, char **); -/// int cgetmatch(const char *, const char *); -/// int cgetnext(char **, char **); -/// int cgetnum(char *, const char *, long *); -/// int cgetset(const char *); -/// int cgetstr(char *, const char *, char **); -/// int cgetustr(char *, const char *, char **); -/// -/// int daemon(int, int); -/// int daemonfd(int, int); -/// char *devname(__dev_t, __mode_t); -/// char *devname_r(__dev_t, __mode_t, char *, int); -/// char *fdevname(int); -/// char *fdevname_r(int, char *, int); -/// int getloadavg(double [], int); -/// const char * -/// getprogname(void); -/// -/// int heapsort(void *, size_t, size_t, -/// int (* )(const void *, const void *)); -/// -/// -/// -/// -/// -/// -/// int l64a_r(long, char *, int); -/// int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); -/// -/// -/// -/// int mkostemp(char *, int); -/// int mkostemps(char *, int, int); -/// int mkostempsat(int, char *, int, int); -/// void qsort_r(void *, size_t, size_t, void *, -/// int (*)(void *, const void *, const void *)); -/// int radixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) -/// __attribute__((__alloc_size__(2, 3))); -/// void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); -/// int rpmatch(const char *); -/// void setprogname(const char *); -/// int sradixsort(const unsigned char **, int, const unsigned char *, -/// unsigned); -/// void srandomdev(void); -/// long long -/// strtonum(const char *, long long, long long, const char **); -/// -/// -/// __int64_t -/// strtoq(const char *, char **, int); -/// __uint64_t -/// strtouq(const char *, char **, int); -/// -/// extern char *suboptarg; -/// -/// -/// -/// -/// -/// -/// typedef size_t rsize_t; -/// -/// -/// -/// -/// typedef int errno_t; -/// -/// -/// -/// typedef void (*constraint_handler_t)(const char * restrict, -/// void * restrict, errno_t); -/// -/// constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); -/// -/// _Noreturn void abort_handler_s(const char * restrict, void * restrict, -/// errno_t); -/// -/// void ignore_handler_s(const char * restrict, void * restrict, errno_t); -/// -/// errno_t qsort_s(void *, rsize_t, rsize_t, -/// int (*)(const void *, const void *, void *), void *); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// typedef __int8_t int8_t; -/// -/// -/// -/// -/// typedef __int16_t int16_t; -/// -/// -/// -/// -/// typedef __int32_t int32_t; -/// -/// -/// -/// -/// typedef __int64_t int64_t; -/// -/// -/// -/// -/// typedef __uint8_t uint8_t; -/// -/// -/// -/// -/// typedef __uint16_t uint16_t; -/// -/// -/// -/// -/// typedef __uint32_t uint32_t; -/// -/// -/// -/// -/// typedef __uint64_t uint64_t; -/// -/// -/// -/// -/// typedef __intptr_t intptr_t; -/// -/// -/// -/// typedef __uintptr_t uintptr_t; -/// -/// -/// -/// typedef __intmax_t intmax_t; -/// -/// -/// -/// typedef __uintmax_t uintmax_t; -/// -/// -/// typedef __int_least8_t int_least8_t; -/// typedef __int_least16_t int_least16_t; -/// typedef __int_least32_t int_least32_t; -/// typedef __int_least64_t int_least64_t; -/// -/// typedef __uint_least8_t uint_least8_t; -/// typedef __uint_least16_t uint_least16_t; -/// typedef __uint_least32_t uint_least32_t; -/// typedef __uint_least64_t uint_least64_t; -/// -/// typedef __int_fast8_t int_fast8_t; -/// typedef __int_fast16_t int_fast16_t; -/// typedef __int_fast32_t int_fast32_t; -/// typedef __int_fast64_t int_fast64_t; -/// -/// typedef __uint_fast8_t uint_fast8_t; -/// typedef __uint_fast16_t uint_fast16_t; -/// typedef __uint_fast32_t uint_fast32_t; -/// typedef __uint_fast64_t uint_fast64_t; -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// struct pthread; -/// struct pthread_attr; -/// struct pthread_cond; -/// struct pthread_cond_attr; -/// struct pthread_mutex; -/// struct pthread_mutex_attr; -/// struct pthread_once; -/// struct pthread_rwlock; -/// struct pthread_rwlockattr; -/// struct pthread_barrier; -/// struct pthread_barrier_attr; -/// struct pthread_spinlock; -/// -/// typedef struct pthread *pthread_t; -/// -/// -/// typedef struct pthread_attr *pthread_attr_t; -/// typedef struct pthread_mutex *pthread_mutex_t; -/// typedef struct pthread_mutex_attr *pthread_mutexattr_t; -/// typedef struct pthread_cond *pthread_cond_t; -/// typedef struct pthread_cond_attr *pthread_condattr_t; -/// typedef int pthread_key_t; -/// typedef struct pthread_once pthread_once_t; -/// typedef struct pthread_rwlock *pthread_rwlock_t; -/// typedef struct pthread_rwlockattr *pthread_rwlockattr_t; -/// typedef struct pthread_barrier *pthread_barrier_t; -/// typedef struct pthread_barrierattr *pthread_barrierattr_t; -/// typedef struct pthread_spinlock *pthread_spinlock_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef void *pthread_addr_t; -/// typedef void *(*pthread_startroutine_t)(void *); -/// -/// -/// -/// -/// struct pthread_once { -/// int state; -/// pthread_mutex_t mutex; -/// }; -/// -/// -/// -/// typedef unsigned char u_char; -/// typedef unsigned short u_short; -/// typedef unsigned int u_int; -/// typedef unsigned long u_long; -/// -/// typedef unsigned short ushort; -/// typedef unsigned int uint; -/// -/// typedef __uint8_t u_int8_t; -/// typedef __uint16_t u_int16_t; -/// typedef __uint32_t u_int32_t; -/// typedef __uint64_t u_int64_t; -/// -/// typedef __uint64_t u_quad_t; -/// typedef __int64_t quad_t; -/// typedef quad_t * qaddr_t; -/// -/// typedef char * caddr_t; -/// typedef const char * c_caddr_t; -/// -/// -/// typedef __blksize_t blksize_t; -/// -/// -/// -/// typedef __cpuwhich_t cpuwhich_t; -/// typedef __cpulevel_t cpulevel_t; -/// typedef __cpusetid_t cpusetid_t; -/// -/// -/// typedef __blkcnt_t blkcnt_t; -/// -/// -/// -/// -/// typedef __clock_t clock_t; -/// -/// -/// -/// -/// typedef __clockid_t clockid_t; -/// -/// -/// -/// typedef __critical_t critical_t; -/// typedef __daddr_t daddr_t; -/// -/// -/// typedef __dev_t dev_t; -/// -/// -/// -/// -/// typedef __fflags_t fflags_t; -/// -/// -/// -/// typedef __fixpt_t fixpt_t; -/// -/// -/// typedef __fsblkcnt_t fsblkcnt_t; -/// typedef __fsfilcnt_t fsfilcnt_t; -/// -/// -/// -/// -/// typedef __gid_t gid_t; -/// -/// -/// -/// -/// typedef __uint32_t in_addr_t; -/// -/// -/// -/// -/// typedef __uint16_t in_port_t; -/// -/// -/// -/// -/// typedef __id_t id_t; -/// -/// -/// -/// -/// typedef __ino_t ino_t; -/// -/// -/// -/// -/// typedef __key_t key_t; -/// -/// -/// -/// -/// typedef __lwpid_t lwpid_t; -/// -/// -/// -/// -/// typedef __mode_t mode_t; -/// -/// -/// -/// -/// typedef __accmode_t accmode_t; -/// -/// -/// -/// -/// typedef __nlink_t nlink_t; -/// -/// -/// -/// -/// typedef __off_t off_t; -/// -/// -/// -/// -/// typedef __off64_t off64_t; -/// -/// -/// -/// -/// typedef __pid_t pid_t; -/// -/// -/// -/// typedef __register_t register_t; -/// -/// -/// typedef __rlim_t rlim_t; -/// -/// -/// -/// typedef __int64_t sbintime_t; -/// -/// typedef __segsz_t segsz_t; -/// -/// -/// -/// -/// -/// -/// -/// typedef __ssize_t ssize_t; -/// -/// -/// -/// -/// typedef __suseconds_t suseconds_t; -/// -/// -/// -/// -/// typedef __time_t time_t; -/// -/// -/// -/// -/// typedef __timer_t timer_t; -/// -/// -/// -/// -/// typedef __mqd_t mqd_t; -/// -/// -/// -/// typedef __u_register_t u_register_t; -/// -/// -/// typedef __uid_t uid_t; -/// -/// -/// -/// -/// typedef __useconds_t useconds_t; -/// -/// -/// -/// -/// -/// typedef unsigned long cap_ioctl_t; -/// -/// -/// -/// -/// struct cap_rights; -/// -/// typedef struct cap_rights cap_rights_t; -/// -/// typedef __uint64_t kpaddr_t; -/// typedef __uint64_t kvaddr_t; -/// typedef __uint64_t ksize_t; -/// typedef __int64_t kssize_t; -/// -/// typedef __vm_offset_t vm_offset_t; -/// typedef __uint64_t vm_ooffset_t; -/// typedef __vm_paddr_t vm_paddr_t; -/// typedef __uint64_t vm_pindex_t; -/// typedef __vm_size_t vm_size_t; -/// -/// typedef __rman_res_t rman_res_t; -/// -/// static __inline __uint16_t -/// __bitcount16(__uint16_t _x) -/// { -/// -/// _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); -/// _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f; -/// _x = (_x + (_x >> 8)) & 0x00ff; -/// return (_x); -/// } -/// -/// static __inline __uint32_t -/// __bitcount32(__uint32_t _x) -/// { -/// -/// _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); -/// _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// static __inline __uint64_t -/// __bitcount64(__uint64_t _x) -/// { -/// -/// _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); -/// _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); -/// _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; -/// _x = (_x + (_x >> 8)); -/// _x = (_x + (_x >> 16)); -/// _x = (_x + (_x >> 32)) & 0x000000ff; -/// return (_x); -/// } -/// -/// -/// -/// -/// -/// typedef struct __sigset { -/// __uint32_t __bits[4]; -/// } __sigset_t; -/// -/// -/// -/// struct timeval { -/// time_t tv_sec; -/// suseconds_t tv_usec; -/// }; -/// -/// -/// -/// -/// -/// struct timespec { -/// time_t tv_sec; -/// long tv_nsec; -/// }; -/// -/// -/// struct itimerspec { -/// struct timespec it_interval; -/// struct timespec it_value; -/// }; -/// -/// -/// typedef unsigned long __fd_mask; -/// -/// typedef __fd_mask fd_mask; -/// -/// -/// -/// -/// typedef __sigset_t sigset_t; -/// -/// typedef struct fd_set { -/// __fd_mask __fds_bits[(((1024) + (((sizeof(__fd_mask) * 8)) - 1)) / ((sizeof(__fd_mask) * 8)))]; -/// } fd_set; -/// -/// -/// int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, -/// const struct timespec *restrict, const sigset_t *restrict); -/// -/// -/// -/// int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -/// -/// -/// -/// -/// static __inline int -/// __major(dev_t _d) -/// { -/// return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); -/// } -/// -/// static __inline int -/// __minor(dev_t _d) -/// { -/// return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); -/// } -/// -/// static __inline dev_t -/// __makedev(int _Major, int _Minor) -/// { -/// return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | -/// ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// int ftruncate(int, off_t); -/// -/// -/// -/// off_t lseek(int, off_t, int); -/// -/// -/// -/// void * mmap(void *, size_t, int, int, int, off_t); -/// -/// -/// -/// int truncate(const char *, off_t); -/// -/// -/// -/// -/// -/// -/// -/// -/// static __inline int atomic_cmpset_char(volatile u_char *dst, u_char expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_char(volatile u_char *dst, u_char *expect, u_char src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "char" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_short(volatile u_short *dst, u_short expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_short(volatile u_short *dst, u_short *expect, u_short src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "short" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_int(volatile u_int *dst, u_int *expect, u_int src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "int" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// static __inline int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_cmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (expect) : "r" (src) : "memory", "cc"); return (res); } static __inline int atomic_fcmpset_long(volatile u_long *dst, u_long *expect, u_long src) { u_char res; __asm volatile( " " "lock ; " " " " cmpxchg %3,%1 ; " "# atomic_fcmpset_" "long" " " : "=@cce" (res), "+m" (*dst), "+a" (*expect) : "r" (src) : "memory", "cc"); return (res); }; -/// -/// -/// -/// -/// -/// static __inline u_int -/// atomic_fetchadd_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddl %0,%1 ; " -/// "# atomic_fetchadd_int" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// static __inline u_long -/// atomic_fetchadd_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " xaddq %0,%1 ; " -/// "# atomic_fetchadd_long" -/// : "+r" (v), -/// "+m" (*p) -/// : : "cc"); -/// return (v); -/// } -/// -/// static __inline int -/// atomic_testandset_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsl %2,%1 ; " -/// "# atomic_testandset_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandset_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btsq %2,%1 ; " -/// "# atomic_testandset_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_int(volatile u_int *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrl %2,%1 ; " -/// "# atomic_testandclear_int" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Ir" (v & 0x1f) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline int -/// atomic_testandclear_long(volatile u_long *p, u_int v) -/// { -/// u_char res; -/// -/// __asm volatile( -/// " " "lock ; " " " -/// " btrq %2,%1 ; " -/// "# atomic_testandclear_long" -/// : "=@ccc" (res), -/// "+m" (*p) -/// : "Jr" ((u_long)(v & 0x3f)) -/// : "cc"); -/// return (res); -/// } -/// -/// static __inline void -/// __storeload_barrier(void) -/// { -/// -/// __asm volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_acq_rel(void) -/// { -/// -/// __asm volatile(" " : : : "memory"); -/// } -/// -/// static __inline void -/// atomic_thread_fence_seq_cst(void) -/// { -/// -/// __storeload_barrier(); -/// } -/// -/// -/// -/// static __inline void atomic_set_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_set_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "orb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "cc"); } static __inline void atomic_clear_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "andb %b1,%0" : "+m" (*p) : "iq" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_add_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "addb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "cc"); } static __inline void atomic_subtract_barr_char(volatile u_char *p, u_char v){ __asm volatile("lock ; " "subb %b1,%0" : "+m" (*p) : "iq" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "orw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "andw %w1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "addw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_short(volatile u_short *p, u_short v){ __asm volatile("lock ; " "subw %w1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_set_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "orl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "cc"); } static __inline void atomic_clear_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "andl %1,%0" : "+m" (*p) : "ir" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_add_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "addl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "cc"); } static __inline void atomic_subtract_barr_int(volatile u_int *p, u_int v){ __asm volatile("lock ; " "subl %1,%0" : "+m" (*p) : "ir" (v) : "memory", "cc"); } struct __hack; -/// -/// static __inline void atomic_set_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_set_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "orq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_clear_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "cc"); } static __inline void atomic_clear_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "andq %1,%0" : "+m" (*p) : "er" (~v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_add_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_add_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "addq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// static __inline void atomic_subtract_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "cc"); } static __inline void atomic_subtract_barr_long(volatile u_long *p, u_long v){ __asm volatile("lock ; " "subq %1,%0" : "+m" (*p) : "er" (v) : "memory", "cc"); } struct __hack; -/// -/// -/// -/// -/// -/// static __inline u_char atomic_load_acq_char(volatile u_char *p) { u_char res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_char(volatile u_char *p, u_char v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_short atomic_load_acq_short(volatile u_short *p) { u_short res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_short(volatile u_short *p, u_short v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_int atomic_load_acq_int(volatile u_int *p) { u_int res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_int(volatile u_int *p, u_int v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// static __inline u_long atomic_load_acq_long(volatile u_long *p) { u_long res; res = *p; __asm volatile(" " : : : "memory"); return (res); } struct __hack; static __inline void atomic_store_rel_long(volatile u_long *p, u_long v) { __asm volatile(" " : : : "memory"); *p = v; } struct __hack; -/// -/// static __inline u_int -/// atomic_swap_int(volatile u_int *p, u_int v) -/// { -/// -/// __asm volatile( -/// " xchgl %1,%0 ; " -/// "# atomic_swap_int" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// static __inline u_long -/// atomic_swap_long(volatile u_long *p, u_long v) -/// { -/// -/// __asm volatile( -/// " xchgq %1,%0 ; " -/// "# atomic_swap_long" -/// : "+r" (v), -/// "+m" (*p)); -/// return (v); -/// } -/// -/// -/// -/// -/// -/// extern char *_PathLocale; -/// -/// int __detect_path_locale(void); -/// int __wrap_setrunelocale(const char *); -/// -/// -/// enum { -/// XLC_COLLATE = 0, -/// XLC_CTYPE, -/// XLC_MONETARY, -/// XLC_NUMERIC, -/// XLC_TIME, -/// XLC_MESSAGES, -/// XLC_LAST -/// }; -/// -/// _Static_assert(XLC_LAST - XLC_COLLATE == 6, "XLC values should be contiguous"); -/// _Static_assert(XLC_COLLATE == -/// -/// 1 -/// -/// - 1, -/// "XLC_COLLATE doesn't match the LC_COLLATE value."); -/// _Static_assert(XLC_CTYPE == -/// -/// 2 -/// -/// - 1, -/// "XLC_CTYPE doesn't match the LC_CTYPE value."); -/// _Static_assert(XLC_MONETARY == -/// -/// 3 -/// -/// - 1, -/// "XLC_MONETARY doesn't match the LC_MONETARY value."); -/// _Static_assert(XLC_NUMERIC == -/// -/// 4 -/// -/// - 1, -/// "XLC_NUMERIC doesn't match the LC_NUMERIC value."); -/// _Static_assert(XLC_TIME == -/// -/// 5 -/// -/// - 1, -/// "XLC_TIME doesn't match the LC_TIME value."); -/// _Static_assert(XLC_MESSAGES == -/// -/// 6 -/// -/// - 1, -/// "XLC_MESSAGES doesn't match the LC_MESSAGES value."); -/// -/// struct xlocale_refcounted { -/// -/// long retain_count; -/// -/// void(*destructor)(void*); -/// }; -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_component { -/// struct xlocale_refcounted header; -/// -/// char locale[31 +1]; -/// -/// char version[12]; -/// }; -/// -/// -/// -/// -/// struct _xlocale { -/// struct xlocale_refcounted header; -/// -/// struct xlocale_component *components[XLC_LAST]; -/// -/// -/// int monetary_locale_changed; -/// -/// -/// int using_monetary_locale; -/// -/// -/// int numeric_locale_changed; -/// -/// -/// int using_numeric_locale; -/// -/// -/// int using_time_locale; -/// -/// -/// int using_messages_locale; -/// -/// struct lconv lconv; -/// -/// char *csym; -/// }; -/// -/// -/// -/// -/// __attribute__((unused)) static void* -/// xlocale_retain(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// atomic_add_long(&(obj->retain_count), 1); -/// return (val); -/// } -/// -/// -/// -/// -/// __attribute__((unused)) static void -/// xlocale_release(void *val) -/// { -/// struct xlocale_refcounted *obj = val; -/// long count; -/// -/// count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; -/// if (count < 0 && obj->destructor != -/// -/// ((void *)0) -/// -/// ) -/// obj->destructor(obj); -/// } -/// -/// -/// -/// -/// -/// extern void* __collate_load(const char*, locale_t); -/// extern void* __ctype_load(const char*, locale_t); -/// extern void* __messages_load(const char*, locale_t); -/// extern void* __monetary_load(const char*, locale_t); -/// extern void* __numeric_load(const char*, locale_t); -/// extern void* __time_load(const char*, locale_t); -/// -/// extern struct _xlocale __xlocale_global_locale; -/// extern struct _xlocale __xlocale_C_locale; -/// -/// -/// -/// -/// void __set_thread_rune_locale(locale_t loc); -/// -/// -/// -/// -/// extern int __has_thread_locale; -/// -/// -/// -/// -/// -/// extern _Thread_local locale_t __thread_locale; -/// -/// -/// -/// -/// -/// -/// -/// static inline locale_t __get_locale(void) -/// { -/// -/// if (!__has_thread_locale) { -/// return (&__xlocale_global_locale); -/// } -/// return (__thread_locale ? __thread_locale : &__xlocale_global_locale); -/// } -/// -/// -/// -/// -/// -/// static inline locale_t get_real_locale(locale_t locale) -/// { -/// switch ((intptr_t)locale) { -/// case 0: return (&__xlocale_C_locale); -/// case -1: return (&__xlocale_global_locale); -/// default: return (locale); -/// } -/// } -/// -/// -/// -/// -/// -/// -/// -/// -/// struct xlocale_ctype { -/// struct xlocale_component header; -/// _RuneLocale *runes; -/// size_t (*__mbrtowc)(wchar_t * -/// -/// restrict -/// -/// , const char * -/// -/// restrict -/// -/// , -/// size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int (*__mbsinit)(const mbstate_t *); -/// size_t (*__mbsnrtowcs)(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcrtomb)(char * -/// -/// restrict -/// -/// , wchar_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t (*__wcsnrtombs)(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// int __mb_cur_max; -/// int __mb_sb_limit; -/// -/// __mbstate_t mblen; -/// -/// __mbstate_t mbrlen; -/// -/// __mbstate_t mbrtoc16; -/// -/// __mbstate_t mbrtoc32; -/// -/// __mbstate_t mbrtowc; -/// -/// __mbstate_t mbsnrtowcs; -/// -/// __mbstate_t mbsrtowcs; -/// -/// __mbstate_t mbtowc; -/// -/// __mbstate_t c16rtomb; -/// -/// __mbstate_t c32rtomb; -/// -/// __mbstate_t wcrtomb; -/// -/// __mbstate_t wcsnrtombs; -/// -/// __mbstate_t wcsrtombs; -/// -/// __mbstate_t wctomb; -/// }; -/// -/// extern struct xlocale_ctype __xlocale_global_ctype; -/// -/// -/// -/// -/// int _none_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _UTF8_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB18030_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GB2312_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _GBK_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _BIG5_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// int _ascii_init(struct xlocale_ctype *, _RuneLocale *) -/// -/// __attribute__((__visibility__("hidden"))) -/// -/// ; -/// -/// typedef size_t (*mbrtowc_pfn_t)(wchar_t * -/// -/// restrict -/// -/// , -/// const char * -/// -/// restrict -/// -/// , size_t, mbstate_t * -/// -/// restrict -/// -/// ); -/// typedef size_t (*wcrtomb_pfn_t)(char * -/// -/// restrict -/// -/// , wchar_t, -/// mbstate_t * -/// -/// restrict -/// -/// ); -/// size_t __mbsnrtowcs_std(wchar_t * -/// -/// restrict -/// -/// , const char ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , mbrtowc_pfn_t); -/// size_t __wcsnrtombs_std(char * -/// -/// restrict -/// -/// , const wchar_t ** -/// -/// restrict -/// -/// , -/// size_t, size_t, mbstate_t * -/// -/// restrict -/// -/// , wcrtomb_pfn_t); -/// - -var X_DefaultRuneLocale = _RuneLocale{ - - __magic: *(*[8]int8)(unsafe.Pointer(ts)), - __encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)), - __invalid_rune: 0xFFFD, - - __runetype: [256]uint64{ - - 0: uint64(0x00000200), - - 1: uint64(0x00000200), - - 2: uint64(0x00000200), - - 3: uint64(0x00000200), - - 4: uint64(0x00000200), - - 5: uint64(0x00000200), - - 6: uint64(0x00000200), - - 7: uint64(0x00000200), - - 8: uint64(0x00000200), - - 9: uint64(0x00000200 | - - 0x00004000 | - - 0x00020000), - - 10: uint64(0x00000200 | - - 0x00004000), - - 11: uint64(0x00000200 | - - 0x00004000), - - 12: uint64(0x00000200 | - - 0x00004000), - - 13: uint64(0x00000200 | - - 0x00004000), - - 14: uint64(0x00000200), - - 15: uint64(0x00000200), - - 16: uint64(0x00000200), - - 17: uint64(0x00000200), - - 18: uint64(0x00000200), - - 19: uint64(0x00000200), - - 20: uint64(0x00000200), - - 21: uint64(0x00000200), - - 22: uint64(0x00000200), - - 23: uint64(0x00000200), - - 24: uint64(0x00000200), - - 25: uint64(0x00000200), - - 26: uint64(0x00000200), - - 27: uint64(0x00000200), - - 28: uint64(0x00000200), - - 29: uint64(0x00000200), - - 30: uint64(0x00000200), - - 31: uint64(0x00000200), - - 32: uint64(0x00004000 | - - 0x00020000 | - - 0x00040000), - - 33: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 34: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 35: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 36: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 37: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 38: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 39: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 40: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 41: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 42: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 43: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 44: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 45: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 46: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 47: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 48: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(0)), - - 49: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(1)), - - 50: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(2)), - - 51: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(3)), - - 52: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(4)), - - 53: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(5)), - - 54: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(6)), - - 55: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(7)), - - 56: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(8)), - - 57: uint64(0x00000400 | - - 0x00040000 | - - 0x00000800 | - - 0x00010000 | - - 0x00400000 | - - int64(9)), - - 58: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 59: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 60: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 61: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 62: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 63: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 64: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 65: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(10)), - - 66: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(11)), - - 67: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(12)), - - 68: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(13)), - - 69: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(14)), - - 70: uint64(0x00008000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(15)), - - 71: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 72: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 73: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 74: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 75: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 76: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 77: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 78: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 79: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 80: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 81: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 82: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 83: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 84: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 85: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 86: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 87: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 88: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 89: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 90: uint64(0x00008000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 91: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 92: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 93: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 94: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 95: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 96: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 97: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(10)), - - 98: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(11)), - - 99: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(12)), - - 100: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(13)), - - 101: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(14)), - - 102: uint64(0x00001000 | - - 0x00010000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100 | - - int64(15)), - - 103: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 104: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 105: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 106: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 107: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 108: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 109: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 110: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 111: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 112: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 113: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 114: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 115: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 116: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 117: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 118: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 119: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 120: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 121: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 122: uint64(0x00001000 | - - 0x00040000 | - - 0x00000800 | - - 0x00000100), - - 123: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 124: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 125: uint64(0x00002000 | - - 0x00040000 | - - 0x00000800), - - 126: uint64(0x00002000 | - - 0x00040000 | +// # 1 "lib/libc/gen/ctype_.c" +// # 1 "<built-in>" +// # 1 "<command-line>" +// # 1 "lib/libc/gen/ctype_.c" +// # 36 "lib/libc/gen/ctype_.c" +// # 1 "./include/ctype.h" 1 +// # 43 "./include/ctype.h" +// # 1 "./sys/sys/cdefs.h" 1 +// # 41 "./sys/sys/cdefs.h" +// # 1 "./machine/cdefs.h" 1 +// # 42 "./sys/sys/cdefs.h" 2 +// # 44 "./include/ctype.h" 2 +// # 57 "./include/ctype.h" +// typedef void *locale_t; +// +// +// +// +// +// extern const char *_ctype_; +// extern const short *_tolower_tab_; +// extern const short *_toupper_tab_; +// +// +// 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); +// +// +// +// int isblank(int); +// +// +// +// int isascii(int); +// int toascii(int); +// int _tolower(int); +// int _toupper(int); +// +// +// +// 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); +// +// +// +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int islower(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_tolower_tab_ + 1)[_c]); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_toupper_tab_ + 1)[_c]); +// } +// +// - 0x00000800), +// extern __inline __attribute__((__gnu_inline__)) +func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ + return Bool32(_c == ' ' || _c == '\t') +} - 127: uint64(0x00000200), - }, - __maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', - 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, - __mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, - 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - }, -} /* table.cpp.c:2243:19 */ - -var X_CurrentRuneLocale uintptr = 0 /* table.cpp.c:4092:19 */ - -/// _RuneLocale * -/// __runes_for_locale(locale_t locale, int *mb_sb_limit) -/// { -/// (locale = get_real_locale(locale)); -/// struct xlocale_ctype *c = ((struct xlocale_ctype*)(locale)->components[XLC_CTYPE]); -/// *mb_sb_limit = c->__mb_sb_limit; -/// return c->runes; -/// } +// extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) +// { +// return ((unsigned int)_c <= 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) +// { +// return (_c & 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) +// { +// return (_c - 'A' + 'a'); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) +// { +// return (_c - 'a' + 'A'); +// } +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalnum_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalnum(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalpha_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalpha(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isblank_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isblank(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return iscntrl(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isgraph_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isgraph(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// islower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return islower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isprint_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isprint(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// ispunct_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return ispunct(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isspace_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isspace(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isupper(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isxdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// tolower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return tolower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// toupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return toupper(_c); +// } +// +// +// +// +// +// # 37 "lib/libc/gen/ctype_.c" 2 +// # 1 "./lib/libc/include/ctype_private.h" 1 +// +// +// +// +// +// # 5 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility push(hidden) +// # 5 "./lib/libc/include/ctype_private.h" +// +// extern const char _C_ctype_[]; +// extern const short _C_toupper_[]; +// extern const short _C_tolower_[]; +// +// # 9 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility pop +// # 9 "./lib/libc/include/ctype_private.h" +// +// # 38 "lib/libc/gen/ctype_.c" 2 + +var X_C_ctype_ = [257]int8{ + int8(0), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), + int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), + + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), +} /* ctype_.c:282:12 */ + +var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) @@ -3451,39 +809,39 @@ type ssize_t = int64 /* alltypes.h:65:15 */ type off_t = int64 /* alltypes.h:162:16 */ type _IO_FILE = struct { - flags uint32 - _ [4]byte - rpos uintptr - rend uintptr - close uintptr - wend uintptr - wpos uintptr - mustbezero_1 uintptr - wbase uintptr - read uintptr - write uintptr - seek uintptr - buf uintptr - buf_size size_t - prev uintptr - next uintptr - fd int32 - pipe_pid int32 - lockcount int64 - mode int32 - lock int32 - lbf int32 - _ [4]byte - cookie uintptr - off off_t - getln_buf uintptr - mustbezero_2 uintptr - shend uintptr - shlim off_t - shcnt off_t - prev_locked uintptr - next_locked uintptr - locale uintptr + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr } /* alltypes.h:320:9 */ type FILE = _IO_FILE /* alltypes.h:320:25 */ @@ -3491,8 +849,8 @@ type FILE = _IO_FILE /* alltypes.h:320:25 */ type va_list = uintptr /* alltypes.h:326:27 */ type _G_fpos64_t = struct { - _ [0]uint64 - __opaque [16]int8 + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ @@ -3505,7 +863,7 @@ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) - // var __u struct {__f float32;} at bp, 4 + // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) @@ -3515,7 +873,7 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) - // var __u struct {__f float64;} at bp, 8 + // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) @@ -3530,58 +888,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var neg int32 = 0 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { @@ -3620,8 +978,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3630,13 +988,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, if c == '.' { gotrad = 1 for c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3647,8 +1005,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3689,8 +1047,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -3701,8 +1059,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, } lrp = lrp + e10 } else if c >= 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -3944,16 +1302,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 var c int32 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() // Skip leading zeros for ; c == '0'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -3963,8 +1321,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 if c == '.' { gotrad = 1 c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3978,8 +1336,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 goto __2 __2: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -3990,8 +1348,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { @@ -4020,18 +1378,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 } } if !(gotdig != 0) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if gotrad != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4051,8 +1409,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = scanexp(tls, f, pok) if e2 == -0x7fffffffffffffff-int64(1) { if pok != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { @@ -4062,8 +1420,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32 e2 = int64(0) } } else { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4143,8 +1501,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } for __isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0 { @@ -4153,18 +1511,18 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '+' || c == '-' { sign = sign - 2*Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() } - for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ { + for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { if i < uint64(7) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4172,14 +1530,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { if i != uint64(8) { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if pok != 0 { for ; i > uint64(3); i-- { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } @@ -4188,11 +1546,11 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(float32(sign) * X__builtin_inff(tls)) } if !(i != 0) { - for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ { + for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { if i < uint64(2) { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4201,21 +1559,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float } if i == uint64(3) { if func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() != '(' { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } for i = uint64(1); ; i++ { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4223,10 +1581,10 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float continue } if c == ')' { - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { @@ -4235,19 +1593,19 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float return float64(0) } for PostDecUint64(&i, 1) != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } - return float64(X__builtin_nanf(tls, ts+54)) + return float64(X__builtin_nanf(tls, ts+13)) } if i != 0 { - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 @@ -4257,16 +1615,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float if c == '0' { c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c|32 == 'x' { return hexfloat(tls, f, bits, emin, sign, pok) } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } c = '0' @@ -4313,8 +1671,8 @@ __1: ; __2: if !(__isspace(tls, AssignInt32(&c, func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }())) != 0) { @@ -4328,8 +1686,8 @@ __3: } neg = -Bool32(c == '-') c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4339,8 +1697,8 @@ __4: goto __5 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4348,23 +1706,23 @@ __4: goto __7 } c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { goto __9 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(pok != 0) { goto __10 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } goto __11 @@ -4397,8 +1755,8 @@ __13: if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { goto __14 } - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } X__shlim(tls, f, int64(0)) @@ -4420,8 +1778,8 @@ __17: goto __18 __18: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4438,8 +1796,8 @@ __20: goto __21 __21: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4458,7 +1816,7 @@ __15: if !!(base&(base-uint32(1)) != 0) { goto __24 } - bs = int32(*(*int8)(unsafe.Pointer(ts + 55 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + bs = int32(*(*int8)(unsafe.Pointer(ts + 14 + uintptr(uint32(0x17)*base>>5&uint32(7))))) x = uint32(0) __26: if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { @@ -4468,8 +1826,8 @@ __26: goto __27 __27: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4486,8 +1844,8 @@ __29: goto __30 __30: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4506,8 +1864,8 @@ __32: goto __33 __33: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4524,8 +1882,8 @@ __35: goto __36 __36: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4547,8 +1905,8 @@ __39: goto __40 __40: c = func() int32 { - if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { - return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() @@ -4567,8 +1925,8 @@ __42: __38: ; done: - if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { - (*FILE)(unsafe.Pointer(f)).rpos-- + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if !(y >= lim) { @@ -4601,34 +1959,34 @@ __43: // the actual count. func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ - (*FILE)(unsafe.Pointer(f)).shlim = lim - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1 + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 1 // If lim is nonzero, rend must be a valid pointer. - if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > lim { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } } func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ var c int32 - var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos - (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) return -1 } cnt++ - if (*FILE)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > (*FILE)(unsafe.Pointer(f)).shlim-cnt { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt) + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) } else { - (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend } - (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt - if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf { - *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) } return c } @@ -4655,7 +2013,7 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x return r }() @@ -4684,7 +2042,7 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ bp := tls.Alloc(8) defer tls.Free(8) - // var u struct {f float64;} at bp, 8 + // var u struct {Ff float64;} at bp, 8 var y double_t = x @@ -4721,26 +2079,26 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ } type div_t = struct { - quot int32 - rem int32 + Fquot int32 + Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { - quot int64 - rem int64 + Fquot int64 + Frem int64 } /* stdlib.h:64:41 */ type max_align_t = struct { - __ll int64 - __ld float64 + F__ll int64 + F__ld float64 } /* alltypes.h:41:54 */ type imaxdiv_t = struct { - quot intmax_t - rem intmax_t + Fquot intmax_t + Frem intmax_t } /* inttypes.h:14:40 */ type pid_t = int32 /* alltypes.h:235:13 */ @@ -4750,8 +2108,8 @@ type uid_t = uint32 /* alltypes.h:245:18 */ type gid_t = uint32 /* alltypes.h:250:18 */ type iovec = struct { - iov_base uintptr - iov_len size_t + Fiov_base uintptr + Fiov_len size_t } /* alltypes.h:355:1 */ type socklen_t = uint32 /* alltypes.h:361:18 */ @@ -4759,311 +2117,311 @@ type socklen_t = uint32 /* alltypes.h:361:18 */ type sa_family_t = uint16 /* alltypes.h:366:24 */ type msghdr = struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte } /* socket.h:22:1 */ type cmsghdr = struct { - cmsg_len socklen_t - __pad1 int32 - cmsg_level int32 - cmsg_type int32 + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 } /* socket.h:44:1 */ type linger = struct { - l_onoff int32 - l_linger int32 + Fl_onoff int32 + Fl_linger int32 } /* socket.h:74:1 */ type sockaddr = struct { - sa_family sa_family_t - sa_data [14]int8 + Fsa_family sa_family_t + Fsa_data [14]int8 } /* socket.h:367:1 */ type sockaddr_storage = struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } /* socket.h:372:1 */ -type in_port_t = uint16_t /* in.h:12:18 */ -type in_addr_t = uint32_t /* in.h:13:18 */ -type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ type sockaddr_in = struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } /* in.h:16:1 */ type in6_addr = struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } /* in.h:23:1 */ type sockaddr_in6 = struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } /* in.h:34:1 */ type ipv6_mreq = struct { - ipv6mr_multiaddr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipv6mr_interface uint32 + Fipv6mr_interface uint32 } /* in.h:42:1 */ type ip_opts = struct { - ip_dst struct{ s_addr in_addr_t } - ip_opts [40]int8 + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 } /* in.h:229:1 */ type ip_mreq = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } } /* in.h:247:1 */ type ip_mreqn = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_address struct{ s_addr in_addr_t } - imr_ifindex int32 + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 } /* in.h:252:1 */ type ip_mreq_source = struct { - imr_multiaddr struct{ s_addr in_addr_t } - imr_interface struct{ s_addr in_addr_t } - imr_sourceaddr struct{ s_addr in_addr_t } + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } } /* in.h:258:1 */ type ip_msfilter = struct { - imsf_multiaddr struct{ s_addr in_addr_t } - imsf_interface struct{ s_addr in_addr_t } - imsf_fmode uint32_t - imsf_numsrc uint32_t - imsf_slist [1]struct{ s_addr in_addr_t } + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } } /* in.h:264:1 */ type group_req = struct { - gr_interface uint32_t - _ [4]byte - gr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:275:1 */ type group_source_req = struct { - gsr_interface uint32_t - _ [4]byte - gsr_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gsr_source struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:280:1 */ type group_filter = struct { - gf_interface uint32_t - _ [4]byte - gf_group struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 - } - gf_fmode uint32_t - gf_numsrc uint32_t - gf_slist [1]struct { - ss_family sa_family_t - __ss_padding [118]int8 - __ss_align uint64 + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 } } /* in.h:286:1 */ type in_pktinfo = struct { - ipi_ifindex int32 - ipi_spec_dst struct{ s_addr in_addr_t } - ipi_addr struct{ s_addr in_addr_t } + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } } /* in.h:297:1 */ type in6_pktinfo = struct { - ipi6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - ipi6_ifindex uint32 + Fipi6_ifindex uint32 } /* in.h:303:1 */ type ip6_mtuinfo = struct { - ip6m_addr struct { - sin6_family sa_family_t - sin6_port in_port_t - sin6_flowinfo uint32_t - sin6_addr struct { - __in6_union struct { - _ [0]uint32 - __s6_addr [16]uint8_t + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t } } - sin6_scope_id uint32_t + Fsin6_scope_id uint32_t } - ip6m_mtu uint32_t + Fip6m_mtu uint32_t } /* in.h:308:1 */ type addrinfo = struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr } /* netdb.h:16:1 */ // Legacy functions follow (marked OBsolete in SUS) type netent = struct { - n_name uintptr - n_aliases uintptr - n_addrtype int32 - n_net uint32_t + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t } /* netdb.h:62:1 */ type hostent = struct { - h_name uintptr - h_aliases uintptr - h_addrtype int32 - h_length int32 - h_addr_list uintptr + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr } /* netdb.h:69:1 */ type servent = struct { - s_name uintptr - s_aliases uintptr - s_port int32 - _ [4]byte - s_proto uintptr + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr } /* netdb.h:78:1 */ type protoent = struct { - p_name uintptr - p_aliases uintptr - p_proto int32 - _ [4]byte + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte } /* netdb.h:85:1 */ type aibuf = struct { - ai struct { - ai_flags int32 - ai_family int32 - ai_socktype int32 - ai_protocol int32 - ai_addrlen socklen_t - _ [4]byte - ai_addr uintptr - ai_canonname uintptr - ai_next uintptr - } - sa struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - _ [12]byte - } - lock [1]int32 - slot int16 - ref int16 - _ [4]byte + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [4]byte } /* lookup.h:10:1 */ type sa = struct { - sin struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t } - _ [12]byte + F__ccgo_pad1 [12]byte } /* lookup.h:10:1 */ type address = struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 } /* lookup.h:20:1 */ type service = struct { - port uint16_t - proto uint8 - socktype uint8 + Fport uint16_t + Fproto uint8 + Fsocktype uint8 } /* lookup.h:27:1 */ type resolvconf = struct { - ns [3]struct { - family int32 - scopeid uint32 - addr [16]uint8_t - sortkey int32 - } - nns uint32 - attempts uint32 - ndots uint32 - timeout uint32 + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 } /* lookup.h:34:1 */ func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ var cnt size_t cnt = uint64(1) __1: - if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { goto __3 } goto __2 __2: cnt++ - p = (*addrinfo)(unsafe.Pointer(p)).ai_next + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next goto __1 goto __3 __3: ; var b uintptr = p - uintptr(uint64(uintptr(0))) - b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) //TODO LOCK(b->lock); if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { Xfree(tls, b) @@ -5076,8 +2434,8 @@ type time_t = int64 /* alltypes.h:85:16 */ type clockid_t = int32 /* alltypes.h:214:13 */ type timespec = struct { - tv_sec time_t - tv_nsec int64 + Ftv_sec time_t + Ftv_nsec int64 } /* alltypes.h:229:1 */ type pthread_t = uintptr /* alltypes.h:273:26 */ @@ -5088,62 +2446,62 @@ type pthread_key_t = uint32 /* alltypes.h:284:18 */ type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ -type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */ -type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */ -type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */ -type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */ -type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */ type sigset_t = __sigset_t /* alltypes.h:349:71 */ type pthread_attr_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:372:147 */ type pthread_mutex_t = struct { - __u struct { - _ [0]uint64 - __i [10]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 } } /* alltypes.h:377:157 */ type pthread_cond_t = struct { - __u struct { - _ [0]uint64 - __i [12]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 } } /* alltypes.h:387:112 */ type pthread_rwlock_t = struct { - __u struct { - _ [0]uint64 - __i [14]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 } } /* alltypes.h:397:139 */ type pthread_barrier_t = struct { - __u struct { - _ [0]uint64 - __i [8]int32 + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 } } /* alltypes.h:402:137 */ type sched_param = struct { - sched_priority int32 - __reserved1 int32 - __reserved2 [2]struct { - __reserved1 time_t - __reserved2 int64 - } - __reserved3 int32 - _ [4]byte + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:209:14 */ @@ -5151,35 +2509,35 @@ type timer_t = uintptr /* alltypes.h:209:14 */ type clock_t = int64 /* alltypes.h:219:14 */ type tm = struct { - tm_sec int32 - tm_min int32 - tm_hour int32 - tm_mday int32 - tm_mon int32 - tm_year int32 - tm_wday int32 - tm_yday int32 - tm_isdst int32 - _ [4]byte - tm_gmtoff int64 - tm_zone uintptr + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr } /* time.h:38:1 */ type itimerspec = struct { - it_interval struct { - tv_sec time_t - tv_nsec int64 + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 } - it_value struct { - tv_sec time_t - tv_nsec int64 + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 } } /* time.h:80:1 */ type __ptcb = struct { - __f uintptr - __x uintptr - __next uintptr + F__f uintptr + F__x uintptr + F__next uintptr } /* pthread.h:206:1 */ type useconds_t = uint32 /* alltypes.h:260:18 */ @@ -5213,10 +2571,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt } if hint != 0 { - family = (*addrinfo)(unsafe.Pointer(hint)).ai_family - flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags - proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol - socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 if flags&mask != flags { @@ -5312,7 +2670,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 } { - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) //TODO out[k].ai = (struct addrinfo){ //TODO .ai_family = addrs[i].family, //TODO .ai_socktype = ports[j].socktype, @@ -5322,30 +2680,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt //TODO : sizeof(struct sockaddr_in6), //TODO .ai_addr = (void *)&out[k].sa, //TODO .ai_canonname = outcanon }; - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 { - if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { return uint32(unsafe.Sizeof(sockaddr_in{})) } return uint32(unsafe.Sizeof(sockaddr_in6{})) }() - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48 - (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon if k != 0 { - (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 } - switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { case 2: - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2) - (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) break case 10: - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) - (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) break } @@ -5359,33 +2717,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt goto __3 __3: } - (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) *(*uintptr)(unsafe.Pointer(res)) = out return 0 } type ucred = struct { - pid pid_t - uid uid_t - gid gid_t + Fpid pid_t + Fuid uid_t + Fgid gid_t } /* socket.h:57:1 */ type mmsghdr = struct { - msg_hdr struct { - msg_name uintptr - msg_namelen socklen_t - _ [4]byte - msg_iov uintptr - msg_iovlen int32 - __pad1 int32 - msg_control uintptr - msg_controllen socklen_t - __pad2 int32 - msg_flags int32 - _ [4]byte - } - msg_len uint32 - _ [4]byte + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte } /* socket.h:63:1 */ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ @@ -5483,8 +2841,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } } - (*hostent)(unsafe.Pointer(h)).h_addrtype = af - (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { if af == 10 { return 16 } @@ -5495,7 +2853,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) - need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) need = need + (Xstrlen(tls, name) + uint64(1)) need = need + (Xstrlen(tls, bp+1344) + uint64(1)) need = need + align @@ -5505,117 +2863,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, } buf += uintptr(align) - (*hostent)(unsafe.Pointer(h)).h_aliases = buf + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) - (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) for i = 0; i < cnt; i++ { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf - buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) - Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length)) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0) - (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) - Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) - buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1)) + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1)) - if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf - Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name) - buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1)) + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1)) } else { - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(res)) = h return 0 } type if_nameindex = struct { - if_index uint32 - _ [4]byte - if_name uintptr + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr } /* if.h:12:1 */ type ifaddr = struct { - ifa_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - ifa_ifu struct { - ifu_broadaddr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } } - ifa_ifp uintptr - ifa_next uintptr + Fifa_ifp uintptr + Fifa_next uintptr } /* if.h:51:1 */ type ifmap = struct { - mem_start uint64 - mem_end uint64 - base_addr uint16 - irq uint8 - dma uint8 - port uint8 - _ [3]byte + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte } /* if.h:64:1 */ type ifreq = struct { - ifr_ifrn struct{ ifrn_name [16]int8 } - ifr_ifru struct { - _ [0]uint64 - ifru_addr struct { - sa_family sa_family_t - sa_data [14]int8 + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 } - _ [8]byte + F__ccgo_pad2 [8]byte } } /* if.h:76:1 */ type ifconf = struct { - ifc_len int32 - _ [4]byte - ifc_ifcu struct{ ifcu_buf uintptr } + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_buf uintptr } } /* if.h:116:1 */ type ns_sect = uint32 /* nameser.h:37:3 */ type __ns_msg = struct { - _msg uintptr - _eom uintptr - _id uint16_t - _flags uint16_t - _counts [4]uint16_t - _ [4]byte - _sections [4]uintptr - _sect ns_sect - _rrnum int32 - _msg_ptr uintptr + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr } /* nameser.h:39:9 */ type ns_msg = __ns_msg /* nameser.h:46:3 */ type _ns_flagdata = struct { - mask int32 - shift int32 + Fmask int32 + Fshift int32 } /* nameser.h:48:1 */ type __ns_rr = struct { - name [1025]int8 - _ [1]byte - __type uint16_t - rr_class uint16_t - _ [2]byte - ttl uint32_t - rdlength uint16_t - _ [2]byte - rdata uintptr + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr } /* nameser.h:59:9 */ type ns_rr = __ns_rr /* nameser.h:66:3 */ @@ -5629,24 +2987,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */ type ns_update_operation = uint32 /* nameser.h:121:3 */ type ns_tsig_key1 = struct { - name [1025]int8 - alg [1025]int8 - _ [6]byte - data uintptr - len int32 - _ [4]byte + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:123:1 */ type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ type ns_tcp_tsig_state1 = struct { - counter int32 - _ [4]byte - key uintptr - ctx uintptr - sig [512]uint8 - siglen int32 - _ [4]byte + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte } /* nameser.h:130:1 */ type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ @@ -5660,45 +3018,45 @@ type ns_key_types = uint32 /* nameser.h:226:3 */ type ns_cert_types = uint32 /* nameser.h:234:3 */ type HEADER = struct { - _ [0]uint32 - id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ - qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ - nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ } /* nameser.h:353:3 */ // unused; purely for broken apps type __res_state = struct { - retrans int32 - retry int32 - options uint64 - nscount int32 - nsaddr_list [3]struct { - sin_family sa_family_t - sin_port in_port_t - sin_addr struct{ s_addr in_addr_t } - sin_zero [8]uint8_t - } - id uint16 - _ [2]byte - dnsrch [7]uintptr - defdname [256]int8 - pfcode uint64 - ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ - _ [4]byte - sort_list [10]struct { - addr struct{ s_addr in_addr_t } - mask uint32_t - } - qhook uintptr - rhook uintptr - res_h_errno int32 - _vcsock int32 - _flags uint32 - _ [4]byte - _u struct { - _ [0]uint64 - pad [52]int8 - _ [4]byte + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte } } /* resolv.h:26:9 */ @@ -5706,10 +3064,10 @@ type __res_state = struct { type res_state = uintptr /* resolv.h:62:3 */ type res_sym = struct { - number int32 - _ [4]byte - name uintptr - humanname uintptr + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr } /* resolv.h:70:1 */ func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ @@ -5726,7 +3084,7 @@ func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ bp := tls.Alloc(32) defer tls.Free(32) - Xsprintf(tls, s, ts+64, + Xsprintf(tls, s, ts+23, VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) } @@ -5738,10 +3096,10 @@ func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') } - Xstrcpy(tls, s, ts+89) + Xstrcpy(tls, s, ts+48) } -var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 98)) /* getnameinfo.c:36:20 */ +var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* getnameinfo.c:36:20 */ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */ bp := tls.Alloc(556) @@ -5758,13 +3116,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 // var iplit address at bp+528, 28 //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); - var f uintptr = Xfopen(tls, ts+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { return } if family == 2 { Xmemcpy(tls, bp+uintptr(12), a, uint64(4)) - Xmemcpy(tls, bp, ts+129, uint64(12)) + Xmemcpy(tls, bp, ts+88, uint64(12)) a = bp /* &atmp[0] */ } for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { @@ -5780,13 +3138,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3 continue } - if (*address)(unsafe.Pointer(bp+528)).family == 2 { + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) - Xmemcpy(tls, bp+528+8, ts+129, uint64(12)) - (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + Xmemcpy(tls, bp+528+8, ts+88, uint64(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) } - if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { continue } @@ -5900,21 +3258,21 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr switch af { case 2: - if socklen_t(Xsnprintf(tls, s, uint64(l), ts+142, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + if socklen_t(Xsnprintf(tls, s, uint64(l), ts+101, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { return s } break case 10: - if Xmemcmp(tls, a, ts+129, uint64(12)) != 0 { + if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 { Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), - ts+154, + ts+113, VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), 256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) } else { Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), - ts+178, + ts+137, VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), @@ -5927,7 +3285,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { continue } - j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+208)) + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167)) if j > max { best = i max = j @@ -6071,8 +3429,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 2 - (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) return 1 } // var tmp [64]int8 at bp+4, 64 @@ -6095,7 +3453,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 } Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) - (*address)(unsafe.Pointer(buf)).family = 10 + (*address)(unsafe.Pointer(buf)).Ffamily = 10 if p != 0 { if func() int32 { if 0 != 0 { @@ -6119,20 +3477,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3 return -2 } } - (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) return 1 } type mode_t = uint32 /* alltypes.h:152:18 */ type flock = struct { - l_type int16 - l_whence int16 - _ [4]byte - l_start off_t - l_len off_t - l_pid pid_t - _ [4]byte + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte } /* fcntl.h:24:1 */ func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ @@ -6158,14 +3516,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int //TODO buf[cnt++] = (struct address){ .family = AF_INET }; if family != 10 { var x = Xzero_struct_address - x.family = 2 + x.Ffamily = 2 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } //TODO if (family != AF_INET) //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; if family != 2 { var x = Xzero_struct_address - x.family = 10 + x.Ffamily = 10 *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x } } else { @@ -6196,7 +3554,7 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); var _f FILE _ = _f - var f uintptr = Xfopen(tls, ts+115, ts+126) + var f uintptr = Xfopen(tls, ts+74, ts+85) if !(f != 0) { switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { case 2: @@ -6258,10 +3616,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family } type dpc_ctx = struct { - addrs uintptr - canon uintptr - cnt int32 - _ [4]byte + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [4]byte } /* lookup_name.c:112:1 */ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ @@ -6311,31 +3669,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa } type policy = struct { - addr [16]uint8 - len uint8 - mask uint8 - prec uint8 - label uint8 + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 } /* lookup_name.c:237:14 */ var defpolicy = [6]policy{ - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)}, - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, // Last rule must match all addresses to stop loop. - {addr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), prec: uint8(40), label: uint8(1)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: uint8(1)}, } /* lookup_name.c:241:3 */ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ var i int32 for i = 0; ; i++ { - if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 { continue } - if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != - int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { continue } return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 @@ -6344,7 +3702,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ } func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ - return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) } func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ @@ -6377,7 +3735,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12 func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ var a uintptr = _a var b uintptr = _b - return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey } func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ @@ -6457,7 +3815,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i return cnt } for i = 0; i < cnt; i++ { - if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { break } } @@ -6474,12 +3832,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i // excessive runtime and code size cost and dubious benefit. // So far the label/precedence table cannot be customized. for i = 0; i < cnt; i++ { - var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily var key int32 = 0 *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} - *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} - *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} var sa1 uintptr var da uintptr // var salen socklen_t at bp+88, 4 @@ -6493,10 +3851,10 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) } else { Xmemcpy(tls, bp+28+8, - ts+129, uint64(12)) + ts+88, uint64(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) Xmemcpy(tls, bp+8, - ts+129, uint64(12)) + ts+88, uint64(12)) Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint64(4)) da = bp + 56 /* &da4 */ @@ -6506,8 +3864,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i } var dpolicy uintptr = policyof(tls, bp+8) var dscope int32 = scopeof(tls, bp+8) - var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) - var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) var prefixlen int32 = 0 var fd int32 = Xsocket(tls, family, 2|02000000, 17) if fd >= 0 { @@ -6535,7 +3893,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i key = key | (15-dscope)<<16 key = key | prefixlen<<8 key = key | (48-i)<<0 - (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key } Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { f func(*TLS, uintptr, uintptr) int32 @@ -6555,7 +3913,7 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i var cnt int32 = 0 var p uintptr _ = p - *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 54 /* "" */ + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ var port uint64 = uint64(0) switch socktype { @@ -6587,9 +3945,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i if name != 0 { return -8 } - (*service)(unsafe.Pointer(buf)).port = uint16_t(0) - (*service)(unsafe.Pointer(buf)).proto = uint8(proto) - (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) return 1 } @@ -6604,14 +3962,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i return -8 } if proto != 17 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) } if proto != 6 { - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) - (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) - (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) } return cnt } @@ -6672,19 +4030,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i } func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ - *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 - if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0)) + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0)) } - (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { *(*uint32)(unsafe.Pointer(f)) |= uint32(32) return -1 } - (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) - if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { return -1 } return 0 @@ -6706,7 +4064,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ if !(X__toread(tls, f) != 0) && (*struct { f func(*TLS, uintptr, uintptr, size_t) size_t - })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) { + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { return int32(*(*uint8)(unsafe.Pointer(bp))) } return -1 @@ -6738,11 +4096,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6: // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y float64 = X__floatscan(tls, bp, prec, 1) - var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1 + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 if p != 0 { *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { if cnt != 0 { @@ -6772,12 +4130,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* // var f FILE at bp, 232 - (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) - (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) X__shlim(tls, bp, int64(0)) var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) if p != 0 { - var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1) + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) } return y @@ -6848,8 +4206,8 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ } func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.cpp.c:4092:41: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_)) // ctype_.c:319:23: } -var ts1 = "RuneMagi\x00NONE\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/libc/musl_openbsd_arm64.go b/vendor/modernc.org/libc/musl_openbsd_arm64.go new file mode 100644 index 00000000..ba015fc4 --- /dev/null +++ b/vendor/modernc.org/libc/musl_openbsd_arm64.go @@ -0,0 +1,4213 @@ +// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. + +package libc + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +// musl as a whole is licensed under the following standard MIT license: +// +// ---------------------------------------------------------------------- +// Copyright © 2005-2020 Rich Felker, et al. +// +// 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. +// ---------------------------------------------------------------------- +// +// Authors/contributors include: +// +// A. Wilcox +// Ada Worcester +// Alex Dowad +// Alex Suykov +// Alexander Monakov +// Andre McCurdy +// Andrew Kelley +// Anthony G. Basile +// Aric Belsito +// Arvid Picciani +// Bartosz Brachaczek +// Benjamin Peterson +// Bobby Bingham +// Boris Brezillon +// Brent Cook +// Chris Spiegel +// Clément Vasseur +// Daniel Micay +// Daniel Sabogal +// Daurnimator +// David Carlier +// David Edelsohn +// Denys Vlasenko +// Dmitry Ivanov +// Dmitry V. Levin +// Drew DeVault +// Emil Renner Berthing +// Fangrui Song +// Felix Fietkau +// Felix Janda +// Gianluca Anzolin +// Hauke Mehrtens +// He X +// Hiltjo Posthuma +// Isaac Dunham +// Jaydeep Patil +// Jens Gustedt +// Jeremy Huntwork +// Jo-Philipp Wich +// Joakim Sindholt +// John Spencer +// Julien Ramseier +// Justin Cormack +// Kaarle Ritvanen +// Khem Raj +// Kylie McClain +// Leah Neukirchen +// Luca Barbato +// Luka Perkov +// M Farkas-Dyck (Strake) +// Mahesh Bodapati +// Markus Wichmann +// Masanori Ogino +// Michael Clark +// Michael Forney +// Mikhail Kremnyov +// Natanael Copa +// Nicholas J. Kain +// orc +// Pascal Cuoq +// Patrick Oppenlander +// Petr Hosek +// Petr Skocik +// Pierre Carrier +// Reini Urban +// Rich Felker +// Richard Pennington +// Ryan Fairfax +// Samuel Holland +// Segev Finer +// Shiz +// sin +// Solar Designer +// Stefan Kristiansson +// Stefan O'Rear +// Szabolcs Nagy +// Timo Teräs +// Trutz Behn +// Valentin Ochs +// Will Dietz +// William Haddon +// William Pitcock +// +// Portions of this software are derived from third-party works licensed +// under terms compatible with the above MIT license: +// +// The TRE regular expression implementation (src/regex/reg* and +// src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +// under a 2-clause BSD license (license text in the source files). The +// included version has been heavily modified by Rich Felker in 2012, in +// the interests of size, simplicity, and namespace cleanliness. +// +// Much of the math library code (src/math/* and src/complex/*) is +// Copyright © 1993,2004 Sun Microsystems or +// Copyright © 2003-2011 David Schultz or +// Copyright © 2003-2009 Steven G. Kargl or +// Copyright © 2003-2009 Bruce D. Evans or +// Copyright © 2008 Stephen L. Moshier or +// Copyright © 2017-2018 Arm Limited +// and labelled as such in comments in the individual source files. All +// have been licensed under extremely permissive terms. +// +// The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +// The Android Open Source Project and is licensed under a two-clause BSD +// license. It was taken from Bionic libc, used on Android. +// +// The AArch64 memcpy and memset code (src/string/aarch64/*) are +// Copyright © 1999-2019, Arm Limited. +// +// The implementation of DES for crypt (src/crypt/crypt_des.c) is +// Copyright © 1994 David Burren. It is licensed under a BSD license. +// +// The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +// originally written by Solar Designer and placed into the public +// domain. The code also comes with a fallback permissive license for use +// in jurisdictions that may not recognize the public domain. +// +// The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +// Valentin Ochs and is licensed under an MIT-style license. +// +// The x86_64 port was written by Nicholas J. Kain and is licensed under +// the standard MIT terms. +// +// The mips and microblaze ports were originally written by Richard +// Pennington for use in the ellcc project. The original code was adapted +// by Rich Felker for build system and code conventions during upstream +// integration. It is licensed under the standard MIT terms. +// +// The mips64 port was contributed by Imagination Technologies and is +// licensed under the standard MIT terms. +// +// The powerpc port was also originally written by Richard Pennington, +// and later supplemented and integrated by John Spencer. It is licensed +// under the standard MIT terms. +// +// All other files which have no copyright comments are original works +// produced specifically for use as part of this library, written either +// by Rich Felker, the main author of the library, or by one or more +// contibutors listed above. Details on authorship of individual files +// can be found in the git version control history of the project. The +// omission of copyright and license comments in each file is in the +// interest of source tree size. +// +// In addition, permission is hereby granted for all public header files +// (include/* and arch/*/bits/*) and crt files intended to be linked into +// applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +// the copyright notice and permission notice otherwise required by the +// license, and to use these files without any requirement of +// attribution. These files include substantial contributions from: +// +// Bobby Bingham +// John Spencer +// Nicholas J. Kain +// Rich Felker +// Richard Pennington +// Stefan Kristiansson +// Szabolcs Nagy +// +// all of whom have explicitly granted such permission. +// +// This file previously contained text expressing a belief that most of +// the files covered by the above exception were sufficiently trivial not +// to be subject to copyright, resulting in confusion over whether it +// negated the permissions granted in the license. In the spirit of +// permissive licensing, and of not having licensing issues being an +// obstacle to adoption, that text has been removed. +const ( /* copyright.c:194:1: */ + __musl__copyright__ = 0 +) + +const ( /* nameser.h:117:1: */ + ns_uop_delete = 0 + ns_uop_add = 1 + ns_uop_max = 2 +) + +const ( /* nameser.h:147:1: */ + ns_t_invalid = 0 + ns_t_a = 1 + ns_t_ns = 2 + ns_t_md = 3 + ns_t_mf = 4 + ns_t_cname = 5 + ns_t_soa = 6 + ns_t_mb = 7 + ns_t_mg = 8 + ns_t_mr = 9 + ns_t_null = 10 + ns_t_wks = 11 + ns_t_ptr = 12 + ns_t_hinfo = 13 + ns_t_minfo = 14 + ns_t_mx = 15 + ns_t_txt = 16 + ns_t_rp = 17 + ns_t_afsdb = 18 + ns_t_x25 = 19 + ns_t_isdn = 20 + ns_t_rt = 21 + ns_t_nsap = 22 + ns_t_nsap_ptr = 23 + ns_t_sig = 24 + ns_t_key = 25 + ns_t_px = 26 + ns_t_gpos = 27 + ns_t_aaaa = 28 + ns_t_loc = 29 + ns_t_nxt = 30 + ns_t_eid = 31 + ns_t_nimloc = 32 + ns_t_srv = 33 + ns_t_atma = 34 + ns_t_naptr = 35 + ns_t_kx = 36 + ns_t_cert = 37 + ns_t_a6 = 38 + ns_t_dname = 39 + ns_t_sink = 40 + ns_t_opt = 41 + ns_t_apl = 42 + ns_t_tkey = 249 + ns_t_tsig = 250 + ns_t_ixfr = 251 + ns_t_axfr = 252 + ns_t_mailb = 253 + ns_t_maila = 254 + ns_t_any = 255 + ns_t_zxfr = 256 + ns_t_max = 65536 +) + +const ( /* nameser.h:210:1: */ + ns_c_invalid = 0 + ns_c_in = 1 + ns_c_2 = 2 + ns_c_chaos = 3 + ns_c_hs = 4 + ns_c_none = 254 + ns_c_any = 255 + ns_c_max = 65536 +) + +const ( /* nameser.h:221:1: */ + ns_kt_rsa = 1 + ns_kt_dh = 2 + ns_kt_dsa = 3 + ns_kt_private = 254 +) + +const ( /* nameser.h:228:1: */ + cert_t_pkix = 1 + cert_t_spki = 2 + cert_t_pgp = 3 + cert_t_url = 253 + cert_t_oid = 254 +) + +const ( /* nameser.h:28:1: */ + ns_s_qd = 0 + ns_s_zn = 0 + ns_s_an = 1 + ns_s_pr = 1 + ns_s_ns = 2 + ns_s_ud = 2 + ns_s_ar = 3 + ns_s_max = 4 +) + +const ( /* nameser.h:75:1: */ + ns_f_qr = 0 + ns_f_opcode = 1 + ns_f_aa = 2 + ns_f_tc = 3 + ns_f_rd = 4 + ns_f_ra = 5 + ns_f_z = 6 + ns_f_ad = 7 + ns_f_cd = 8 + ns_f_rcode = 9 + ns_f_max = 10 +) + +const ( /* nameser.h:89:1: */ + ns_o_query = 0 + ns_o_iquery = 1 + ns_o_status = 2 + ns_o_notify = 4 + ns_o_update = 5 + ns_o_max = 6 +) + +const ( /* nameser.h:98:1: */ + ns_r_noerror = 0 + ns_r_formerr = 1 + ns_r_servfail = 2 + ns_r_nxdomain = 3 + ns_r_notimpl = 4 + ns_r_refused = 5 + ns_r_yxdomain = 6 + ns_r_yxrrset = 7 + ns_r_nxrrset = 8 + ns_r_notauth = 9 + ns_r_notzone = 10 + ns_r_max = 11 + ns_r_badvers = 16 + ns_r_badsig = 16 + ns_r_badkey = 17 + ns_r_badtime = 18 +) + +type ptrdiff_t = int64 /* <builtin>:3:26 */ + +type size_t = uint64 /* <builtin>:9:23 */ + +type wchar_t = int32 /* <builtin>:15:24 */ + +// # 1 "lib/libc/gen/ctype_.c" +// # 1 "<built-in>" +// # 1 "<command-line>" +// # 1 "lib/libc/gen/ctype_.c" +// # 36 "lib/libc/gen/ctype_.c" +// # 1 "./include/ctype.h" 1 +// # 43 "./include/ctype.h" +// # 1 "./sys/sys/cdefs.h" 1 +// # 41 "./sys/sys/cdefs.h" +// # 1 "./machine/cdefs.h" 1 +// # 42 "./sys/sys/cdefs.h" 2 +// # 44 "./include/ctype.h" 2 +// # 57 "./include/ctype.h" +// typedef void *locale_t; +// +// +// +// +// +// extern const char *_ctype_; +// extern const short *_tolower_tab_; +// extern const short *_toupper_tab_; +// +// +// 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); +// +// +// +// int isblank(int); +// +// +// +// int isascii(int); +// int toascii(int); +// int _tolower(int); +// int _toupper(int); +// +// +// +// 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); +// +// +// +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int islower(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) +// { +// return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_tolower_tab_ + 1)[_c]); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) +// { +// if ((unsigned int)_c > 255) +// return (_c); +// return ((_toupper_tab_ + 1)[_c]); +// } +// +// + +// extern __inline __attribute__((__gnu_inline__)) +func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ + return Bool32(_c == ' ' || _c == '\t') +} + +// extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) +// { +// return ((unsigned int)_c <= 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) +// { +// return (_c & 0177); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) +// { +// return (_c - 'A' + 'a'); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) +// { +// return (_c - 'a' + 'A'); +// } +// +// +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalnum_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalnum(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isalpha_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isalpha(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isblank_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isblank(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return iscntrl(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isgraph_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isgraph(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// islower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return islower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isprint_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isprint(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// ispunct_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return ispunct(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isspace_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isspace(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isupper(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return isxdigit(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// tolower_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return tolower(_c); +// } +// +// extern __inline __attribute__((__gnu_inline__)) int +// toupper_l(int _c, locale_t _l __attribute__((__unused__))) +// { +// return toupper(_c); +// } +// +// +// +// +// +// # 37 "lib/libc/gen/ctype_.c" 2 +// # 1 "./lib/libc/include/ctype_private.h" 1 +// +// +// +// +// +// # 5 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility push(hidden) +// # 5 "./lib/libc/include/ctype_private.h" +// +// extern const char _C_ctype_[]; +// extern const short _C_toupper_[]; +// extern const short _C_tolower_[]; +// +// # 9 "./lib/libc/include/ctype_private.h" +// #pragma GCC visibility pop +// # 9 "./lib/libc/include/ctype_private.h" +// +// # 38 "lib/libc/gen/ctype_.c" 2 + +var X_C_ctype_ = [257]int8{ + int8(0), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), + int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), + int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), + int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), + int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), + int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), + + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), + int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), +} /* ctype_.c:282:12 */ + +var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ + +func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ + return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) +} + +type locale_t = uintptr /* alltypes.h:351:32 */ + +func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisalpha(tls, c) + } + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + }() != 0 || func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0) +} + +func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ + return Xisalnum(tls, c) +} + +func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) +} + +func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ + return Xisalpha(tls, c) +} + +func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ + return Bool32(uint32(c)-uint32('0') < uint32(10)) +} + +func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ + return Xisdigit(tls, c) +} + +func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */ + return Bool32(uint32(c)-uint32('a') < uint32(26)) +} + +func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ + return Xislower(tls, c) +} + +func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ + return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) +} + +func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ + return Xisprint(tls, c) +} + +func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */ + return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5)) +} + +func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */ + return Xisspace(tls, c) +} + +func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */ + return Bool32(uint32(c)-uint32('A') < uint32(26)) +} + +func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */ + return Xisupper(tls, c) +} + +func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) +} + +func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ + return Xisxdigit(tls, c) +} + +type uintptr_t = uint64 /* alltypes.h:63:24 */ + +type intptr_t = int64 /* alltypes.h:78:15 */ + +type int8_t = int8 /* alltypes.h:104:25 */ + +type int16_t = int16 /* alltypes.h:109:25 */ + +type int32_t = int32 /* alltypes.h:114:25 */ + +type int64_t = int64 /* alltypes.h:119:25 */ + +type intmax_t = int64 /* alltypes.h:124:25 */ + +type uint8_t = uint8 /* alltypes.h:129:25 */ + +type uint16_t = uint16 /* alltypes.h:134:25 */ + +type uint32_t = uint32 /* alltypes.h:139:25 */ + +type uint64_t = uint64 /* alltypes.h:144:25 */ + +type uintmax_t = uint64 /* alltypes.h:154:25 */ + +type int_fast8_t = int8_t /* stdint.h:22:16 */ +type int_fast64_t = int64_t /* stdint.h:23:17 */ + +type int_least8_t = int8_t /* stdint.h:25:17 */ +type int_least16_t = int16_t /* stdint.h:26:17 */ +type int_least32_t = int32_t /* stdint.h:27:17 */ +type int_least64_t = int64_t /* stdint.h:28:17 */ + +type uint_fast8_t = uint8_t /* stdint.h:30:17 */ +type uint_fast64_t = uint64_t /* stdint.h:31:18 */ + +type uint_least8_t = uint8_t /* stdint.h:33:18 */ +type uint_least16_t = uint16_t /* stdint.h:34:18 */ +type uint_least32_t = uint32_t /* stdint.h:35:18 */ +type uint_least64_t = uint64_t /* stdint.h:36:18 */ + +type int_fast16_t = int32_t /* stdint.h:1:17 */ +type int_fast32_t = int32_t /* stdint.h:2:17 */ +type uint_fast16_t = uint32_t /* stdint.h:3:18 */ +type uint_fast32_t = uint32_t /* stdint.h:4:18 */ + +type ssize_t = int64 /* alltypes.h:73:15 */ + +type off_t = int64 /* alltypes.h:170:16 */ + +type _IO_FILE = struct { + Fflags uint32 + F__ccgo_pad1 [4]byte + Frpos uintptr + Frend uintptr + Fclose uintptr + Fwend uintptr + Fwpos uintptr + Fmustbezero_1 uintptr + Fwbase uintptr + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fbuf uintptr + Fbuf_size size_t + Fprev uintptr + Fnext uintptr + Ffd int32 + Fpipe_pid int32 + Flockcount int64 + Fmode int32 + Flock int32 + Flbf int32 + F__ccgo_pad2 [4]byte + Fcookie uintptr + Foff off_t + Fgetln_buf uintptr + Fmustbezero_2 uintptr + Fshend uintptr + Fshlim off_t + Fshcnt off_t + Fprev_locked uintptr + Fnext_locked uintptr + Flocale uintptr +} /* alltypes.h:328:9 */ + +type FILE = _IO_FILE /* alltypes.h:328:25 */ + +type va_list = uintptr /* alltypes.h:334:27 */ + +type _G_fpos64_t = struct { + F__ccgo_pad1 [0]uint64 + F__opaque [16]int8 +} /* stdio.h:54:9 */ + +type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ + +type float_t = float32 /* alltypes.h:38:15 */ + +type double_t = float64 /* alltypes.h:43:16 */ + +func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var __u struct {F__f float32;} at bp, 4 + + *(*float32)(unsafe.Pointer(bp)) = __f + return *(*uint32)(unsafe.Pointer(bp)) +} + +func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var __u struct {F__f float64;} at bp, 8 + + *(*float64)(unsafe.Pointer(bp)) = __f + return *(*uint64)(unsafe.Pointer(bp)) +} + +type syscall_arg_t = int64 /* syscall.h:22:14 */ + +func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ + var c int32 + var x int32 + var y int64 + var neg int32 = 0 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c == '+' || c == '-' { + neg = Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') >= 10 && pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + if uint32(c-'0') >= 10 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return -0x7fffffffffffffff - int64(1) + } + for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + x = 10*x + c - '0' + } + for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + y = int64(10)*y + int64(c) - int64('0') + } + for ; uint32(c-'0') < 10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if neg != 0 { + return -y + } + return y +} + +func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var x [128]uint32_t at bp, 512 + + var i int32 + var j int32 + var k int32 + var a int32 + var z int32 + var lrp int64 = int64(0) + var dc int64 = int64(0) + var e10 int64 = int64(0) + var lnz int32 = 0 + var gotdig int32 = 0 + var gotrad int32 = 0 + var rp int32 + var e2 int32 + var emax int32 = -emin - bits + 3 + var denormal int32 = 0 + var y float64 + var frac float64 = float64(0) + var bias float64 = float64(0) + + j = 0 + k = 0 + + // Don't let leading zeros consume buffer space + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + if c == '.' { + gotrad = 1 + for c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }(); c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + lrp-- + } + } + + *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) + for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + gotrad = 1 + lrp = dc + } else if k < 128-3 { + dc++ + if c != '0' { + lnz = int32(dc) + } + if j != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') + } + if PreIncInt32(&j, 1) == 9 { + k++ + j = 0 + } + gotdig = 1 + } else { + dc++ + if c != '0' { + lnz = (128 - 4) * 9 + *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) + } + } + } + if !(gotrad != 0) { + lrp = dc + } + + if gotdig != 0 && c|32 == 'e' { + e10 = scanexp(tls, f, pok) + if e10 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e10 = int64(0) + } + lrp = lrp + e10 + } else if c >= 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + if !(gotdig != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + // Handle zero specially to avoid nasty special cases later + if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { + return float64(sign) * 0.0 + } + + // Optimize small integers (w/no exponent) and over/under-flow + if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if lrp > int64(-emin/2) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if lrp < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + // Align incomplete final B1B digit + if j != 0 { + for ; j < 9; j++ { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10) + } + k++ + j = 0 + } + + a = 0 + z = k + e2 = 0 + rp = int32(lrp) + + // Optimize small to mid-size integers (even in exp. notation) + if lnz < 9 && lnz <= rp && rp < 18 { + if rp == 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if rp < 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp]) + } + var bitlim int32 = bits - 3*(rp-9) + if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10]) + } + } + + // Drop trailing zeros + for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- { + } + + // Align radix point to B1B digit boundary + if rp%9 != 0 { + var rpm9 int32 + if rp >= 0 { + rpm9 = rp % 9 + } else { + rpm9 = rp%9 + 9 + } + var p10 int32 = _sp10s[8-rpm9] + var carry uint32_t = uint32_t(0) + for k = a; k != z; k++ { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry + carry = uint32_t(1000000000/p10) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + rp = rp - 9 + } + } + if carry != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry + } + rp = rp + (9 - rpm9) + } + + // Upscale until desired number of bits are left of radix point + for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] { + var carry uint32_t = uint32_t(0) + e2 = e2 - 29 + for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) { + var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry) + if tmp > uint64(1000000000) { + carry = uint32_t(tmp / uint64(1000000000)) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000)) + } else { + carry = uint32_t(0) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp) + } + if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + z = k + } + if k == a { + break + } + } + if carry != 0 { + rp = rp + 9 + a = (a - 1) & (128 - 1) + if a == z { + z = (z - 1) & (128 - 1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) + } + *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry + } + } + + // Downscale until exactly number of bits are left of radix point + for { + var carry uint32_t = uint32_t(0) + var sh int32 = 1 + for i = 0; i < 2; i++ { + k = (a + i) & (128 - 1) + if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] { + i = 2 + break + } + if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] { + break + } + } + if i == 2 && rp == 9*2 { + break + } + // FIXME: find a way to compute optimal sh + if rp > 9+9*2 { + sh = 9 + } + e2 = e2 + sh + for k = a; k != z; k = (k + 1) & (128 - 1) { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry + carry = uint32_t(int32(1000000000)>>sh) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + i-- + rp = rp - 9 + } + } + if carry != 0 { + if (z+1)&(128-1) != a { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry + z = (z + 1) & (128 - 1) + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1) + } + } + } + + // Assemble desired bits into floating point variable + for y = float64(AssignInt32(&i, 0)); i < 2; i++ { + if (a+i)&(128-1) == z { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0) + } + y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4))) + } + + y = y * float64(sign) + + // Limit precision for denormal results + if bits > 53+e2-emin { + bits = 53 + e2 - emin + if bits < 0 { + bits = 0 + } + denormal = 1 + } + + // Calculate bias term to force rounding, move out lower bits + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 2*53-bits-1), y) + frac = Xfmodl(tls, y, Xscalbn(tls, float64(1), 53-bits)) + y = y - frac + y = y + bias + } + + // Process tail of decimal input so it can affect rounding + if (a+i)&(128-1) != z { + var t uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) + if t < uint32_t(500000000) && (t != 0 || (a+i+1)&(128-1) != z) { + frac = frac + 0.25*float64(sign) + } else if t > uint32_t(500000000) { + frac = frac + 0.75*float64(sign) + } else if t == uint32_t(500000000) { + if (a+i+1)&(128-1) == z { + frac = frac + 0.5*float64(sign) + } else { + frac = frac + 0.75*float64(sign) + } + } + if 53-bits >= 2 && !(Xfmodl(tls, frac, float64(1)) != 0) { + frac += 1 + } + } + + y = y + frac + y = y - bias + + if (e2+53)&0x7fffffff > emax-5 { + if Xfabsl(tls, y) >= float64(float64(2))/2.22044604925031308085e-16 { + if denormal != 0 && bits == 53+e2-emin { + denormal = 0 + } + y = y * 0.5 + e2++ + } + if e2+53 > emax || denormal != 0 && frac != 0 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + } + + return Xscalbnl(tls, y, e2) +} + +var _sth = [2]uint32_t{uint32_t(9007199), uint32_t(254740991)} /* floatscan.c:67:24 */ +var _sp10s = [8]int32{10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000} /* floatscan.c:80:19 */ + +func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:315:20: */ + var x uint32_t = uint32_t(0) + var y float64 = float64(0) + var scale float64 = float64(1) + var bias float64 = float64(0) + var gottail int32 = 0 + var gotrad int32 = 0 + var gotdig int32 = 0 + var rp int64 = int64(0) + var dc int64 = int64(0) + var e2 int64 = int64(0) + var d int32 + var c int32 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + + // Skip leading zeros + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + + if c == '.' { + gotrad = 1 + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + // Count zeros after the radix point before significand + rp = int64(0) + __1: + if !(c == '0') { + goto __3 + } + gotdig = 1 + goto __2 + __2: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + rp-- + goto __1 + goto __3 + __3: + } + + for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + rp = dc + gotrad = 1 + } else { + gotdig = 1 + if c > '9' { + d = c | 32 + 10 - 'a' + } else { + d = c - '0' + } + if dc < int64(8) { + x = x*uint32_t(16) + uint32_t(d) + } else if dc < int64(53/4+1) { + y = y + float64(d)*AssignDivFloat64(&scale, float64(16)) + } else if d != 0 && !(gottail != 0) { + y = y + 0.5*scale + gottail = 1 + } + dc++ + } + } + if !(gotdig != 0) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if gotrad != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } else { + X__shlim(tls, f, int64(0)) + } + return float64(sign) * 0.0 + } + if !(gotrad != 0) { + rp = dc + } + for dc < int64(8) { + x = x * uint32_t(16) + dc++ + } + if c|32 == 'p' { + e2 = scanexp(tls, f, pok) + if e2 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e2 = int64(0) + } + } else { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + e2 = e2 + (int64(4)*rp - int64(32)) + + if !(x != 0) { + return float64(sign) * 0.0 + } + if e2 > int64(-emin) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if e2 < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + for x < 0x80000000 { + if y >= 0.5 { + x = x + (x + uint32_t(1)) + y = y + (y - float64(1)) + } else { + x = x + x + y = y + y + } + e2-- + } + + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) + if bits < 0 { + bits = 0 + } + } + + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 32+53-bits-1), float64(sign)) + } + + if bits < 32 && y != 0 && !(x&uint32_t(1) != 0) { + x++ + y = float64(0) + } + + y = bias + float64(sign)*float64(x) + float64(sign)*y + y = y - bias + + if !(y != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + + return Xscalbnl(tls, y, int32(e2)) +} + +func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */ + var sign int32 = 1 + var i size_t + var bits int32 + var emin int32 + var c int32 + + switch prec { + case 0: + bits = 24 + emin = -125 - bits + break + case 1: + bits = 53 + emin = -1021 - bits + break + case 2: + bits = 53 + emin = -1021 - bits + break + default: + return float64(0) + } + + for __isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0 { + } + + if c == '+' || c == '-' { + sign = sign - 2*Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + + for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { + if i < uint64(7) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { + if i != uint64(8) { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if pok != 0 { + for ; i > uint64(3); i-- { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + } + } + return float64(float32(sign) * X__builtin_inff(tls)) + } + if !(i != 0) { + for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { + if i < uint64(2) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + } + if i == uint64(3) { + if func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() != '(' { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + return float64(X__builtin_nanf(tls, ts+13)) + } + for i = uint64(1); ; i++ { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') < 10 || uint32(c-'A') < 26 || uint32(c-'a') < 26 || c == '_' { + continue + } + if c == ')' { + return float64(X__builtin_nanf(tls, ts+13)) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + for PostDecUint64(&i, 1) != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + } + return float64(X__builtin_nanf(tls, ts+13)) + } + return float64(X__builtin_nanf(tls, ts+13)) + } + + if i != 0 { + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + if c == '0' { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c|32 == 'x' { + return hexfloat(tls, f, bits, emin, sign, pok) + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + c = '0' + } + + return decfloat(tls, f, c, bits, emin, sign, pok) +} + +// Lookup table for digit values. -1==255>=36 -> invalid +var table = [257]uint8{Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), +} /* intscan.c:7:28 */ + +func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */ + var val uintptr + var c int32 + var neg int32 + var x uint32 + var y uint64 + var bs int32 + val = uintptr(unsafe.Pointer(&table)) + uintptr(1) + neg = 0 + if !(base > uint32(36) || base == uint32(1)) { + goto __1 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__1: + ; +__2: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __3 + } + goto __2 +__3: + ; + if !(c == '+' || c == '-') { + goto __4 + } + neg = -Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() +__4: + ; + if !((base == uint32(0) || base == uint32(16)) && c == '0') { + goto __5 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(c|32 == 'x') { + goto __7 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { + goto __9 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(pok != 0) { + goto __10 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + goto __11 +__10: + X__shlim(tls, f, int64(0)) +__11: + ; + return uint64(0) +__9: + ; + base = uint32(16) + goto __8 +__7: + if !(base == uint32(0)) { + goto __12 + } + base = uint32(8) +__12: + ; +__8: + ; + goto __6 +__5: + if !(base == uint32(0)) { + goto __13 + } + base = uint32(10) +__13: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { + goto __14 + } + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + X__shlim(tls, f, int64(0)) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__14: + ; +__6: + ; + if !(base == uint32(10)) { + goto __15 + } + x = uint32(0) +__17: + if !(uint32(c-'0') < 10 && x <= 0xffffffff/uint32(10)-uint32(1)) { + goto __19 + } + x = x*uint32(10) + uint32(c-'0') + goto __18 +__18: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __17 + goto __19 +__19: + ; + y = uint64(x) +__20: + if !(uint32(c-'0') < 10 && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(10) && uint64(10)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(c-'0')) { + goto __22 + } + y = y*uint64(10) + uint64(c-'0') + goto __21 +__21: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __20 + goto __22 +__22: + ; + if !(uint32(c-'0') >= 10) { + goto __23 + } + goto done +__23: + ; + goto __16 +__15: + if !!(base&(base-uint32(1)) != 0) { + goto __24 + } + bs = int32(*(*int8)(unsafe.Pointer(ts + 14 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + x = uint32(0) +__26: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { + goto __28 + } + x = x<<bs | uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __27 +__27: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __26 + goto __28 +__28: + ; + y = uint64(x) +__29: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= uint64(2*uint64(0x7fffffffffffffff)+uint64(1))>>bs) { + goto __31 + } + y = y<<bs | uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __30 +__30: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __29 + goto __31 +__31: + ; + goto __25 +__24: + x = uint32(0) +__32: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(36)-uint32(1)) { + goto __34 + } + x = x*base + uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __33 +__33: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __32 + goto __34 +__34: + ; + y = uint64(x) +__35: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(base) && uint64(base)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { + goto __37 + } + y = y*uint64(base) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __36 +__36: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __35 + goto __37 +__37: + ; +__25: + ; +__16: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __38 + } +__39: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __41 + } + goto __40 +__40: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __39 + goto __41 +__41: + ; + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + y = lim + if !(lim&uint64(1) != 0) { + goto __42 + } + neg = 0 +__42: + ; +__38: + ; +done: + if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).Frpos-- + } else { + } + if !(y >= lim) { + goto __43 + } + if !(!(lim&uint64(1) != 0) && !(neg != 0)) { + goto __44 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim - uint64(1) + goto __45 +__44: + if !(y > lim) { + goto __46 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim +__46: + ; +__45: + ; +__43: + ; + return y ^ uint64(neg) - uint64(neg) +} + +// The shcnt field stores the number of bytes read so far, offset by +// the value of buf-rpos at the last function call (__shlim or __shgetc), +// so that between calls the inline shcnt macro can add rpos-buf to get +// the actual count. + +func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ + (*FILE)(unsafe.Pointer(f)).Fshlim = lim + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 1 + // If lim is nonzero, rend must be a valid pointer. + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } +} + +func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ + var c int32 + var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1 + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1) + return -1 + } + cnt++ + if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt) + } else { + (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend + } + (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c) + } + return c +} + +func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */ + return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24 +} + +func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */ + return Xcopysign(tls, x, y) +} + +func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */ + return Xfabs(tls, x) +} + +func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */ + return Xfmod(tls, x, y) +} + +var toint double_t = float64(float64(1)) / 2.22044604925031308085e-16 /* rint.c:10:23 */ + +func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + var s int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 63) + var y double_t + + if e >= 0x3ff+52 { + return x + } + if s != 0 { + y = x - toint + toint + } else { + y = x + toint - toint + } + if y == float64(0) { + if s != 0 { + return -Float64FromFloat64(0.0) + } + return float64(0) + } + return y +} + +func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var u struct {Ff float64;} at bp, 8 + + var y double_t = x + + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + n = 1023 + } + } + } else if n < -1022 { + // make sure final n < -53 to avoid double + // rounding in the subnormal range + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + n = -1022 + } + } + } + *(*uint64_t)(unsafe.Pointer(bp)) = uint64_t(0x3ff+n) << 52 + x = y * *(*float64)(unsafe.Pointer(bp)) + return x +} + +func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ + return Xscalbn(tls, x, n) +} + +type div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:35 */ +type ldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:63:36 */ +type lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:64:41 */ + +type max_align_t = struct { + F__ll int64 + F__ld float64 +} /* alltypes.h:49:54 */ + +type imaxdiv_t = struct { + Fquot intmax_t + Frem intmax_t +} /* inttypes.h:14:40 */ + +type pid_t = int32 /* alltypes.h:243:13 */ + +type uid_t = uint32 /* alltypes.h:253:18 */ + +type gid_t = uint32 /* alltypes.h:258:18 */ + +type iovec = struct { + Fiov_base uintptr + Fiov_len size_t +} /* alltypes.h:363:1 */ + +type socklen_t = uint32 /* alltypes.h:369:18 */ + +type sa_family_t = uint16 /* alltypes.h:374:24 */ + +type msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:22:1 */ + +type cmsghdr = struct { + Fcmsg_len socklen_t + F__pad1 int32 + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:44:1 */ + +type linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:74:1 */ + +type sockaddr = struct { + Fsa_family sa_family_t + Fsa_data [14]int8 +} /* socket.h:367:1 */ + +type sockaddr_storage = struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 +} /* socket.h:372:1 */ + +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */ + +type sockaddr_in = struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t +} /* in.h:16:1 */ + +type in6_addr = struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } +} /* in.h:23:1 */ + +type sockaddr_in6 = struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t +} /* in.h:34:1 */ + +type ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:42:1 */ + +type ip_opts = struct { + Fip_dst struct{ Fs_addr in_addr_t } + Fip_opts [40]int8 +} /* in.h:229:1 */ + +type ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } +} /* in.h:247:1 */ + +type ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_address struct{ Fs_addr in_addr_t } + Fimr_ifindex int32 +} /* in.h:252:1 */ + +type ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr in_addr_t } + Fimr_interface struct{ Fs_addr in_addr_t } + Fimr_sourceaddr struct{ Fs_addr in_addr_t } +} /* in.h:258:1 */ + +type ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr in_addr_t } + Fimsf_interface struct{ Fs_addr in_addr_t } + Fimsf_fmode uint32_t + Fimsf_numsrc uint32_t + Fimsf_slist [1]struct{ Fs_addr in_addr_t } +} /* in.h:264:1 */ + +type group_req = struct { + Fgr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:275:1 */ + +type group_source_req = struct { + Fgsr_interface uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:280:1 */ + +type group_filter = struct { + Fgf_interface uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode uint32_t + Fgf_numsrc uint32_t + Fgf_slist [1]struct { + Fss_family sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:286:1 */ + +type in_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr in_addr_t } + Fipi_addr struct{ Fs_addr in_addr_t } +} /* in.h:297:1 */ + +type in6_pktinfo = struct { + Fipi6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fipi6_ifindex uint32 +} /* in.h:303:1 */ + +type ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_family sa_family_t + Fsin6_port in_port_t + Fsin6_flowinfo uint32_t + Fsin6_addr struct { + F__in6_union struct { + F__ccgo_pad1 [0]uint32 + F__s6_addr [16]uint8_t + } + } + Fsin6_scope_id uint32_t + } + Fip6m_mtu uint32_t +} /* in.h:308:1 */ + +type addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:16:1 */ + +// Legacy functions follow (marked OBsolete in SUS) + +type netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net uint32_t +} /* netdb.h:62:1 */ + +type hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:69:1 */ + +type servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr +} /* netdb.h:78:1 */ + +type protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:85:1 */ + +type aibuf = struct { + Fai struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr + } + Fsa struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte + } + Flock [1]int32 + Fslot int16 + Fref int16 + F__ccgo_pad1 [4]byte +} /* lookup.h:10:1 */ + +type sa = struct { + Fsin struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + F__ccgo_pad1 [12]byte +} /* lookup.h:10:1 */ + +type address = struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 +} /* lookup.h:20:1 */ + +type service = struct { + Fport uint16_t + Fproto uint8 + Fsocktype uint8 +} /* lookup.h:27:1 */ + +type resolvconf = struct { + Fns [3]struct { + Ffamily int32 + Fscopeid uint32 + Faddr [16]uint8_t + Fsortkey int32 + } + Fnns uint32 + Fattempts uint32 + Fndots uint32 + Ftimeout uint32 +} /* lookup.h:34:1 */ + +func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ + var cnt size_t + cnt = uint64(1) +__1: + if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) { + goto __3 + } + goto __2 +__2: + cnt++ + p = (*addrinfo)(unsafe.Pointer(p)).Fai_next + goto __1 + goto __3 +__3: + ; + var b uintptr = p - uintptr(uint64(uintptr(0))) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot) + //TODO LOCK(b->lock); + if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { + Xfree(tls, b) + } + //TODO else UNLOCK(b->lock); +} + +type time_t = int64 /* alltypes.h:93:16 */ + +type clockid_t = int32 /* alltypes.h:222:13 */ + +type timespec = struct { + Ftv_sec time_t + Ftv_nsec int64 +} /* alltypes.h:237:1 */ + +type pthread_t = uintptr /* alltypes.h:281:26 */ + +type pthread_once_t = int32 /* alltypes.h:287:13 */ + +type pthread_key_t = uint32 /* alltypes.h:292:18 */ + +type pthread_spinlock_t = int32 /* alltypes.h:297:13 */ + +type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:302:37 */ + +type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:307:37 */ + +type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:312:37 */ + +type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:317:40 */ + +type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:357:9 */ + +type sigset_t = __sigset_t /* alltypes.h:357:71 */ + +type pthread_attr_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 + } +} /* alltypes.h:380:147 */ + +type pthread_mutex_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [10]int32 + } +} /* alltypes.h:385:157 */ + +type pthread_cond_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [12]int32 + } +} /* alltypes.h:395:112 */ + +type pthread_rwlock_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [14]int32 + } +} /* alltypes.h:405:139 */ + +type pthread_barrier_t = struct { + F__u struct { + F__ccgo_pad1 [0]uint64 + F__i [8]int32 + } +} /* alltypes.h:410:137 */ + +type sched_param = struct { + Fsched_priority int32 + F__reserved1 int32 + F__reserved2 [2]struct { + F__reserved1 time_t + F__reserved2 int64 + } + F__reserved3 int32 + F__ccgo_pad1 [4]byte +} /* sched.h:19:1 */ + +type timer_t = uintptr /* alltypes.h:217:14 */ + +type clock_t = int64 /* alltypes.h:227:14 */ + +type tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:38:1 */ + +type itimerspec = struct { + Fit_interval struct { + Ftv_sec time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec time_t + Ftv_nsec int64 + } +} /* time.h:80:1 */ + +type __ptcb = struct { + F__f uintptr + F__x uintptr + F__next uintptr +} /* pthread.h:206:1 */ + +type useconds_t = uint32 /* alltypes.h:268:18 */ + +func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ + bp := tls.Alloc(1608) + defer tls.Free(1608) + + // var ports [2]service at bp, 8 + + // var addrs [48]address at bp+8, 1344 + + // var canon [256]int8 at bp+1352, 256 + + var outcanon uintptr + var nservs int32 + var naddrs int32 + var nais int32 + var canon_len int32 + var i int32 + var j int32 + var k int32 + var family int32 = 0 + var flags int32 = 0 + var proto int32 = 0 + var socktype int32 = 0 + var out uintptr + + if !(host != 0) && !(serv != 0) { + return -2 + } + + if hint != 0 { + family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype + + var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 + if flags&mask != flags { + return -1 + } + + switch family { + case 2: + fallthrough + case 10: + fallthrough + case 0: + break + fallthrough + default: + return -6 + } + } + + if flags&0x20 != 0 { + Xabort(tls) //TODO- + // /* Define the "an address is configured" condition for address + // * families via ability to create a socket for the family plus + // * routability of the loopback address for the family. */ + // static const struct sockaddr_in lo4 = { + // .sin_family = AF_INET, .sin_port = 65535, + // .sin_addr.s_addr = __BYTE_ORDER == __BIG_ENDIAN + // ? 0x7f000001 : 0x0100007f + // }; + // static const struct sockaddr_in6 lo6 = { + // .sin6_family = AF_INET6, .sin6_port = 65535, + // .sin6_addr = IN6ADDR_LOOPBACK_INIT + // }; + // int tf[2] = { AF_INET, AF_INET6 }; + // const void *ta[2] = { &lo4, &lo6 }; + // socklen_t tl[2] = { sizeof lo4, sizeof lo6 }; + // for (i=0; i<2; i++) { + // if (family==tf[1-i]) continue; + // int s = socket(tf[i], SOCK_CLOEXEC|SOCK_DGRAM, + // IPPROTO_UDP); + // if (s>=0) { + // int cs; + // pthread_setcancelstate( + // PTHREAD_CANCEL_DISABLE, &cs); + // int r = connect(s, ta[i], tl[i]); + // pthread_setcancelstate(cs, 0); + // close(s); + // if (!r) continue; + // } + // switch (errno) { + // case EADDRNOTAVAIL: + // case EAFNOSUPPORT: + // case EHOSTUNREACH: + // case ENETDOWN: + // case ENETUNREACH: + // break; + // default: + // return EAI_SYSTEM; + // } + // if (family == tf[i]) return EAI_NONAME; + // family = tf[1-i]; + // } + } + + nservs = X__lookup_serv(tls, bp, serv, proto, socktype, flags) + if nservs < 0 { + return nservs + } + + naddrs = X__lookup_name(tls, bp+8, bp+1352, host, family, flags) + if naddrs < 0 { + return naddrs + } + + nais = nservs * naddrs + canon_len = int32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(unsafe.Sizeof(aibuf{}))+uint64(canon_len)+uint64(1)) + if !(out != 0) { + return -10 + } + + if canon_len != 0 { + outcanon = out + uintptr(nais)*88 + Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+1)) + } else { + outcanon = uintptr(0) + } + + for k = AssignInt32(&i, 0); i < naddrs; i++ { + j = 0 + __1: + if !(j < nservs) { + goto __3 + } + { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k) + //TODO out[k].ai = (struct addrinfo){ + //TODO .ai_family = addrs[i].family, + //TODO .ai_socktype = ports[j].socktype, + //TODO .ai_protocol = ports[j].proto, + //TODO .ai_addrlen = addrs[i].family == AF_INET + //TODO ? sizeof(struct sockaddr_in) + //TODO : sizeof(struct sockaddr_in6), + //TODO .ai_addr = (void *)&out[k].sa, + //TODO .ai_canonname = outcanon }; + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 { + return uint32(unsafe.Sizeof(sockaddr_in{})) + } + return uint32(unsafe.Sizeof(sockaddr_in6{})) + }() + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon + if k != 0 { + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88 + } + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily { + case 2: + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) + break + case 10: + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid + Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) + break + } + + } + goto __2 + __2: + j++ + k++ + goto __1 + goto __3 + __3: + } + (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais) + *(*uintptr)(unsafe.Pointer(res)) = out + return 0 +} + +type ucred = struct { + Fpid pid_t + Fuid uid_t + Fgid gid_t +} /* socket.h:57:1 */ + +type mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__pad1 int32 + Fmsg_control uintptr + Fmsg_controllen socklen_t + F__pad2 int32 + Fmsg_flags int32 + F__ccgo_pad2 [4]byte + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte +} /* socket.h:63:1 */ + +func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh) + _sh = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyaddr_r(tls, a, l, af, _sh, + _sh+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh +} + +var _sh uintptr /* gethostbyaddr.c:9:24: */ + +func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */ + return Xgethostbyname2(tls, name, 2) +} + +func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh1) + _sh1 = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh1 != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyname2_r(tls, name, af, _sh1, + _sh1+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh1 +} + +var _sh1 uintptr /* gethostbyname2.c:10:24: */ + +func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname2_r.c:11:5: */ + bp := tls.Alloc(1600) + defer tls.Free(1600) + + // var addrs [48]address at bp, 1344 + + // var canon [256]int8 at bp+1344, 256 + + var i int32 + var cnt int32 + var align size_t + var need size_t + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + cnt = X__lookup_name(tls, bp, bp+1344, name, af, 0x02) + if cnt < 0 { + switch cnt { + case -2: + *(*int32)(unsafe.Pointer(err)) = 1 + return 2 + fallthrough + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + fallthrough + default: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return 74 + fallthrough + case -10: + fallthrough + case -11: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + } + } + + (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af + (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 { + if af == 10 { + return 16 + } + return 4 + }() + + // Align buffer + align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) + + need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) + need = need + (Xstrlen(tls, name) + uint64(1)) + need = need + (Xstrlen(tls, bp+1344) + uint64(1)) + need = need + align + + if need > buflen { + return 34 + } + + buf += uintptr(align) + (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf + buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf + buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < cnt; i++ { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length)) + } + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0) + + (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1)) + + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1)) + } else { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0) + + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +type if_nameindex = struct { + Fif_index uint32 + F__ccgo_pad1 [4]byte + Fif_name uintptr +} /* if.h:12:1 */ + +type ifaddr = struct { + Fifa_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + Fifa_ifu struct { + Fifu_broadaddr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + } + Fifa_ifp uintptr + Fifa_next uintptr +} /* if.h:51:1 */ + +type ifmap = struct { + Fmem_start uint64 + Fmem_end uint64 + Fbase_addr uint16 + Firq uint8 + Fdma uint8 + Fport uint8 + F__ccgo_pad1 [3]byte +} /* if.h:64:1 */ + +type ifreq = struct { + Fifr_ifrn struct{ Fifrn_name [16]int8 } + Fifr_ifru struct { + F__ccgo_pad1 [0]uint64 + Fifru_addr struct { + Fsa_family sa_family_t + Fsa_data [14]int8 + } + F__ccgo_pad2 [8]byte + } +} /* if.h:76:1 */ + +type ifconf = struct { + Fifc_len int32 + F__ccgo_pad1 [4]byte + Fifc_ifcu struct{ Fifcu_buf uintptr } +} /* if.h:116:1 */ + +type ns_sect = uint32 /* nameser.h:37:3 */ + +type __ns_msg = struct { + F_msg uintptr + F_eom uintptr + F_id uint16_t + F_flags uint16_t + F_counts [4]uint16_t + F__ccgo_pad1 [4]byte + F_sections [4]uintptr + F_sect ns_sect + F_rrnum int32 + F_msg_ptr uintptr +} /* nameser.h:39:9 */ + +type ns_msg = __ns_msg /* nameser.h:46:3 */ + +type _ns_flagdata = struct { + Fmask int32 + Fshift int32 +} /* nameser.h:48:1 */ + +type __ns_rr = struct { + Fname [1025]int8 + F__ccgo_pad1 [1]byte + Ftype uint16_t + Frr_class uint16_t + F__ccgo_pad2 [2]byte + Fttl uint32_t + Frdlength uint16_t + F__ccgo_pad3 [2]byte + Frdata uintptr +} /* nameser.h:59:9 */ + +type ns_rr = __ns_rr /* nameser.h:66:3 */ + +type ns_flag = uint32 /* nameser.h:87:3 */ + +type ns_opcode = uint32 /* nameser.h:96:3 */ + +type ns_rcode = uint32 /* nameser.h:115:3 */ + +type ns_update_operation = uint32 /* nameser.h:121:3 */ + +type ns_tsig_key1 = struct { + Fname [1025]int8 + Falg [1025]int8 + F__ccgo_pad1 [6]byte + Fdata uintptr + Flen int32 + F__ccgo_pad2 [4]byte +} /* nameser.h:123:1 */ + +type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ + +type ns_tcp_tsig_state1 = struct { + Fcounter int32 + F__ccgo_pad1 [4]byte + Fkey uintptr + Fctx uintptr + Fsig [512]uint8 + Fsiglen int32 + F__ccgo_pad2 [4]byte +} /* nameser.h:130:1 */ + +type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ + +type ns_type = uint32 /* nameser.h:200:3 */ + +type ns_class = uint32 /* nameser.h:219:3 */ + +type ns_key_types = uint32 /* nameser.h:226:3 */ + +type ns_cert_types = uint32 /* nameser.h:234:3 */ + +type HEADER = struct { + F__ccgo_pad1 [0]uint32 + Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ +} /* nameser.h:353:3 */ + +// unused; purely for broken apps +type __res_state = struct { + Fretrans int32 + Fretry int32 + Foptions uint64 + Fnscount int32 + Fnsaddr_list [3]struct { + Fsin_family sa_family_t + Fsin_port in_port_t + Fsin_addr struct{ Fs_addr in_addr_t } + Fsin_zero [8]uint8_t + } + Fid uint16 + F__ccgo_pad1 [2]byte + Fdnsrch [7]uintptr + Fdefdname [256]int8 + Fpfcode uint64 + Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + F__ccgo_pad2 [4]byte + Fsort_list [10]struct { + Faddr struct{ Fs_addr in_addr_t } + Fmask uint32_t + } + Fqhook uintptr + Frhook uintptr + Fres_h_errno int32 + F_vcsock int32 + F_flags uint32 + F__ccgo_pad3 [4]byte + F_u struct { + F__ccgo_pad1 [0]uint64 + Fpad [52]int8 + F__ccgo_pad2 [4]byte + } +} /* resolv.h:26:9 */ + +// unused; purely for broken apps +type res_state = uintptr /* resolv.h:62:3 */ + +type res_sym = struct { + Fnumber int32 + F__ccgo_pad1 [4]byte + Fname uintptr + Fhumanname uintptr +} /* resolv.h:70:1 */ + +func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ + p += uintptr(uint64(3) * uint64(unsafe.Sizeof(int32(0)))) + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(uint32('0') + x%uint32(10)) + x = x / uint32(10) + } + return p +} + +func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + Xsprintf(tls, s, ts+23, + VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip))))) +} + +func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ + var i int32 + for i = 15; i >= 0; i-- { + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&15] + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4] + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') + } + Xstrcpy(tls, s, ts+48) +} + +var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* getnameinfo.c:36:20 */ + +func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */ + bp := tls.Alloc(556) + defer tls.Free(556) + + // var line [512]int8 at bp+16, 512 + + var p uintptr + var z uintptr + var _buf [1032]uint8 + _ = _buf + // var atmp [16]uint8 at bp, 16 + + // var iplit address at bp+528, 28 + + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var f uintptr = Xfopen(tls, ts+74, ts+85) + if !(f != 0) { + return + } + if family == 2 { + Xmemcpy(tls, bp+uintptr(12), a, uint64(4)) + Xmemcpy(tls, bp, ts+88, uint64(12)) + a = bp /* &atmp[0] */ + } + for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { + if AssignUintptr(&p, Xstrchr(tls, bp+16, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + + for p = bp + 16; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + if X__lookup_ipliteral(tls, bp+528, bp+16, 0) <= 0 { + continue + } + + if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 { + Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4)) + Xmemcpy(tls, bp+528+8, ts+88, uint64(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0) + } + + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid { + continue + } + + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if (int64(z)-int64(p))/1 < int64(256) { + Xmemcpy(tls, buf, p, uint64((int64(z)-int64(p))/1+int64(1))) + break + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) +} + +func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getnameinfo.c:87:13: */ + Xabort(tls) //TODO- + // unsigned long svport; + // char line[128], *p, *z; + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) return; + // while (fgets(line, sizeof line, f)) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // for (p=line; *p && !isspace(*p); p++); + // if (!*p) continue; + // *p++ = 0; + // svport = strtoul(p, &z, 10); + + // if (svport != port || z==p) continue; + // if (dgram && strncmp(z, "/udp", 4)) continue; + // if (!dgram && strncmp(z, "/tcp", 4)) continue; + // if (p-line > 32) continue; + + // memcpy(buf, line, p-line); + // break; + // } + // __fclose_ca(f); +} + +var Xh_errno int32 /* h_errno.c:4:5: */ + +func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */ + return uintptr(unsafe.Pointer(&Xh_errno)) +} + +func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var s uintptr = s0 + var d uintptr = dest + *(*[4]uint64)(unsafe.Pointer(bp /* a */)) = [4]uint64{0: uint64(0)} + // var z uintptr at bp+32, 8 + + var i int32 + + for i = 0; i < 4; i++ { + *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) = Xstrtoul(tls, s, bp+32, 0) + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != '.' || !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s)))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) + }() != 0) { + return 0 + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != 0) { + break + } + s = *(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(1) + } + if i == 4 { + return 0 + } + switch i { + case 0: + *(*uint64)(unsafe.Pointer(bp + 1*8)) = *(*uint64)(unsafe.Pointer(bp)) & uint64(0xffffff) + AssignShrPtrUint64(bp, int(24)) + fallthrough + case 1: + *(*uint64)(unsafe.Pointer(bp + 2*8)) = *(*uint64)(unsafe.Pointer(bp + 1*8)) & uint64(0xffff) + AssignShrPtrUint64(bp+1*8, int(16)) + fallthrough + case 2: + *(*uint64)(unsafe.Pointer(bp + 3*8)) = *(*uint64)(unsafe.Pointer(bp + 2*8)) & uint64(0xff) + AssignShrPtrUint64(bp+2*8, int(8)) + } + for i = 0; i < 4; i++ { + if *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) > uint64(255) { + return 0 + } + *(*uint8)(unsafe.Pointer(d + uintptr(i))) = uint8(*(*uint64)(unsafe.Pointer(bp + uintptr(i)*8))) + } + return 1 +} + +func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var a uintptr = a0 + var i int32 + var j int32 + var max int32 + var best int32 + // var buf [100]int8 at bp+176, 100 + + switch af { + case 2: + if socklen_t(Xsnprintf(tls, s, uint64(l), ts+101, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l { + return s + } + break + case 10: + if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 { + Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), + ts+113, + VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } else { + Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), + ts+137, + VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))), + 256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))), + int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } + // Replace longest /(^0|:)[:0]{2,}/ with "::" + i = AssignInt32(&best, 0) + max = 2 + for ; *(*int8)(unsafe.Pointer(bp + 176 + uintptr(i))) != 0; i++ { + if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { + continue + } + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167)) + if j > max { + best = i + max = j + } + } + if max > 3 { + *(*int8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrInt8(bp+176+uintptr(best+1), int8(':')) + Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint64(i-best-max+1)) + } + if Xstrlen(tls, bp+176) < size_t(l) { + Xstrcpy(tls, s, bp+176) + return s + } + break + default: + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return uintptr(0) + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 28 + return uintptr(0) +} + +func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */ + if c-uint32('0') < uint32(10) { + return int32(c - uint32('0')) + } + c = c | uint32(32) + if c-uint32('a') < uint32(6) { + return int32(c - uint32('a') + uint32(10)) + } + return -1 +} + +func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var ip [8]uint16_t at bp, 16 + + var a uintptr = a0 + var i int32 + var j int32 + var v int32 + var d int32 + var brk int32 = -1 + var need_v4 int32 = 0 + + if af == 2 { + for i = 0; i < 4; i++ { + for v = AssignInt32(&j, 0); j < 3 && func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s + uintptr(j))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) + }() != 0; j++ { + v = 10*v + int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) - '0' + } + if j == 0 || j > 1 && int32(*(*int8)(unsafe.Pointer(s))) == '0' || v > 255 { + return 0 + } + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == 3 { + return 1 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' { + return 0 + } + s += uintptr(j + 1) + } + return 0 + } else if af != 10 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return -1 + } + + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != ':' { + return 0 + } + + for i = 0; ; i++ { + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && brk < 0 { + brk = i + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(0) + if !(int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != 0) { + break + } + if i == 7 { + return 0 + } + continue + } + for v = AssignInt32(&j, 0); j < 4 && AssignInt32(&d, hexval(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(j)))))) >= 0; j++ { + v = 16*v + d + } + if j == 0 { + return 0 + } + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(v) + if !(int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != 0) && (brk >= 0 || i == 7) { + break + } + if i == 7 { + return 0 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != ':' { + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' || i < 6 && brk < 0 { + return 0 + } + need_v4 = 1 + i++ + break + } + s += uintptr(j + 1) + } + if brk >= 0 { + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(2*(i+1-brk))) + for j = 0; j < 7-i; j++ { + *(*uint16_t)(unsafe.Pointer(bp + uintptr(brk+j)*2)) = uint16_t(0) + } + } + for j = 0; j < 8; j++ { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(int32(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) >> 8) + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) + } + if need_v4 != 0 && Xinet_pton(tls, 2, s, a-uintptr(4)) <= 0 { + return 0 + } + return 1 +} + +func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + // var a4 in_addr at bp, 4 + + // var a6 in6_addr at bp+68, 16 + + if X__inet_aton(tls, name, bp) > 0 { + if family == 10 { // wrong family + return -2 + } + Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 2 + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0) + return 1 + } + // var tmp [64]int8 at bp+4, 64 + + var p uintptr = Xstrchr(tls, name, '%') + // var z uintptr at bp+88, 8 + + var scopeid uint64 = uint64(0) + if p != 0 && (int64(p)-int64(name))/1 < int64(64) { + Xmemcpy(tls, bp+4, name, uint64((int64(p)-int64(name))/1)) + *(*int8)(unsafe.Pointer(bp + 4 + uintptr((int64(p)-int64(name))/1))) = int8(0) + name = bp + 4 /* &tmp[0] */ + } + + if Xinet_pton(tls, 10, name, bp+68) <= 0 { + return 0 + } + if family == 2 { // wrong family + return -2 + } + + Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) + (*address)(unsafe.Pointer(buf)).Ffamily = 10 + if p != 0 { + if func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))-uint32('0') < uint32(10)) + }() != 0 { + scopeid = Xstrtoull(tls, p, bp+88, 10) + } else { + *(*uintptr)(unsafe.Pointer(bp + 88 /* z */)) = p - uintptr(1) + } + if *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { + Xabort(tls) //TODO- + // if (!IN6_IS_ADDR_LINKLOCAL(&a6) && + // !IN6_IS_ADDR_MC_LINKLOCAL(&a6)) + // return EAI_NONAME; + // scopeid = if_nametoindex(p); + // if (!scopeid) return EAI_NONAME; + } + if scopeid > uint64(0xffffffff) { + return -2 + } + } + (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid) + return 1 +} + +type mode_t = uint32 /* alltypes.h:160:18 */ + +type flock = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start off_t + Fl_len off_t + Fl_pid pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:24:1 */ + +func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ + var s uintptr + //TODO if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) { + return 0 + } + for s = host; int32(*(*uint8)(unsafe.Pointer(s))) >= 0x80 || int32(*(*uint8)(unsafe.Pointer(s))) == '.' || int32(*(*uint8)(unsafe.Pointer(s))) == '-' || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0; s++ { + } + return BoolInt32(!(*(*uint8)(unsafe.Pointer(s)) != 0)) +} + +var Xzero_struct_address address /* lookup_name.c:27:16: */ + +func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:29:12: */ + var cnt int32 = 0 + if name != 0 { + return 0 + } + if flags&0x01 != 0 { + //TODO if (family != AF_INET6) + //TODO buf[cnt++] = (struct address){ .family = AF_INET }; + if family != 10 { + var x = Xzero_struct_address + x.Ffamily = 2 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + //TODO if (family != AF_INET) + //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; + if family != 2 { + var x = Xzero_struct_address + x.Ffamily = 10 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + } else { + Xabort(tls) //TODO- + // if (family != AF_INET6) + // buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } }; + // if (family != AF_INET) + // buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } }; + } + return cnt +} + +func name_from_numeric(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_name.c:58:12: */ + return X__lookup_ipliteral(tls, buf, name, family) +} + +func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:63:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var line [512]int8 at bp, 512 + + var l size_t = Xstrlen(tls, name) + var cnt int32 = 0 + var badfam int32 = 0 + var _buf [1032]uint8 + _ = _buf + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var _f FILE + _ = _f + var f uintptr = Xfopen(tls, ts+74, ts+85) + if !(f != 0) { + switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { + case 2: + fallthrough + case 20: + fallthrough + case 13: + return 0 + fallthrough + default: + return -11 + } + } + for Xfgets(tls, bp, int32(unsafe.Sizeof([512]int8{})), f) != 0 && cnt < 48 { + var p uintptr + var z uintptr + + if AssignUintptr(&p, Xstrchr(tls, bp, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + for p = bp + uintptr(1); AssignUintptr(&p, Xstrstr(tls, p, name)) != 0 && (!(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + UintptrFromInt32(-1))))) != 0) || !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + uintptr(l))))) != 0)); p++ { + } + if !(p != 0) { + continue + } + + // Isolate IP address to parse + for p = bp; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + switch name_from_numeric(tls, buf+uintptr(cnt)*28, bp, family) { + case 1: + cnt++ + break + case 0: + continue + default: + badfam = -2 + continue + } + + // Extract first name as canonical name + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if is_valid_hostname(tls, p) != 0 { + Xmemcpy(tls, canon, p, uint64((int64(z)-int64(p))/1+int64(1))) + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) + if cnt != 0 { + return cnt + } + return badfam +} + +type dpc_ctx = struct { + Faddrs uintptr + Fcanon uintptr + Fcnt int32 + F__ccgo_pad1 [4]byte +} /* lookup_name.c:112:1 */ + +func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ + return -1 //TODO- + Xabort(tls) + return int32(0) //TODO- + // char search[256]; + // struct resolvconf conf; + // size_t l, dots; + // char *p, *z; + + // if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; + + // /* Count dots, suppress search when >=ndots or name ends in + // * a dot, which is an explicit request for global scope. */ + // for (dots=l=0; name[l]; l++) if (name[l]=='.') dots++; + // if (dots >= conf.ndots || name[l-1]=='.') *search = 0; + + // /* Strip final dot for canon, fail if multiple trailing dots. */ + // if (name[l-1]=='.') l--; + // if (!l || name[l-1]=='.') return EAI_NONAME; + + // /* This can never happen; the caller already checked length. */ + // if (l >= 256) return EAI_NONAME; + + // /* Name with search domain appended is setup in canon[]. This both + // * provides the desired default canonical name (if the requested + // * name is not a CNAME record) and serves as a buffer for passing + // * the full requested name to name_from_dns. */ + // memcpy(canon, name, l); + // canon[l] = '.'; + + // for (p=search; *p; p=z) { + // for (; isspace(*p); p++); + // for (z=p; *z && !isspace(*z); z++); + // if (z==p) break; + // if (z-p < 256 - l - 1) { + // memcpy(canon+l+1, p, z-p); + // canon[z-p+1+l] = 0; + // int cnt = name_from_dns(buf, canon, canon, family, &conf); + // if (cnt) return cnt; + // } + // } + + // canon[l] = 0; + // return name_from_dns(buf, canon, name, family, &conf); +} + +type policy = struct { + Faddr [16]uint8 + Flen uint8 + Fmask uint8 + Fprec uint8 + Flabel uint8 +} /* lookup_name.c:237:14 */ + +var defpolicy = [6]policy{ + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)}, + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)}, + // Last rule must match all addresses to stop loop. + {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), Fprec: uint8(40), Flabel: uint8(1)}, +} /* lookup_name.c:241:3 */ + +func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ + var i int32 + for i = 0; ; i++ { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 { + continue + } + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) { + continue + } + return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + } + return uintptr(0) +} + +func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel) +} + +func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xff { + return int32(*(*uint8_t)(unsafe.Pointer(a + 1))) & 15 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 { + return 2 + } + if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 { + return 2 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0xc0 { + return 5 + } + return 14 +} + +func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12: */ + // FIXME: The common prefix length should be limited to no greater + // than the nominal length of the prefix portion of the source + // address. However the definition of the source prefix length is + // not clear and thus this limiting is not yet implemented. + var i uint32 + for i = uint32(0); i < uint32(128) && !((int32(*(*uint8_t)(unsafe.Pointer(s /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8)))))^int32(*(*uint8_t)(unsafe.Pointer(d /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8))))))&(int32(128)>>(i%uint32(8))) != 0); i++ { + } + return int32(i) +} + +func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ + var a uintptr = _a + var b uintptr = _b + return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey +} + +func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var cnt int32 = 0 + var i int32 + var j int32 + _ = j + + *(*int8)(unsafe.Pointer(canon)) = int8(0) + if name != 0 { + // reject empty name and check len so it fits into temp bufs + var l size_t = Xstrnlen(tls, name, uint64(255)) + if l-uint64(1) >= uint64(254) { + return -2 + } + Xmemcpy(tls, canon, name, l+uint64(1)) + } + + // Procedurally, a request for v6 addresses with the v4-mapped + // flag set is like a request for unspecified family, followed + // by filtering of the results. + if flags&0x08 != 0 { + if family == 10 { + family = 0 + } else { + flags = flags - 0x08 + } + } + + // Try each backend until there's at least one result. + cnt = name_from_null(tls, buf, name, family, flags) + if !(cnt != 0) { + cnt = name_from_numeric(tls, buf, name, family) + } + if !(cnt != 0) && !(flags&0x04 != 0) { + cnt = name_from_hosts(tls, buf, canon, name, family) + if !(cnt != 0) { + cnt = name_from_dns_search(tls, buf, canon, name, family) + } + } + if cnt <= 0 { + if cnt != 0 { + return cnt + } + return -2 + } + + // Filter/transform results for v4-mapped lookup, if requested. + if flags&0x08 != 0 { + Xabort(tls) //TODO- + // if (!(flags & AI_ALL)) { + // /* If any v6 results exist, remove v4 results. */ + // for (i=0; i<cnt && buf[i].family != AF_INET6; i++); + // if (i<cnt) { + // for (j=0; i<cnt; i++) { + // if (buf[i].family == AF_INET6) + // buf[j++] = buf[i]; + // } + // cnt = i = j; + // } + // } + // /* Translate any remaining v4 results to v6 */ + // for (i=0; i<cnt; i++) { + // if (buf[i].family != AF_INET) continue; + // memcpy(buf[i].addr+12, buf[i].addr, 4); + // memcpy(buf[i].addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); + // buf[i].family = AF_INET6; + // } + } + + // No further processing is needed if there are fewer than 2 + // results or if there are only IPv4 results. + if cnt < 2 || family == 2 { + return cnt + } + for i = 0; i < cnt; i++ { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 { + break + } + } + if i == cnt { + return cnt + } + var cs int32 + _ = cs + //TODO pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); + + // The following implements a subset of RFC 3484/6724 destination + // address selection by generating a single 31-bit sort key for + // each address. Rules 3, 4, and 7 are omitted for having + // excessive runtime and code size cost and dubious benefit. + // So far the label/precedence table cannot be customized. + for i = 0; i < cnt; i++ { + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily + var key int32 = 0 + *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid} + *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)} + var sa1 uintptr + var da uintptr + // var salen socklen_t at bp+88, 4 + + var dalen socklen_t + if family == 10 { + Xmemcpy(tls, bp+8, buf+uintptr(i)*28+8, uint64(16)) + da = bp /* &da6 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + sa1 = bp + 28 /* &sa6 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + } else { + Xmemcpy(tls, bp+28+8, + ts+88, uint64(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) + Xmemcpy(tls, bp+8, + ts+88, uint64(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) + Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint64(4)) + da = bp + 56 /* &da4 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in{})) + sa1 = bp + 72 /* &sa4 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in{})) + } + var dpolicy uintptr = policyof(tls, bp+8) + var dscope int32 = scopeof(tls, bp+8) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec) + var prefixlen int32 = 0 + var fd int32 = Xsocket(tls, family, 2|02000000, 17) + if fd >= 0 { + if !(Xconnect(tls, fd, da, dalen) != 0) { + key = key | 0x40000000 + if !(Xgetsockname(tls, fd, sa1, bp+88) != 0) { + if family == 2 { + Xmemcpy(tls, + bp+28+8+uintptr(12), + bp+72+4, uint64(4)) + } + if dscope == scopeof(tls, bp+28+8) { + key = key | 0x20000000 + } + if dlabel == labelof(tls, bp+28+8) { + key = key | 0x10000000 + } + prefixlen = prefixmatch(tls, bp+28+8, + bp+8) + } + } + Xclose(tls, fd) + } + key = key | dprec<<20 + key = key | (15-dscope)<<16 + key = key | prefixlen<<8 + key = key | (48-i)<<0 + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key + } + Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr) int32 + }{addrcmp}))) + + //TODO pthread_setcancelstate(cs, 0); + + return cnt +} + +func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var line [128]int8 + _ = line + var cnt int32 = 0 + var p uintptr + _ = p + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ + var port uint64 = uint64(0) + + switch socktype { + case 1: + switch proto { + case 0: + proto = 6 + fallthrough + case 6: + break + default: + return -8 + } + break + case 2: + switch proto { + case 0: + proto = 17 + fallthrough + case 17: + break + default: + return -8 + } + fallthrough + case 0: + break + default: + if name != 0 { + return -8 + } + (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0) + (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto) + (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype) + return 1 + } + + if name != 0 { + if !(int32(*(*int8)(unsafe.Pointer(name))) != 0) { + return -8 + } + port = Xstrtoul(tls, name, bp, 10) + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0) { + if port > uint64(65535) { + return -8 + } + if proto != 17 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6) + } + if proto != 6 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17) + } + return cnt + } + + if flags&0x400 != 0 { + return -2 + } + + var l size_t = Xstrlen(tls, name) + _ = l + + Xabort(tls) //TODO- + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) switch (errno) { + // case ENOENT: + // case ENOTDIR: + // case EACCES: + // return EAI_SERVICE; + // default: + // return EAI_SYSTEM; + // } + + Xabort(tls) //TODO- + // while (fgets(line, sizeof line, f) && cnt < MAXSERVS) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // /* Find service name */ + // for(p=line; (p=strstr(p, name)); p++) { + // if (p>line && !isspace(p[-1])) continue; + // if (p[l] && !isspace(p[l])) continue; + // break; + // } + // if (!p) continue; + + // /* Skip past canonical name at beginning of line */ + // for (p=line; *p && !isspace(*p); p++); + + // port = strtoul(p, &z, 10); + // if (port > 65535 || z==p) continue; + // if (!strncmp(z, "/udp", 4)) { + // if (proto == IPPROTO_TCP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_DGRAM; + // buf[cnt++].proto = IPPROTO_UDP; + // } + // if (!strncmp(z, "/tcp", 4)) { + // if (proto == IPPROTO_UDP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_STREAM; + // buf[cnt++].proto = IPPROTO_TCP; + // } + // } + // __fclose_ca(f); + // return cnt > 0 ? cnt : EAI_SERVICE; + Xabort(tls) + return int32(0) //TODO- +} + +func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1 + if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase { + (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0)) + } + (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 { + *(*uint32)(unsafe.Pointer(f)) |= uint32(32) + return -1 + } + (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size)) + if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 { + return -1 + } + return 0 +} + +func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */ + X__builtin_abort(tls) //TODO- + // __stdio_exit_needed(); +} + +// This function assumes it will never be called if there is already +// data buffered for reading. + +func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ + bp := tls.Alloc(1) + defer tls.Free(1) + + // var c uint8 at bp, 1 + + if !(X__toread(tls, f) != 0) && (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) { + return int32(*(*uint8)(unsafe.Pointer(bp))) + } + return -1 +} + +func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ + var try uintptr + var sign int32 + for nel > uint64(0) { + try = base + uintptr(width*(nel/uint64(2))) + sign = (*struct { + f func(*TLS, uintptr, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) + if sign < 0 { + nel = nel / uint64(2) + } else if sign > 0 { + base = try + uintptr(width) + nel = nel - (nel/uint64(2) + uint64(1)) + } else { + return try + } + } + return uintptr(0) +} + +func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y float64 = X__floatscan(tls, bp, prec, 1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1 + if p != 0 { + *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { + if cnt != 0 { + return s + uintptr(cnt) + } + return s + }() + } + return y +} + +func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */ + return float32(strtox(tls, s, p, 0)) +} + +func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */ + return strtox(tls, s, p, 1) +} + +func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */ + return strtox(tls, s, p, 2) +} + +func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* strtol.c:8:27: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) + if p != 0 { + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1) + *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) + } + return y +} + +func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */ + return strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1)) +} + +func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:26:11: */ + return int64(strtox1(tls, s, p, base, Uint64FromInt64(-0x7fffffffffffffff-int64(1)))) +} + +func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:31:15: */ + return uint64(strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1))) +} + +func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:36:6: */ + return int64(strtox1(tls, s, p, base, 0+Uint64FromInt64(Int64(-Int64(0x7fffffffffffffff))-Int64FromInt32(1)))) +} + +func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) intmax_t { /* strtol.c:41:10: */ + return intmax_t(Xstrtoll(tls, s, p, base)) +} + +func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */ + return uintmax_t(Xstrtoull(tls, s, p, base)) +} + +func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */ + var l size_t = Xstrlen(tls, s) + var d uintptr = Xmalloc(tls, l+uint64(1)) + if !(d != 0) { + return uintptr(0) + } + return Xmemcpy(tls, d, s, l+uint64(1)) +} + +func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */ + var p uintptr = Xmemchr(tls, s, 0, n) + if p != 0 { + return uint64((int64(p) - int64(s)) / 1) + } + return n +} + +func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var a uintptr = s + *(*[4]size_t)(unsafe.Pointer(bp /* byteset */)) = [4]size_t{0: uint64(0)} + + if !(int32(*(*int8)(unsafe.Pointer(c))) != 0) { + return uint64(0) + } + if !(int32(*(*int8)(unsafe.Pointer(c + 1))) != 0) { + for ; int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(c))); s++ { + } + return size_t((int64(s) - int64(a)) / 1) + } + + for ; *(*int8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint64(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8, size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; c++ { + } + for ; *(*int8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8))&(size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; s++ { + } + return size_t((int64(s) - int64(a)) / 1) +} + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_ctype_)) + 0)) = uintptr(unsafe.Pointer(&X_C_ctype_)) // ctype_.c:319:23: +} + +var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/vendor/modernc.org/libc/musl_windows_386.go b/vendor/modernc.org/libc/musl_windows_386.go index f802d13d..24c5b240 100644 --- a/vendor/modernc.org/libc/musl_windows_386.go +++ b/vendor/modernc.org/libc/musl_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_386.go -pkgname libc -static-locals-prefix _s -Iarch\i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/stdlib/bsearch.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT. +// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT. package libc @@ -863,32 +863,32 @@ type mode_t = uint32 /* alltypes.h:175:18 */ type syscall_arg_t = int32 /* syscall.h:22:14 */ func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:2:19: */ - panic(`arch\i386\atomic_arch.h:4:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:4:2: assembler statements not supported`) return t } func a_and(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:29:20: */ - panic(`arch\i386\atomic_arch.h:31:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:31:2: assembler statements not supported`) } func a_or(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:37:20: */ - panic(`arch\i386\atomic_arch.h:39:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:39:2: assembler statements not supported`) } func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:87:19: */ var r int32 - panic(`arch\i386\atomic_arch.h:90:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:90:2: assembler statements not supported`) return r } func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:96:19: */ var r int32 - panic(`arch\i386\atomic_arch.h:99:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:99:2: assembler statements not supported`) return r } func a_clz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:104:19: */ - panic(`arch\i386\atomic_arch.h:106:2: assembler statements not supported`) + panic(`arch/i386/atomic_arch.h:106:2: assembler statements not supported`) return int32(x) } @@ -917,7 +917,7 @@ type __timer = struct { func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */ var self uintptr - panic(`arch\i386\pthread_arch.h:4:2: assembler statements not supported`) + panic(`arch/i386/pthread_arch.h:4:2: assembler statements not supported`) return self } @@ -1039,26 +1039,6 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c return Xwcsrtombs(tls, s, bp, n, uintptr(0)) } -func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ - var try uintptr - var sign int32 - for nel > size_t(0) { - try = base + uintptr(width*(nel/size_t(2))) - sign = (*struct { - f func(*TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) - if sign < 0 { - nel = nel / size_t(2) - } else if sign > 0 { - base = try + uintptr(width) - nel = nel - (nel/size_t(2) + size_t(1)) - } else { - return try - } - } - return uintptr(0) -} - // Support signed or unsigned plain-char // Implementation choices... diff --git a/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go b/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go index c6ed3501..a360eefe 100644 --- a/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/netdb/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netdb/netdb_darwin_amd64.go -pkgname netdb', DO NOT EDIT. +// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_darwin_amd64.go -pkgname netdb', DO NOT EDIT. package netdb diff --git a/vendor/modernc.org/libc/netdb/capi_freebsd_arm.go b/vendor/modernc.org/libc/netdb/capi_freebsd_arm.go new file mode 100644 index 00000000..ce0fe43d --- /dev/null +++ b/vendor/modernc.org/libc/netdb/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_freebsd_arm.go -pkgname netdb', DO NOT EDIT. + +package netdb + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netdb/capi_freebsd_arm64.go b/vendor/modernc.org/libc/netdb/capi_freebsd_arm64.go new file mode 100644 index 00000000..e2ca523b --- /dev/null +++ b/vendor/modernc.org/libc/netdb/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_freebsd_amd64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netdb/capi_netbsd_arm.go b/vendor/modernc.org/libc/netdb/capi_netbsd_arm.go new file mode 100644 index 00000000..7ed679a0 --- /dev/null +++ b/vendor/modernc.org/libc/netdb/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_netbsd_arm.go -pkgname netdb', DO NOT EDIT. + +package netdb + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netdb/capi_openbsd_386.go b/vendor/modernc.org/libc/netdb/capi_openbsd_386.go new file mode 100644 index 00000000..7a1e621c --- /dev/null +++ b/vendor/modernc.org/libc/netdb/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_openbsd_386.go -pkgname netdb', DO NOT EDIT. + +package netdb + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netdb/capi_openbsd_arm64.go b/vendor/modernc.org/libc/netdb/capi_openbsd_arm64.go new file mode 100644 index 00000000..6b086895 --- /dev/null +++ b/vendor/modernc.org/libc/netdb/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_openbsd_arm64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go b/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go index af8adaab..3e115620 100644 --- a/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go +++ b/vendor/modernc.org/libc/netdb/netdb_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netdb/netdb_darwin_amd64.go -pkgname netdb', DO NOT EDIT. +// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_darwin_amd64.go -pkgname netdb', DO NOT EDIT. package netdb @@ -15,734 +15,734 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 - AF_CCITT = 10 - AF_CHAOS = 5 - AF_CNT = 21 - AF_COIP = 20 - AF_DATAKIT = 9 - AF_DECnet = 12 - AF_DLI = 13 - AF_E164 = 28 - AF_ECMA = 8 - AF_HYLINK = 15 - AF_IEEE80211 = 37 - AF_IMPLINK = 3 - AF_INET = 2 - AF_INET6 = 30 - AF_IPX = 23 - AF_ISDN = 28 - AF_ISO = 7 - AF_LAT = 14 - AF_LINK = 18 - AF_LOCAL = 1 - AF_MAX = 40 - AF_NATM = 31 - AF_NDRV = 27 - AF_NETBIOS = 33 - AF_NS = 6 - AF_OSI = 7 - AF_PPP = 34 - AF_PUP = 4 - AF_RESERVED_36 = 36 - AF_ROUTE = 17 - AF_SIP = 24 - AF_SNA = 11 - AF_SYSTEM = 32 - AF_UNIX = 1 - AF_UNSPEC = 0 - AF_UTUN = 38 - AI_ADDRCONFIG = 0x00000400 - AI_ALL = 0x00000100 - AI_CANONNAME = 0x00000002 - AI_DEFAULT = 1536 - AI_MASK = 5127 - AI_NUMERICHOST = 0x00000004 - AI_NUMERICSERV = 0x00001000 - AI_PASSIVE = 0x00000001 - AI_UNUSABLE = 0x10000000 - AI_V4MAPPED = 0x00000800 - AI_V4MAPPED_CFG = 0x00000200 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - CONNECT_DATA_AUTHENTICATED = 0x4 - CONNECT_DATA_IDEMPOTENT = 0x2 - CONNECT_RESUME_ON_READ_WRITE = 0x1 - EAI_ADDRFAMILY = 1 - EAI_AGAIN = 2 - EAI_BADFLAGS = 3 - EAI_BADHINTS = 12 - EAI_FAIL = 4 - EAI_FAMILY = 5 - EAI_MAX = 15 - EAI_MEMORY = 6 - EAI_NODATA = 7 - EAI_NONAME = 8 - EAI_OVERFLOW = 14 - EAI_PROTOCOL = 13 - EAI_SERVICE = 9 - EAI_SOCKTYPE = 10 - EAI_SYSTEM = 11 - FD_SETSIZE = 1024 - HOST_NOT_FOUND = 1 - ICMP6_FILTER = 18 - ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 - INADDR_NONE = 0xffffffff - INET6_ADDRSTRLEN = 46 - INET_ADDRSTRLEN = 16 - INT16_MAX = 32767 - INT16_MIN = -32768 - INT32_MAX = 2147483647 - INT32_MIN = -2147483648 - INT64_MAX = 9223372036854775807 - INT64_MIN = -9223372036854775808 - INT8_MAX = 127 - INT8_MIN = -128 - INTMAX_MAX = 9223372036854775807 - INTMAX_MIN = -9223372036854775808 - INTPTR_MAX = 9223372036854775807 - INTPTR_MIN = -9223372036854775808 - INT_FAST16_MAX = 32767 - INT_FAST16_MIN = -32768 - INT_FAST32_MAX = 2147483647 - INT_FAST32_MIN = -2147483648 - INT_FAST64_MAX = 9223372036854775807 - INT_FAST64_MIN = -9223372036854775808 - INT_FAST8_MAX = 127 - INT_FAST8_MIN = -128 - INT_LEAST16_MAX = 32767 - INT_LEAST16_MIN = -32768 - INT_LEAST32_MAX = 2147483647 - INT_LEAST32_MIN = -2147483648 - INT_LEAST64_MAX = 9223372036854775807 - INT_LEAST64_MIN = -9223372036854775808 - INT_LEAST8_MAX = 127 - INT_LEAST8_MIN = -128 - IN_CLASSA_HOST = 0x00ffffff - IN_CLASSA_MAX = 128 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 24 - IN_CLASSB_HOST = 0x0000ffff - IN_CLASSB_MAX = 65536 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 16 - IN_CLASSC_HOST = 0x000000ff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 8 - IN_CLASSD_HOST = 0x0fffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 28 - IN_LOOPBACKNET = 127 - IPCTL_ACCEPTSOURCEROUTE = 13 - IPCTL_DEFTTL = 3 - IPCTL_DIRECTEDBROADCAST = 9 - IPCTL_FASTFORWARDING = 14 - IPCTL_FORWARDING = 1 - IPCTL_GIF_TTL = 16 - IPCTL_INTRQDROPS = 11 - IPCTL_INTRQMAXLEN = 10 - IPCTL_KEEPFAITH = 15 - IPCTL_MAXID = 17 - IPCTL_RTEXPIRE = 5 - IPCTL_RTMAXCACHE = 7 - IPCTL_RTMINEXPIRE = 6 - IPCTL_SENDREDIRECTS = 2 - IPCTL_SOURCEROUTE = 8 - IPCTL_STATS = 12 - IPPORT_HIFIRSTAUTO = 49152 - IPPORT_HILASTAUTO = 65535 - IPPORT_RESERVED = 1024 - IPPORT_RESERVEDSTART = 600 - IPPORT_USERRESERVED = 5000 - IPPROTO_3PC = 34 - IPPROTO_ADFS = 68 - IPPROTO_AH = 51 - IPPROTO_AHIP = 61 - IPPROTO_APES = 99 - IPPROTO_ARGUS = 13 - IPPROTO_AX25 = 93 - IPPROTO_BHA = 49 - IPPROTO_BLT = 30 - IPPROTO_BRSATMON = 76 - IPPROTO_CFTP = 62 - IPPROTO_CHAOS = 16 - IPPROTO_CMTP = 38 - IPPROTO_CPHB = 73 - IPPROTO_CPNX = 72 - IPPROTO_DDP = 37 - IPPROTO_DGP = 86 - IPPROTO_DIVERT = 254 - IPPROTO_DONE = 257 - IPPROTO_DSTOPTS = 60 - IPPROTO_EGP = 8 - IPPROTO_EMCON = 14 - IPPROTO_ENCAP = 98 - IPPROTO_EON = 80 - IPPROTO_ESP = 50 - IPPROTO_ETHERIP = 97 - IPPROTO_FRAGMENT = 44 - IPPROTO_GGP = 3 - IPPROTO_GMTP = 100 - IPPROTO_GRE = 47 - IPPROTO_HELLO = 63 - IPPROTO_HMP = 20 - IPPROTO_HOPOPTS = 0 - IPPROTO_ICMP = 1 - IPPROTO_ICMPV6 = 58 - IPPROTO_IDP = 22 - IPPROTO_IDPR = 35 - IPPROTO_IDRP = 45 - IPPROTO_IGMP = 2 - IPPROTO_IGP = 85 - IPPROTO_IGRP = 88 - IPPROTO_IL = 40 - IPPROTO_INLSP = 52 - IPPROTO_INP = 32 - IPPROTO_IP = 0 - IPPROTO_IPCOMP = 108 - IPPROTO_IPCV = 71 - IPPROTO_IPEIP = 94 - IPPROTO_IPIP = 4 - IPPROTO_IPPC = 67 - IPPROTO_IPV4 = 4 - IPPROTO_IPV6 = 41 - IPPROTO_IRTP = 28 - IPPROTO_KRYPTOLAN = 65 - IPPROTO_LARP = 91 - IPPROTO_LEAF1 = 25 - IPPROTO_LEAF2 = 26 - IPPROTO_MAX = 256 - IPPROTO_MAXID = 52 - IPPROTO_MEAS = 19 - IPPROTO_MHRP = 48 - IPPROTO_MICP = 95 - IPPROTO_MTP = 92 - IPPROTO_MUX = 18 - IPPROTO_ND = 77 - IPPROTO_NHRP = 54 - IPPROTO_NONE = 59 - IPPROTO_NSP = 31 - IPPROTO_NVPII = 11 - IPPROTO_OSPFIGP = 89 - IPPROTO_PGM = 113 - IPPROTO_PIGP = 9 - IPPROTO_PIM = 103 - IPPROTO_PRM = 21 - IPPROTO_PUP = 12 - IPPROTO_PVP = 75 - IPPROTO_RAW = 255 - IPPROTO_RCCMON = 10 - IPPROTO_RDP = 27 - IPPROTO_ROUTING = 43 - IPPROTO_RSVP = 46 - IPPROTO_RVD = 66 - IPPROTO_SATEXPAK = 64 - IPPROTO_SATMON = 69 - IPPROTO_SCCSP = 96 - IPPROTO_SCTP = 132 - IPPROTO_SDRP = 42 - IPPROTO_SEP = 33 - IPPROTO_SRPC = 90 - IPPROTO_ST = 7 - IPPROTO_SVMTP = 82 - IPPROTO_SWIPE = 53 - IPPROTO_TCF = 87 - IPPROTO_TCP = 6 - IPPROTO_TP = 29 - IPPROTO_TPXX = 39 - IPPROTO_TRUNK1 = 23 - IPPROTO_TRUNK2 = 24 - IPPROTO_TTP = 84 - IPPROTO_UDP = 17 - IPPROTO_VINES = 83 - IPPROTO_VISA = 70 - IPPROTO_VMTP = 81 - IPPROTO_WBEXPAK = 79 - IPPROTO_WBMON = 78 - IPPROTO_WSN = 74 - IPPROTO_XNET = 15 - IPPROTO_XTP = 36 - IPV6CTL_ACCEPT_RTADV = 12 - IPV6CTL_ADDRCTLPOLICY = 38 - IPV6CTL_AUTO_FLOWLABEL = 17 - IPV6CTL_AUTO_LINKLOCAL = 35 - IPV6CTL_DAD_COUNT = 16 - IPV6CTL_DEFHLIM = 3 - IPV6CTL_DEFMCASTHLIM = 18 - IPV6CTL_FORWARDING = 1 - IPV6CTL_FORWSRCRT = 5 - IPV6CTL_GIF_HLIM = 19 - IPV6CTL_HDRNESTLIMIT = 15 - IPV6CTL_KAME_VERSION = 20 - IPV6CTL_KEEPFAITH = 13 - IPV6CTL_LOG_INTERVAL = 14 - IPV6CTL_MAXDYNROUTES = 49 - IPV6CTL_MAXFRAGPACKETS = 9 - IPV6CTL_MAXFRAGS = 41 - IPV6CTL_MAXID = 51 - IPV6CTL_MAXIFDEFROUTERS = 48 - IPV6CTL_MAXIFPREFIXES = 47 - IPV6CTL_MCAST_PMTU = 44 - IPV6CTL_MRTPROTO = 8 - IPV6CTL_MRTSTATS = 7 - IPV6CTL_NEIGHBORGCTHRESH = 46 - IPV6CTL_PREFER_TEMPADDR = 37 - IPV6CTL_RIP6STATS = 36 - IPV6CTL_RR_PRUNE = 22 - IPV6CTL_RTEXPIRE = 25 - IPV6CTL_RTMAXCACHE = 27 - IPV6CTL_RTMINEXPIRE = 26 - IPV6CTL_SENDREDIRECTS = 2 - IPV6CTL_SOURCECHECK = 10 - IPV6CTL_SOURCECHECK_LOGINT = 11 - IPV6CTL_STATS = 6 - IPV6CTL_TEMPPLTIME = 33 - IPV6CTL_TEMPVLTIME = 34 - IPV6CTL_USETEMPADDR = 32 - IPV6CTL_USE_DEFAULTZONE = 39 - IPV6CTL_USE_DEPRECATED = 21 - IPV6CTL_V6ONLY = 24 - IPV6PORT_ANONMAX = 65535 - IPV6PORT_ANONMIN = 49152 - IPV6PORT_RESERVED = 1024 - IPV6PORT_RESERVEDMAX = 1023 - IPV6PORT_RESERVEDMIN = 600 - IPV6PROTO_MAXID = 104 - IPV6_2292DSTOPTS = 23 - IPV6_2292HOPLIMIT = 20 - IPV6_2292HOPOPTS = 22 - IPV6_2292NEXTHOP = 21 - IPV6_2292PKTINFO = 19 - IPV6_2292PKTOPTIONS = 25 - IPV6_2292RTHDR = 24 - IPV6_BINDV6ONLY = 27 - IPV6_BOUND_IF = 125 - IPV6_CHECKSUM = 26 - IPV6_DEFAULT_MULTICAST_HOPS = 1 - IPV6_DEFAULT_MULTICAST_LOOP = 1 - IPV6_FAITH = 29 - IPV6_FW_ADD = 30 - IPV6_FW_DEL = 31 - IPV6_FW_FLUSH = 32 - IPV6_FW_GET = 34 - IPV6_FW_ZERO = 33 - IPV6_IPSEC_POLICY = 28 - IPV6_JOIN_GROUP = 12 - IPV6_LEAVE_GROUP = 13 - IPV6_MAX_GROUP_SRC_FILTER = 512 - IPV6_MAX_MEMBERSHIPS = 4095 - IPV6_MAX_SOCK_SRC_FILTER = 128 - IPV6_MIN_MEMBERSHIPS = 31 - IPV6_MULTICAST_HOPS = 10 - IPV6_MULTICAST_IF = 9 - IPV6_MULTICAST_LOOP = 11 - IPV6_PORTRANGE = 14 - IPV6_PORTRANGE_DEFAULT = 0 - IPV6_PORTRANGE_HIGH = 1 - IPV6_PORTRANGE_LOW = 2 - IPV6_RECVTCLASS = 35 - IPV6_RTHDR_LOOSE = 0 - IPV6_RTHDR_STRICT = 1 - IPV6_RTHDR_TYPE_0 = 0 - IPV6_SOCKOPT_RESERVED1 = 3 - IPV6_TCLASS = 36 - IPV6_UNICAST_HOPS = 4 - IPV6_V6ONLY = 27 - IP_ADD_MEMBERSHIP = 12 - IP_ADD_SOURCE_MEMBERSHIP = 70 - IP_BLOCK_SOURCE = 72 - IP_BOUND_IF = 25 - IP_DEFAULT_MULTICAST_LOOP = 1 - IP_DEFAULT_MULTICAST_TTL = 1 - IP_DROP_MEMBERSHIP = 13 - IP_DROP_SOURCE_MEMBERSHIP = 71 - IP_DUMMYNET_CONFIGURE = 60 - IP_DUMMYNET_DEL = 61 - IP_DUMMYNET_FLUSH = 62 - IP_DUMMYNET_GET = 64 - IP_FAITH = 22 - IP_FW_ADD = 40 - IP_FW_DEL = 41 - IP_FW_FLUSH = 42 - IP_FW_GET = 44 - IP_FW_RESETLOG = 45 - IP_FW_ZERO = 43 - IP_HDRINCL = 2 - IP_IPSEC_POLICY = 21 - IP_MAX_GROUP_SRC_FILTER = 512 - IP_MAX_MEMBERSHIPS = 4095 - IP_MAX_SOCK_MUTE_FILTER = 128 - IP_MAX_SOCK_SRC_FILTER = 128 - IP_MIN_MEMBERSHIPS = 31 - IP_MSFILTER = 74 - IP_MULTICAST_IF = 9 - IP_MULTICAST_IFINDEX = 66 - IP_MULTICAST_LOOP = 11 - IP_MULTICAST_TTL = 10 - IP_MULTICAST_VIF = 14 - IP_NAT__XXX = 55 - IP_OLD_FW_ADD = 50 - IP_OLD_FW_DEL = 51 - IP_OLD_FW_FLUSH = 52 - IP_OLD_FW_GET = 54 - IP_OLD_FW_RESETLOG = 56 - IP_OLD_FW_ZERO = 53 - IP_OPTIONS = 1 - IP_PKTINFO = 26 - IP_PORTRANGE = 19 - IP_PORTRANGE_DEFAULT = 0 - IP_PORTRANGE_HIGH = 1 - IP_PORTRANGE_LOW = 2 - IP_RECVDSTADDR = 7 - IP_RECVIF = 20 - IP_RECVOPTS = 5 - IP_RECVPKTINFO = 26 - IP_RECVRETOPTS = 6 - IP_RECVTOS = 27 - IP_RECVTTL = 24 - IP_RETOPTS = 8 - IP_RSVP_OFF = 16 - IP_RSVP_ON = 15 - IP_RSVP_VIF_OFF = 18 - IP_RSVP_VIF_ON = 17 - IP_STRIPHDR = 23 - IP_TOS = 3 - IP_TRAFFIC_MGT_BACKGROUND = 65 - IP_TTL = 4 - IP_UNBLOCK_SOURCE = 73 - KEV_DL_ADDMULTI = 7 - KEV_DL_AWDL_RESTRICTED = 26 - KEV_DL_AWDL_UNRESTRICTED = 27 - KEV_DL_DELMULTI = 8 - KEV_DL_IFCAP_CHANGED = 19 - KEV_DL_IFDELEGATE_CHANGED = 25 - KEV_DL_IF_ATTACHED = 9 - KEV_DL_IF_DETACHED = 11 - KEV_DL_IF_DETACHING = 10 - KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 - KEV_DL_ISSUES = 24 - KEV_DL_LINK_ADDRESS_CHANGED = 16 - KEV_DL_LINK_OFF = 12 - KEV_DL_LINK_ON = 13 - KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 - KEV_DL_LOW_POWER_MODE_CHANGED = 30 - KEV_DL_MASTER_ELECTED = 23 - KEV_DL_NODE_ABSENCE = 22 - KEV_DL_NODE_PRESENCE = 21 - KEV_DL_PROTO_ATTACHED = 14 - KEV_DL_PROTO_DETACHED = 15 - KEV_DL_QOS_MODE_CHANGED = 29 - KEV_DL_RRC_STATE_CHANGED = 28 - KEV_DL_SIFFLAGS = 1 - KEV_DL_SIFGENERIC = 6 - KEV_DL_SIFMEDIA = 5 - KEV_DL_SIFMETRICS = 2 - KEV_DL_SIFMTU = 3 - KEV_DL_SIFPHYS = 4 - KEV_DL_SUBCLASS = 2 - KEV_DL_WAKEFLAGS_CHANGED = 17 - KEV_INET6_ADDR_DELETED = 3 - KEV_INET6_CHANGED_ADDR = 2 - KEV_INET6_DEFROUTER = 6 - KEV_INET6_NEW_LL_ADDR = 4 - KEV_INET6_NEW_RTADV_ADDR = 5 - KEV_INET6_NEW_USER_ADDR = 1 - KEV_INET6_REQUEST_NAT64_PREFIX = 7 - KEV_INET6_SUBCLASS = 6 - KEV_INET_ADDR_DELETED = 3 - KEV_INET_ARPCOLLISION = 7 - KEV_INET_ARPRTRALIVE = 10 - KEV_INET_ARPRTRFAILURE = 9 - KEV_INET_CHANGED_ADDR = 2 - KEV_INET_NEW_ADDR = 1 - KEV_INET_PORTINUSE = 8 - KEV_INET_SIFBRDADDR = 5 - KEV_INET_SIFDSTADDR = 4 - KEV_INET_SIFNETMASK = 6 - KEV_INET_SUBCLASS = 1 - LITTLE_ENDIAN = 1234 - MCAST_BLOCK_SOURCE = 84 - MCAST_EXCLUDE = 2 - MCAST_INCLUDE = 1 - MCAST_JOIN_GROUP = 80 - MCAST_JOIN_SOURCE_GROUP = 82 - MCAST_LEAVE_GROUP = 81 - MCAST_LEAVE_SOURCE_GROUP = 83 - MCAST_UNBLOCK_SOURCE = 85 - MCAST_UNDEFINED = 0 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - NBBY = 8 - NETDB_INTERNAL = -1 - NETDB_SUCCESS = 0 - NETSVC_MRKNG_LVL_L2 = 1 - NETSVC_MRKNG_LVL_L3L2_ALL = 2 - NETSVC_MRKNG_LVL_L3L2_BK = 3 - NETSVC_MRKNG_UNKNOWN = 0 - NET_MAXID = 40 - NET_RT_DUMP = 1 - NET_RT_DUMP2 = 7 - NET_RT_FLAGS = 2 - NET_RT_FLAGS_PRIV = 10 - NET_RT_IFLIST = 3 - NET_RT_IFLIST2 = 6 - NET_RT_MAXID = 11 - NET_RT_STAT = 4 - NET_RT_TRASH = 5 - NET_SERVICE_TYPE_AV = 6 - NET_SERVICE_TYPE_BE = 0 - NET_SERVICE_TYPE_BK = 1 - NET_SERVICE_TYPE_OAM = 7 - NET_SERVICE_TYPE_RD = 8 - NET_SERVICE_TYPE_RV = 5 - NET_SERVICE_TYPE_SIG = 2 - NET_SERVICE_TYPE_VI = 3 - NET_SERVICE_TYPE_VO = 4 - NI_DGRAM = 0x00000010 - NI_MAXHOST = 1025 - NI_MAXSERV = 32 - NI_NAMEREQD = 0x00000004 - NI_NOFQDN = 0x00000001 - NI_NUMERICHOST = 0x00000002 - NI_NUMERICSCOPE = 0x00000100 - NI_NUMERICSERV = 0x00000008 - NI_WITHSCOPEID = 0x00000020 - NO_ADDRESS = 4 - NO_DATA = 4 - NO_RECOVERY = 3 - PDP_ENDIAN = 3412 - PF_APPLETALK = 16 - PF_CCITT = 10 - PF_CHAOS = 5 - PF_CNT = 21 - PF_COIP = 20 - PF_DATAKIT = 9 - PF_DECnet = 12 - PF_DLI = 13 - PF_ECMA = 8 - PF_HYLINK = 15 - PF_IMPLINK = 3 - PF_INET = 2 - PF_INET6 = 30 - PF_IPX = 23 - PF_ISDN = 28 - PF_ISO = 7 - PF_KEY = 29 - PF_LAT = 14 - PF_LINK = 18 - PF_LOCAL = 1 - PF_MAX = 40 - PF_NATM = 31 - PF_NDRV = 27 - PF_NETBIOS = 33 - PF_NS = 6 - PF_OSI = 7 - PF_PIP = 25 - PF_PPP = 34 - PF_PUP = 4 - PF_RESERVED_36 = 36 - PF_ROUTE = 17 - PF_RTIP = 22 - PF_SIP = 24 - PF_SNA = 11 - PF_SYSTEM = 32 - PF_UNIX = 1 - PF_UNSPEC = 0 - PF_UTUN = 38 - PF_XTP = 19 - PTRDIFF_MAX = 9223372036854775807 - PTRDIFF_MIN = -9223372036854775808 - RSIZE_MAX = 9223372036854775807 - SAE_ASSOCID_ANY = 0 - SAE_CONNID_ANY = 0 - SCM_CREDS = 0x03 - SCM_RIGHTS = 0x01 - SCM_TIMESTAMP = 0x02 - SCM_TIMESTAMP_MONOTONIC = 0x04 - SCOPE_DELIMITER = 37 - SHUT_RD = 0 - SHUT_RDWR = 2 - SHUT_WR = 1 - SIG_ATOMIC_MAX = 2147483647 - SIG_ATOMIC_MIN = -2147483648 - SIN6_LEN = 0 - SIZE_MAX = 18446744073709551615 - SOCK_DGRAM = 2 - SOCK_MAXADDRLEN = 255 - SOCK_RAW = 3 - SOCK_RDM = 4 - SOCK_SEQPACKET = 5 - SOCK_STREAM = 1 - SOL_SOCKET = 0xffff - SOMAXCONN = 128 - SONPX_SETOPTSHUT = 0x000000001 - SO_ACCEPTCONN = 0x0002 - SO_BROADCAST = 0x0020 - SO_DEBUG = 0x0001 - SO_DONTROUTE = 0x0010 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x0008 - SO_LABEL = 0x1010 - SO_LINGER = 0x0080 - SO_LINGER_SEC = 0x1080 - SO_NETSVC_MARKING_LEVEL = 0x1119 - SO_NET_SERVICE_TYPE = 0x1116 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NUMRCVPKT = 0x1112 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x0100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x0004 - SO_REUSEPORT = 0x0200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x0400 - SO_TIMESTAMP_MONOTONIC = 0x0800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x0040 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - TRY_AGAIN = 2 - UINT16_MAX = 65535 - UINT32_MAX = 4294967295 - UINT64_MAX = 18446744073709551615 - UINT8_MAX = 255 - UINTMAX_MAX = 18446744073709551615 - UINTPTR_MAX = 18446744073709551615 - UINT_FAST16_MAX = 65535 - UINT_FAST32_MAX = 4294967295 - UINT_FAST64_MAX = 18446744073709551615 - UINT_FAST8_MAX = 255 - UINT_LEAST16_MAX = 65535 - UINT_LEAST32_MAX = 4294967295 - UINT_LEAST64_MAX = 18446744073709551615 - UINT_LEAST8_MAX = 255 - WCHAR_MAX = 2147483647 - WCHAR_MIN = -2147483648 - WINT_MAX = 2147483647 - WINT_MIN = -2147483648 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_I386__PARAM_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NETDB_H_ = 0 - X_NETINET6_IN6_H_ = 0 - X_NETINET_IN_H_ = 0 - X_NET_NETKEV_H_ = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PATH_HEQUIV = "/etc/hosts.equiv" - X_PATH_HOSTS = "/etc/hosts" - X_PATH_NETWORKS = "/etc/networks" - X_PATH_PROTOCOLS = "/etc/protocols" - X_PATH_SERVICES = "/etc/services" - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SA_FAMILY_T = 0 - X_SIZE_T = 0 - X_SOCKLEN_T = 0 - X_SSIZE_T = 0 - X_SS_MAXSIZE = 128 - X_STRUCT_IOVEC = 0 - X_SUSECONDS_T = 0 - X_SYS_SOCKET_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 - Pseudo_AF_HDRCMPLT = 35 - Pseudo_AF_KEY = 29 - Pseudo_AF_PIP = 25 - Pseudo_AF_RTIP = 22 - Pseudo_AF_XTP = 19 + AF_APPLETALK = 16 // socket.h:375:1: + AF_CCITT = 10 // socket.h:369:1: + AF_CHAOS = 5 // socket.h:363:1: + AF_CNT = 21 // socket.h:380:1: + AF_COIP = 20 // socket.h:379:1: + AF_DATAKIT = 9 // socket.h:368:1: + AF_DECnet = 12 // socket.h:371:1: + AF_DLI = 13 // socket.h:372:1: + AF_E164 = 28 // socket.h:387:1: + AF_ECMA = 8 // socket.h:367:1: + AF_HYLINK = 15 // socket.h:374:1: + AF_IEEE80211 = 37 // socket.h:399:1: + AF_IMPLINK = 3 // socket.h:361:1: + AF_INET = 2 // socket.h:359:1: + AF_INET6 = 30 // socket.h:390:1: + AF_IPX = 23 // socket.h:382:1: + AF_ISDN = 28 // socket.h:386:1: + AF_ISO = 7 // socket.h:365:1: + AF_LAT = 14 // socket.h:373:1: + AF_LINK = 18 // socket.h:377:1: + AF_LOCAL = 1 // socket.h:357:1: + AF_MAX = 40 // socket.h:401:1: + AF_NATM = 31 // socket.h:392:1: + AF_NDRV = 27 // socket.h:385:1: + AF_NETBIOS = 33 // socket.h:394:1: + AF_NS = 6 // socket.h:364:1: + AF_OSI = 7 // socket.h:366:1: + AF_PPP = 34 // socket.h:395:1: + AF_PUP = 4 // socket.h:362:1: + AF_RESERVED_36 = 36 // socket.h:398:1: + AF_ROUTE = 17 // socket.h:376:1: + AF_SIP = 24 // socket.h:383:1: + AF_SNA = 11 // socket.h:370:1: + AF_SYSTEM = 32 // socket.h:393:1: + AF_UNIX = 1 // socket.h:355:1: + AF_UNSPEC = 0 // socket.h:354:1: + AF_UTUN = 38 // socket.h:400:1: + AI_ADDRCONFIG = 0x00000400 // netdb.h:226:1: + AI_ALL = 0x00000100 // netdb.h:222:1: + AI_CANONNAME = 0x00000002 // netdb.h:212:1: + AI_DEFAULT = 1536 // netdb.h:230:1: + AI_MASK = 5127 // netdb.h:217:1: + AI_NUMERICHOST = 0x00000004 // netdb.h:213:1: + AI_NUMERICSERV = 0x00001000 // netdb.h:214:1: + AI_PASSIVE = 0x00000001 // netdb.h:211:1: + AI_UNUSABLE = 0x10000000 // netdb.h:234:1: + AI_V4MAPPED = 0x00000800 // netdb.h:227:1: + AI_V4MAPPED_CFG = 0x00000200 // netdb.h:224:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CONNECT_DATA_AUTHENTICATED = 0x4 // socket.h:300:1: + CONNECT_DATA_IDEMPOTENT = 0x2 // socket.h:299:1: + CONNECT_RESUME_ON_READ_WRITE = 0x1 // socket.h:298:1: + EAI_ADDRFAMILY = 1 // netdb.h:185:1: + EAI_AGAIN = 2 // netdb.h:187:1: + EAI_BADFLAGS = 3 // netdb.h:188:1: + EAI_BADHINTS = 12 // netdb.h:200:1: + EAI_FAIL = 4 // netdb.h:189:1: + EAI_FAMILY = 5 // netdb.h:190:1: + EAI_MAX = 15 // netdb.h:205:1: + EAI_MEMORY = 6 // netdb.h:191:1: + EAI_NODATA = 7 // netdb.h:193:1: + EAI_NONAME = 8 // netdb.h:195:1: + EAI_OVERFLOW = 14 // netdb.h:203:1: + EAI_PROTOCOL = 13 // netdb.h:201:1: + EAI_SERVICE = 9 // netdb.h:196:1: + EAI_SOCKTYPE = 10 // netdb.h:197:1: + EAI_SYSTEM = 11 // netdb.h:198:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + HOST_NOT_FOUND = 1 // netdb.h:174:1: + ICMP6_FILTER = 18 // in6.h:380:1: + ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 // in6.h:615:1: + INADDR_NONE = 0xffffffff // in.h:342:1: + INET6_ADDRSTRLEN = 46 // in6.h:161:1: + INET_ADDRSTRLEN = 16 // in.h:388:1: + INT16_MAX = 32767 // stdint.h:599:1: + INT16_MIN = -32768 // stdint.h:600:1: + INT32_MAX = 2147483647 // stdint.h:555:1: + INT32_MIN = -2147483648 // stdint.h:556:1: + INT64_MAX = 9223372036854775807 // stdint.h:461:1: + INT64_MIN = -9223372036854775808 // stdint.h:462:1: + INT8_MAX = 127 // stdint.h:621:1: + INT8_MIN = -128 // stdint.h:622:1: + INTMAX_MAX = 9223372036854775807 // stdint.h:663:1: + INTMAX_MIN = -9223372036854775808 // stdint.h:662:1: + INTPTR_MAX = 9223372036854775807 // stdint.h:649:1: + INTPTR_MIN = -9223372036854775808 // stdint.h:648:1: + INT_FAST16_MAX = 32767 // stdint.h:615:1: + INT_FAST16_MIN = -32768 // stdint.h:614:1: + INT_FAST32_MAX = 2147483647 // stdint.h:574:1: + INT_FAST32_MIN = -2147483648 // stdint.h:573:1: + INT_FAST64_MAX = 9223372036854775807 // stdint.h:483:1: + INT_FAST64_MIN = -9223372036854775808 // stdint.h:482:1: + INT_FAST8_MAX = 127 // stdint.h:634:1: + INT_FAST8_MIN = -128 // stdint.h:633:1: + INT_LEAST16_MAX = 32767 // stdint.h:612:1: + INT_LEAST16_MIN = -32768 // stdint.h:611:1: + INT_LEAST32_MAX = 2147483647 // stdint.h:571:1: + INT_LEAST32_MIN = -2147483648 // stdint.h:570:1: + INT_LEAST64_MAX = 9223372036854775807 // stdint.h:480:1: + INT_LEAST64_MIN = -9223372036854775808 // stdint.h:479:1: + INT_LEAST8_MAX = 127 // stdint.h:631:1: + INT_LEAST8_MIN = -128 // stdint.h:630:1: + IN_CLASSA_HOST = 0x00ffffff // in.h:317:1: + IN_CLASSA_MAX = 128 // in.h:318:1: + IN_CLASSA_NET = 0xff000000 // in.h:315:1: + IN_CLASSA_NSHIFT = 24 // in.h:316:1: + IN_CLASSB_HOST = 0x0000ffff // in.h:323:1: + IN_CLASSB_MAX = 65536 // in.h:324:1: + IN_CLASSB_NET = 0xffff0000 // in.h:321:1: + IN_CLASSB_NSHIFT = 16 // in.h:322:1: + IN_CLASSC_HOST = 0x000000ff // in.h:329:1: + IN_CLASSC_NET = 0xffffff00 // in.h:327:1: + IN_CLASSC_NSHIFT = 8 // in.h:328:1: + IN_CLASSD_HOST = 0x0fffffff // in.h:334:1: + IN_CLASSD_NET = 0xf0000000 // in.h:332:1: + IN_CLASSD_NSHIFT = 28 // in.h:333:1: + IN_LOOPBACKNET = 127 // in.h:369:1: + IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:649:1: + IPCTL_DEFTTL = 3 // in.h:637:1: + IPCTL_DIRECTEDBROADCAST = 9 // in.h:645:1: + IPCTL_FASTFORWARDING = 14 // in.h:650:1: + IPCTL_FORWARDING = 1 // in.h:635:1: + IPCTL_GIF_TTL = 16 // in.h:652:1: + IPCTL_INTRQDROPS = 11 // in.h:647:1: + IPCTL_INTRQMAXLEN = 10 // in.h:646:1: + IPCTL_KEEPFAITH = 15 // in.h:651:1: + IPCTL_MAXID = 17 // in.h:653:1: + IPCTL_RTEXPIRE = 5 // in.h:641:1: + IPCTL_RTMAXCACHE = 7 // in.h:643:1: + IPCTL_RTMINEXPIRE = 6 // in.h:642:1: + IPCTL_SENDREDIRECTS = 2 // in.h:636:1: + IPCTL_SOURCEROUTE = 8 // in.h:644:1: + IPCTL_STATS = 12 // in.h:648:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:286:1: + IPPORT_HILASTAUTO = 65535 // in.h:287:1: + IPPORT_RESERVED = 1024 // in.h:279:1: + IPPORT_RESERVEDSTART = 600 // in.h:295:1: + IPPORT_USERRESERVED = 5000 // in.h:281:1: + IPPROTO_3PC = 34 // in.h:139:1: + IPPROTO_ADFS = 68 // in.h:173:1: + IPPROTO_AH = 51 // in.h:158:1: + IPPROTO_AHIP = 61 // in.h:166:1: + IPPROTO_APES = 99 // in.h:204:1: + IPPROTO_ARGUS = 13 // in.h:116:1: + IPPROTO_AX25 = 93 // in.h:198:1: + IPPROTO_BHA = 49 // in.h:156:1: + IPPROTO_BLT = 30 // in.h:135:1: + IPPROTO_BRSATMON = 76 // in.h:181:1: + IPPROTO_CFTP = 62 // in.h:167:1: + IPPROTO_CHAOS = 16 // in.h:119:1: + IPPROTO_CMTP = 38 // in.h:143:1: + IPPROTO_CPHB = 73 // in.h:178:1: + IPPROTO_CPNX = 72 // in.h:177:1: + IPPROTO_DDP = 37 // in.h:142:1: + IPPROTO_DGP = 86 // in.h:191:1: + IPPROTO_DIVERT = 254 // in.h:213:1: + IPPROTO_DONE = 257 // in.h:221:1: + IPPROTO_DSTOPTS = 60 // in.h:165:1: + IPPROTO_EGP = 8 // in.h:111:1: + IPPROTO_EMCON = 14 // in.h:117:1: + IPPROTO_ENCAP = 98 // in.h:203:1: + IPPROTO_EON = 80 // in.h:185:1: + IPPROTO_ESP = 50 // in.h:157:1: + IPPROTO_ETHERIP = 97 // in.h:202:1: + IPPROTO_FRAGMENT = 44 // in.h:151:1: + IPPROTO_GGP = 3 // in.h:104:1: + IPPROTO_GMTP = 100 // in.h:205:1: + IPPROTO_GRE = 47 // in.h:154:1: + IPPROTO_HELLO = 63 // in.h:168:1: + IPPROTO_HMP = 20 // in.h:125:1: + IPPROTO_HOPOPTS = 0 // in.h:99:1: + IPPROTO_ICMP = 1 // in.h:101:1: + IPPROTO_ICMPV6 = 58 // in.h:163:1: + IPPROTO_IDP = 22 // in.h:127:1: + IPPROTO_IDPR = 35 // in.h:140:1: + IPPROTO_IDRP = 45 // in.h:152:1: + IPPROTO_IGMP = 2 // in.h:103:1: + IPPROTO_IGP = 85 // in.h:190:1: + IPPROTO_IGRP = 88 // in.h:193:1: + IPPROTO_IL = 40 // in.h:145:1: + IPPROTO_INLSP = 52 // in.h:159:1: + IPPROTO_INP = 32 // in.h:137:1: + IPPROTO_IP = 0 // in.h:97:1: + IPPROTO_IPCOMP = 108 // in.h:208:1: + IPPROTO_IPCV = 71 // in.h:176:1: + IPPROTO_IPEIP = 94 // in.h:199:1: + IPPROTO_IPIP = 4 // in.h:106:1: + IPPROTO_IPPC = 67 // in.h:172:1: + IPPROTO_IPV4 = 4 // in.h:105:1: + IPPROTO_IPV6 = 41 // in.h:147:1: + IPPROTO_IRTP = 28 // in.h:133:1: + IPPROTO_KRYPTOLAN = 65 // in.h:170:1: + IPPROTO_LARP = 91 // in.h:196:1: + IPPROTO_LEAF1 = 25 // in.h:130:1: + IPPROTO_LEAF2 = 26 // in.h:131:1: + IPPROTO_MAX = 256 // in.h:218:1: + IPPROTO_MAXID = 52 // in.h:629:1: + IPPROTO_MEAS = 19 // in.h:124:1: + IPPROTO_MHRP = 48 // in.h:155:1: + IPPROTO_MICP = 95 // in.h:200:1: + IPPROTO_MTP = 92 // in.h:197:1: + IPPROTO_MUX = 18 // in.h:123:1: + IPPROTO_ND = 77 // in.h:182:1: + IPPROTO_NHRP = 54 // in.h:161:1: + IPPROTO_NONE = 59 // in.h:164:1: + IPPROTO_NSP = 31 // in.h:136:1: + IPPROTO_NVPII = 11 // in.h:114:1: + IPPROTO_OSPFIGP = 89 // in.h:194:1: + IPPROTO_PGM = 113 // in.h:209:1: + IPPROTO_PIGP = 9 // in.h:112:1: + IPPROTO_PIM = 103 // in.h:207:1: + IPPROTO_PRM = 21 // in.h:126:1: + IPPROTO_PUP = 12 // in.h:115:1: + IPPROTO_PVP = 75 // in.h:180:1: + IPPROTO_RAW = 255 // in.h:215:1: + IPPROTO_RCCMON = 10 // in.h:113:1: + IPPROTO_RDP = 27 // in.h:132:1: + IPPROTO_ROUTING = 43 // in.h:150:1: + IPPROTO_RSVP = 46 // in.h:153:1: + IPPROTO_RVD = 66 // in.h:171:1: + IPPROTO_SATEXPAK = 64 // in.h:169:1: + IPPROTO_SATMON = 69 // in.h:174:1: + IPPROTO_SCCSP = 96 // in.h:201:1: + IPPROTO_SCTP = 132 // in.h:210:1: + IPPROTO_SDRP = 42 // in.h:149:1: + IPPROTO_SEP = 33 // in.h:138:1: + IPPROTO_SRPC = 90 // in.h:195:1: + IPPROTO_ST = 7 // in.h:110:1: + IPPROTO_SVMTP = 82 // in.h:187:1: + IPPROTO_SWIPE = 53 // in.h:160:1: + IPPROTO_TCF = 87 // in.h:192:1: + IPPROTO_TCP = 6 // in.h:108:1: + IPPROTO_TP = 29 // in.h:134:1: + IPPROTO_TPXX = 39 // in.h:144:1: + IPPROTO_TRUNK1 = 23 // in.h:128:1: + IPPROTO_TRUNK2 = 24 // in.h:129:1: + IPPROTO_TTP = 84 // in.h:189:1: + IPPROTO_UDP = 17 // in.h:121:1: + IPPROTO_VINES = 83 // in.h:188:1: + IPPROTO_VISA = 70 // in.h:175:1: + IPPROTO_VMTP = 81 // in.h:186:1: + IPPROTO_WBEXPAK = 79 // in.h:184:1: + IPPROTO_WBMON = 78 // in.h:183:1: + IPPROTO_WSN = 74 // in.h:179:1: + IPPROTO_XNET = 15 // in.h:118:1: + IPPROTO_XTP = 36 // in.h:141:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:580:1: + IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:605:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:585:1: + IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:602:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:584:1: + IPV6CTL_DEFHLIM = 3 // in6.h:569:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:586:1: + IPV6CTL_FORWARDING = 1 // in6.h:567:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:573:1: + IPV6CTL_GIF_HLIM = 19 // in6.h:587:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:583:1: + IPV6CTL_KAME_VERSION = 20 // in6.h:588:1: + IPV6CTL_KEEPFAITH = 13 // in6.h:581:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:582:1: + IPV6CTL_MAXDYNROUTES = 49 // in6.h:614:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:577:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:608:1: + IPV6CTL_MAXID = 51 // in6.h:619:1: + IPV6CTL_MAXIFDEFROUTERS = 48 // in6.h:613:1: + IPV6CTL_MAXIFPREFIXES = 47 // in6.h:612:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:609:1: + IPV6CTL_MRTPROTO = 8 // in6.h:576:1: + IPV6CTL_MRTSTATS = 7 // in6.h:575:1: + IPV6CTL_NEIGHBORGCTHRESH = 46 // in6.h:611:1: + IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:604:1: + IPV6CTL_RIP6STATS = 36 // in6.h:603:1: + IPV6CTL_RR_PRUNE = 22 // in6.h:590:1: + IPV6CTL_RTEXPIRE = 25 // in6.h:595:1: + IPV6CTL_RTMAXCACHE = 27 // in6.h:597:1: + IPV6CTL_RTMINEXPIRE = 26 // in6.h:596:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:568:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:578:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:579:1: + IPV6CTL_STATS = 6 // in6.h:574:1: + IPV6CTL_TEMPPLTIME = 33 // in6.h:600:1: + IPV6CTL_TEMPVLTIME = 34 // in6.h:601:1: + IPV6CTL_USETEMPADDR = 32 // in6.h:599:1: + IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:606:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:589:1: + IPV6CTL_V6ONLY = 24 // in6.h:594:1: + IPV6PORT_ANONMAX = 65535 // in6.h:143:1: + IPV6PORT_ANONMIN = 49152 // in6.h:142:1: + IPV6PORT_RESERVED = 1024 // in6.h:141:1: + IPV6PORT_RESERVEDMAX = 1023 // in6.h:145:1: + IPV6PORT_RESERVEDMIN = 600 // in6.h:144:1: + IPV6PROTO_MAXID = 104 // in6.h:562:1: + IPV6_2292DSTOPTS = 23 // in6.h:385:1: + IPV6_2292HOPLIMIT = 20 // in6.h:382:1: + IPV6_2292HOPOPTS = 22 // in6.h:384:1: + IPV6_2292NEXTHOP = 21 // in6.h:383:1: + IPV6_2292PKTINFO = 19 // in6.h:381:1: + IPV6_2292PKTOPTIONS = 25 // in6.h:389:1: + IPV6_2292RTHDR = 24 // in6.h:386:1: + IPV6_BINDV6ONLY = 27 // in6.h:405:1: + IPV6_BOUND_IF = 125 // in6.h:494:1: + IPV6_CHECKSUM = 26 // in6.h:401:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:506:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:507:1: + IPV6_FAITH = 29 // in6.h:411:1: + IPV6_FW_ADD = 30 // in6.h:414:1: + IPV6_FW_DEL = 31 // in6.h:415:1: + IPV6_FW_FLUSH = 32 // in6.h:416:1: + IPV6_FW_GET = 34 // in6.h:418:1: + IPV6_FW_ZERO = 33 // in6.h:417:1: + IPV6_IPSEC_POLICY = 28 // in6.h:409:1: + IPV6_JOIN_GROUP = 12 // in6.h:375:1: + IPV6_LEAVE_GROUP = 13 // in6.h:376:1: + IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:521:1: + IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:515:1: + IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:522:1: + IPV6_MIN_MEMBERSHIPS = 31 // in6.h:514:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:373:1: + IPV6_MULTICAST_IF = 9 // in6.h:372:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:374:1: + IPV6_PORTRANGE = 14 // in6.h:379:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:552:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:553:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:554:1: + IPV6_RECVTCLASS = 35 // in6.h:426:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:499:1: + IPV6_RTHDR_STRICT = 1 // in6.h:500:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:501:1: + IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:369:1: + IPV6_TCLASS = 36 // in6.h:427:1: + IPV6_UNICAST_HOPS = 4 // in6.h:371:1: + IPV6_V6ONLY = 27 // in6.h:403:1: + IP_ADD_MEMBERSHIP = 12 // in.h:418:1: + IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:464:1: + IP_BLOCK_SOURCE = 72 // in.h:466:1: + IP_BOUND_IF = 25 // in.h:434:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:485:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:484:1: + IP_DROP_MEMBERSHIP = 13 // in.h:419:1: + IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:465:1: + IP_DUMMYNET_CONFIGURE = 60 // in.h:455:1: + IP_DUMMYNET_DEL = 61 // in.h:456:1: + IP_DUMMYNET_FLUSH = 62 // in.h:457:1: + IP_DUMMYNET_GET = 64 // in.h:458:1: + IP_FAITH = 22 // in.h:429:1: + IP_FW_ADD = 40 // in.h:439:1: + IP_FW_DEL = 41 // in.h:440:1: + IP_FW_FLUSH = 42 // in.h:441:1: + IP_FW_GET = 44 // in.h:443:1: + IP_FW_RESETLOG = 45 // in.h:444:1: + IP_FW_ZERO = 43 // in.h:442:1: + IP_HDRINCL = 2 // in.h:408:1: + IP_IPSEC_POLICY = 21 // in.h:428:1: + IP_MAX_GROUP_SRC_FILTER = 512 // in.h:499:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:493:1: + IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:501:1: + IP_MAX_SOCK_SRC_FILTER = 128 // in.h:500:1: + IP_MIN_MEMBERSHIPS = 31 // in.h:492:1: + IP_MSFILTER = 74 // in.h:470:1: + IP_MULTICAST_IF = 9 // in.h:415:1: + IP_MULTICAST_IFINDEX = 66 // in.h:461:1: + IP_MULTICAST_LOOP = 11 // in.h:417:1: + IP_MULTICAST_TTL = 10 // in.h:416:1: + IP_MULTICAST_VIF = 14 // in.h:420:1: + IP_NAT__XXX = 55 // in.h:452:1: + IP_OLD_FW_ADD = 50 // in.h:447:1: + IP_OLD_FW_DEL = 51 // in.h:448:1: + IP_OLD_FW_FLUSH = 52 // in.h:449:1: + IP_OLD_FW_GET = 54 // in.h:451:1: + IP_OLD_FW_RESETLOG = 56 // in.h:453:1: + IP_OLD_FW_ZERO = 53 // in.h:450:1: + IP_OPTIONS = 1 // in.h:407:1: + IP_PKTINFO = 26 // in.h:435:1: + IP_PORTRANGE = 19 // in.h:425:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:593:1: + IP_PORTRANGE_HIGH = 1 // in.h:594:1: + IP_PORTRANGE_LOW = 2 // in.h:595:1: + IP_RECVDSTADDR = 7 // in.h:413:1: + IP_RECVIF = 20 // in.h:426:1: + IP_RECVOPTS = 5 // in.h:411:1: + IP_RECVPKTINFO = 26 // in.h:436:1: + IP_RECVRETOPTS = 6 // in.h:412:1: + IP_RECVTOS = 27 // in.h:437:1: + IP_RECVTTL = 24 // in.h:433:1: + IP_RETOPTS = 8 // in.h:414:1: + IP_RSVP_OFF = 16 // in.h:422:1: + IP_RSVP_ON = 15 // in.h:421:1: + IP_RSVP_VIF_OFF = 18 // in.h:424:1: + IP_RSVP_VIF_ON = 17 // in.h:423:1: + IP_STRIPHDR = 23 // in.h:431:1: + IP_TOS = 3 // in.h:409:1: + IP_TRAFFIC_MGT_BACKGROUND = 65 // in.h:460:1: + IP_TTL = 4 // in.h:410:1: + IP_UNBLOCK_SOURCE = 73 // in.h:467:1: + KEV_DL_ADDMULTI = 7 // net_kev.h:61:1: + KEV_DL_AWDL_RESTRICTED = 26 // net_kev.h:80:1: + KEV_DL_AWDL_UNRESTRICTED = 27 // net_kev.h:81:1: + KEV_DL_DELMULTI = 8 // net_kev.h:62:1: + KEV_DL_IFCAP_CHANGED = 19 // net_kev.h:73:1: + KEV_DL_IFDELEGATE_CHANGED = 25 // net_kev.h:79:1: + KEV_DL_IF_ATTACHED = 9 // net_kev.h:63:1: + KEV_DL_IF_DETACHED = 11 // net_kev.h:65:1: + KEV_DL_IF_DETACHING = 10 // net_kev.h:64:1: + KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 // net_kev.h:72:1: + KEV_DL_ISSUES = 24 // net_kev.h:78:1: + KEV_DL_LINK_ADDRESS_CHANGED = 16 // net_kev.h:70:1: + KEV_DL_LINK_OFF = 12 // net_kev.h:66:1: + KEV_DL_LINK_ON = 13 // net_kev.h:67:1: + KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 // net_kev.h:74:1: + KEV_DL_LOW_POWER_MODE_CHANGED = 30 // net_kev.h:84:1: + KEV_DL_MASTER_ELECTED = 23 // net_kev.h:77:1: + KEV_DL_NODE_ABSENCE = 22 // net_kev.h:76:1: + KEV_DL_NODE_PRESENCE = 21 // net_kev.h:75:1: + KEV_DL_PROTO_ATTACHED = 14 // net_kev.h:68:1: + KEV_DL_PROTO_DETACHED = 15 // net_kev.h:69:1: + KEV_DL_QOS_MODE_CHANGED = 29 // net_kev.h:83:1: + KEV_DL_RRC_STATE_CHANGED = 28 // net_kev.h:82:1: + KEV_DL_SIFFLAGS = 1 // net_kev.h:55:1: + KEV_DL_SIFGENERIC = 6 // net_kev.h:60:1: + KEV_DL_SIFMEDIA = 5 // net_kev.h:59:1: + KEV_DL_SIFMETRICS = 2 // net_kev.h:56:1: + KEV_DL_SIFMTU = 3 // net_kev.h:57:1: + KEV_DL_SIFPHYS = 4 // net_kev.h:58:1: + KEV_DL_SUBCLASS = 2 // net_kev.h:50:1: + KEV_DL_WAKEFLAGS_CHANGED = 17 // net_kev.h:71:1: + KEV_INET6_ADDR_DELETED = 3 // net_kev.h:91:1: + KEV_INET6_CHANGED_ADDR = 2 // net_kev.h:90:1: + KEV_INET6_DEFROUTER = 6 // net_kev.h:94:1: + KEV_INET6_NEW_LL_ADDR = 4 // net_kev.h:92:1: + KEV_INET6_NEW_RTADV_ADDR = 5 // net_kev.h:93:1: + KEV_INET6_NEW_USER_ADDR = 1 // net_kev.h:89:1: + KEV_INET6_REQUEST_NAT64_PREFIX = 7 // net_kev.h:95:1: + KEV_INET6_SUBCLASS = 6 // net_kev.h:87:1: + KEV_INET_ADDR_DELETED = 3 // net_kev.h:39:1: + KEV_INET_ARPCOLLISION = 7 // net_kev.h:43:1: + KEV_INET_ARPRTRALIVE = 10 // net_kev.h:48:1: + KEV_INET_ARPRTRFAILURE = 9 // net_kev.h:47:1: + KEV_INET_CHANGED_ADDR = 2 // net_kev.h:38:1: + KEV_INET_NEW_ADDR = 1 // net_kev.h:37:1: + KEV_INET_PORTINUSE = 8 // net_kev.h:45:1: + KEV_INET_SIFBRDADDR = 5 // net_kev.h:41:1: + KEV_INET_SIFDSTADDR = 4 // net_kev.h:40:1: + KEV_INET_SIFNETMASK = 6 // net_kev.h:42:1: + KEV_INET_SUBCLASS = 1 // net_kev.h:35:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MCAST_BLOCK_SOURCE = 84 // in.h:477:1: + MCAST_EXCLUDE = 2 // in.h:587:1: + MCAST_INCLUDE = 1 // in.h:586:1: + MCAST_JOIN_GROUP = 80 // in.h:473:1: + MCAST_JOIN_SOURCE_GROUP = 82 // in.h:475:1: + MCAST_LEAVE_GROUP = 81 // in.h:474:1: + MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:476:1: + MCAST_UNBLOCK_SOURCE = 85 // in.h:478:1: + MCAST_UNDEFINED = 0 // in.h:585:1: + MSG_CTRUNC = 0x20 // socket.h:563:1: + MSG_DONTROUTE = 0x4 // socket.h:560:1: + MSG_DONTWAIT = 0x80 // socket.h:566:1: + MSG_EOF = 0x100 // socket.h:567:1: + MSG_EOR = 0x8 // socket.h:561:1: + MSG_FLUSH = 0x400 // socket.h:572:1: + MSG_HAVEMORE = 0x2000 // socket.h:575:1: + MSG_HOLD = 0x800 // socket.h:573:1: + MSG_NEEDSA = 0x10000 // socket.h:578:1: + MSG_OOB = 0x1 // socket.h:558:1: + MSG_PEEK = 0x2 // socket.h:559:1: + MSG_RCVMORE = 0x4000 // socket.h:576:1: + MSG_SEND = 0x1000 // socket.h:574:1: + MSG_TRUNC = 0x10 // socket.h:562:1: + MSG_WAITALL = 0x40 // socket.h:564:1: + MSG_WAITSTREAM = 0x200 // socket.h:570:1: + NBBY = 8 // types.h:186:1: + NETDB_INTERNAL = -1 // netdb.h:171:1: + NETDB_SUCCESS = 0 // netdb.h:172:1: + NETSVC_MRKNG_LVL_L2 = 1 // socket.h:283:1: + NETSVC_MRKNG_LVL_L3L2_ALL = 2 // socket.h:284:1: + NETSVC_MRKNG_LVL_L3L2_BK = 3 // socket.h:285:1: + NETSVC_MRKNG_UNKNOWN = 0 // socket.h:282:1: + NET_MAXID = 40 // socket.h:506:1: + NET_RT_DUMP = 1 // socket.h:519:1: + NET_RT_DUMP2 = 7 // socket.h:525:1: + NET_RT_FLAGS = 2 // socket.h:520:1: + NET_RT_FLAGS_PRIV = 10 // socket.h:530:1: + NET_RT_IFLIST = 3 // socket.h:521:1: + NET_RT_IFLIST2 = 6 // socket.h:524:1: + NET_RT_MAXID = 11 // socket.h:531:1: + NET_RT_STAT = 4 // socket.h:522:1: + NET_RT_TRASH = 5 // socket.h:523:1: + NET_SERVICE_TYPE_AV = 6 // socket.h:276:1: + NET_SERVICE_TYPE_BE = 0 // socket.h:270:1: + NET_SERVICE_TYPE_BK = 1 // socket.h:271:1: + NET_SERVICE_TYPE_OAM = 7 // socket.h:277:1: + NET_SERVICE_TYPE_RD = 8 // socket.h:278:1: + NET_SERVICE_TYPE_RV = 5 // socket.h:275:1: + NET_SERVICE_TYPE_SIG = 2 // socket.h:272:1: + NET_SERVICE_TYPE_VI = 3 // socket.h:273:1: + NET_SERVICE_TYPE_VO = 4 // socket.h:274:1: + NI_DGRAM = 0x00000010 // netdb.h:252:1: + NI_MAXHOST = 1025 // netdb.h:241:1: + NI_MAXSERV = 32 // netdb.h:242:1: + NI_NAMEREQD = 0x00000004 // netdb.h:249:1: + NI_NOFQDN = 0x00000001 // netdb.h:247:1: + NI_NUMERICHOST = 0x00000002 // netdb.h:248:1: + NI_NUMERICSCOPE = 0x00000100 // netdb.h:251:1: + NI_NUMERICSERV = 0x00000008 // netdb.h:250:1: + NI_WITHSCOPEID = 0x00000020 // netdb.h:254:1: + NO_ADDRESS = 4 // netdb.h:179:1: + NO_DATA = 4 // netdb.h:177:1: + NO_RECOVERY = 3 // netdb.h:176:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + PF_APPLETALK = 16 // socket.h:469:1: + PF_CCITT = 10 // socket.h:463:1: + PF_CHAOS = 5 // socket.h:457:1: + PF_CNT = 21 // socket.h:474:1: + PF_COIP = 20 // socket.h:473:1: + PF_DATAKIT = 9 // socket.h:462:1: + PF_DECnet = 12 // socket.h:465:1: + PF_DLI = 13 // socket.h:466:1: + PF_ECMA = 8 // socket.h:461:1: + PF_HYLINK = 15 // socket.h:468:1: + PF_IMPLINK = 3 // socket.h:455:1: + PF_INET = 2 // socket.h:454:1: + PF_INET6 = 30 // socket.h:482:1: + PF_IPX = 23 // socket.h:476:1: + PF_ISDN = 28 // socket.h:480:1: + PF_ISO = 7 // socket.h:459:1: + PF_KEY = 29 // socket.h:481:1: + PF_LAT = 14 // socket.h:467:1: + PF_LINK = 18 // socket.h:471:1: + PF_LOCAL = 1 // socket.h:452:1: + PF_MAX = 40 // socket.h:489:1: + PF_NATM = 31 // socket.h:483:1: + PF_NDRV = 27 // socket.h:479:1: + PF_NETBIOS = 33 // socket.h:485:1: + PF_NS = 6 // socket.h:458:1: + PF_OSI = 7 // socket.h:460:1: + PF_PIP = 25 // socket.h:478:1: + PF_PPP = 34 // socket.h:486:1: + PF_PUP = 4 // socket.h:456:1: + PF_RESERVED_36 = 36 // socket.h:487:1: + PF_ROUTE = 17 // socket.h:470:1: + PF_RTIP = 22 // socket.h:477:1: + PF_SIP = 24 // socket.h:475:1: + PF_SNA = 11 // socket.h:464:1: + PF_SYSTEM = 32 // socket.h:484:1: + PF_UNIX = 1 // socket.h:453:1: + PF_UNSPEC = 0 // socket.h:451:1: + PF_UTUN = 38 // socket.h:488:1: + PF_XTP = 19 // socket.h:472:1: + PTRDIFF_MAX = 9223372036854775807 // stdint.h:652:1: + PTRDIFF_MIN = -9223372036854775808 // stdint.h:651:1: + RSIZE_MAX = 9223372036854775807 // stdint.h:658:1: + SAE_ASSOCID_ANY = 0 // socket.h:290:1: + SAE_CONNID_ANY = 0 // socket.h:294:1: + SCM_CREDS = 0x03 // socket.h:661:1: + SCM_RIGHTS = 0x01 // socket.h:658:1: + SCM_TIMESTAMP = 0x02 // socket.h:660:1: + SCM_TIMESTAMP_MONOTONIC = 0x04 // socket.h:662:1: + SCOPE_DELIMITER = 37 // netdb.h:259:1: + SHUT_RD = 0 // socket.h:670:1: + SHUT_RDWR = 2 // socket.h:672:1: + SHUT_WR = 1 // socket.h:671:1: + SIG_ATOMIC_MAX = 2147483647 // stdint.h:668:1: + SIG_ATOMIC_MIN = -2147483648 // stdint.h:667:1: + SIN6_LEN = 0 // in6.h:167:1: + SIZE_MAX = 18446744073709551615 // stdint.h:653:1: + SOCK_DGRAM = 2 // socket.h:112:1: + SOCK_MAXADDRLEN = 255 // socket.h:414:1: + SOCK_RAW = 3 // socket.h:113:1: + SOCK_RDM = 4 // socket.h:115:1: + SOCK_SEQPACKET = 5 // socket.h:117:1: + SOCK_STREAM = 1 // socket.h:111:1: + SOL_SOCKET = 0xffff // socket.h:348:1: + SOMAXCONN = 128 // socket.h:540:1: + SONPX_SETOPTSHUT = 0x000000001 // socket.h:338:1: + SO_ACCEPTCONN = 0x0002 // socket.h:123:1: + SO_BROADCAST = 0x0020 // socket.h:127:1: + SO_DEBUG = 0x0001 // socket.h:122:1: + SO_DONTROUTE = 0x0010 // socket.h:126:1: + SO_DONTTRUNC = 0x2000 // socket.h:142:1: + SO_ERROR = 0x1007 // socket.h:160:1: + SO_KEEPALIVE = 0x0008 // socket.h:125:1: + SO_LABEL = 0x1010 // socket.h:163:1: + SO_LINGER = 0x0080 // socket.h:130:1: + SO_LINGER_SEC = 0x1080 // socket.h:176:1: + SO_NETSVC_MARKING_LEVEL = 0x1119 // socket.h:185:1: + SO_NET_SERVICE_TYPE = 0x1116 // socket.h:182:1: + SO_NKE = 0x1021 // socket.h:167:1: + SO_NOADDRERR = 0x1023 // socket.h:169:1: + SO_NOSIGPIPE = 0x1022 // socket.h:168:1: + SO_NOTIFYCONFLICT = 0x1026 // socket.h:173:1: + SO_NP_EXTENSIONS = 0x1083 // socket.h:178:1: + SO_NREAD = 0x1020 // socket.h:166:1: + SO_NUMRCVPKT = 0x1112 // socket.h:181:1: + SO_NWRITE = 0x1024 // socket.h:170:1: + SO_OOBINLINE = 0x0100 // socket.h:134:1: + SO_PEERLABEL = 0x1011 // socket.h:164:1: + SO_RANDOMPORT = 0x1082 // socket.h:177:1: + SO_RCVBUF = 0x1002 // socket.h:155:1: + SO_RCVLOWAT = 0x1004 // socket.h:157:1: + SO_RCVTIMEO = 0x1006 // socket.h:159:1: + SO_REUSEADDR = 0x0004 // socket.h:124:1: + SO_REUSEPORT = 0x0200 // socket.h:136:1: + SO_REUSESHAREUID = 0x1025 // socket.h:171:1: + SO_SNDBUF = 0x1001 // socket.h:154:1: + SO_SNDLOWAT = 0x1003 // socket.h:156:1: + SO_SNDTIMEO = 0x1005 // socket.h:158:1: + SO_TIMESTAMP = 0x0400 // socket.h:137:1: + SO_TIMESTAMP_MONOTONIC = 0x0800 // socket.h:138:1: + SO_TYPE = 0x1008 // socket.h:161:1: + SO_UPCALLCLOSEWAIT = 0x1027 // socket.h:174:1: + SO_USELOOPBACK = 0x0040 // socket.h:129:1: + SO_WANTMORE = 0x4000 // socket.h:144:1: + SO_WANTOOBFLAG = 0x8000 // socket.h:145:1: + TRY_AGAIN = 2 // netdb.h:175:1: + UINT16_MAX = 65535 // stdint.h:601:1: + UINT32_MAX = 4294967295 // stdint.h:557:1: + UINT64_MAX = 18446744073709551615 // stdint.h:463:1: + UINT8_MAX = 255 // stdint.h:623:1: + UINTMAX_MAX = 18446744073709551615 // stdint.h:664:1: + UINTPTR_MAX = 18446744073709551615 // stdint.h:650:1: + UINT_FAST16_MAX = 65535 // stdint.h:616:1: + UINT_FAST32_MAX = 4294967295 // stdint.h:575:1: + UINT_FAST64_MAX = 18446744073709551615 // stdint.h:484:1: + UINT_FAST8_MAX = 255 // stdint.h:635:1: + UINT_LEAST16_MAX = 65535 // stdint.h:613:1: + UINT_LEAST32_MAX = 4294967295 // stdint.h:572:1: + UINT_LEAST64_MAX = 18446744073709551615 // stdint.h:481:1: + UINT_LEAST8_MAX = 255 // stdint.h:632:1: + WCHAR_MAX = 2147483647 // stdint.h:678:1: + WCHAR_MIN = -2147483648 // stdint.h:682:1: + WINT_MAX = 2147483647 // stdint.h:674:1: + WINT_MIN = -2147483648 // stdint.h:673:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_I386__PARAM_H_ = 0 // _param.h:30:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NETDB_H_ = 0 // netdb.h:84:1: + X_NETINET6_IN6_H_ = 0 // in6.h:99:1: + X_NETINET_IN_H_ = 0 // in.h:65:1: + X_NET_NETKEV_H_ = 0 // net_kev.h:30:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:94:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:96:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:97:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:98:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:99:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SA_FAMILY_T = 0 // _sa_family_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SOCKLEN_T = 0 // _socklen_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SS_MAXSIZE = 128 // socket.h:429:1: + X_STRUCT_IOVEC = 0 // _iovec_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SOCKET_H_ = 0 // socket.h:73:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: + Pseudo_AF_HDRCMPLT = 35 // socket.h:396:1: + Pseudo_AF_KEY = 29 // socket.h:388:1: + Pseudo_AF_PIP = 25 // socket.h:384:1: + Pseudo_AF_RTIP = 22 // socket.h:381:1: + Pseudo_AF_XTP = 19 // socket.h:378:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -5751,20 +5751,20 @@ type X__msfilterreq = struct { // IP_PKTINFO: Packet information (equivalent to RFC2292 sec 5 for IPv4) // This structure is used for // -// 1) Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is -// set on the socket. In this case ipi_ifindex will contain the interface -// index the datagram was received on, ipi_addr is the IP address the -// datagram was received to. +// 1. Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is +// set on the socket. In this case ipi_ifindex will contain the interface +// index the datagram was received on, ipi_addr is the IP address the +// datagram was received to. // -// 2) Sending a datagram using a specific interface or IP source address. -// if ipi_ifindex is set to non-zero when in_pktinfo is passed as -// ancilliary data of type IP_PKTINFO, this will be used as the source -// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst -// will be used for the source address. +// 2. Sending a datagram using a specific interface or IP source address. +// if ipi_ifindex is set to non-zero when in_pktinfo is passed as +// ancilliary data of type IP_PKTINFO, this will be used as the source +// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst +// will be used for the source address. // -// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary -// IP_PKTINFO option silently overrides the bound interface when it is -// specified during send time. +// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary +// IP_PKTINFO option silently overrides the bound interface when it is +// specified during send time. type In_pktinfo = struct { Fipi_ifindex uint32 Fipi_spec_dst struct{ Fs_addr In_addr_t } diff --git a/vendor/modernc.org/libc/netdb/netdb_darwin_arm64.go b/vendor/modernc.org/libc/netdb/netdb_darwin_arm64.go index 7e55e6b6..ec46e2aa 100644 --- a/vendor/modernc.org/libc/netdb/netdb_darwin_arm64.go +++ b/vendor/modernc.org/libc/netdb/netdb_darwin_arm64.go @@ -5710,20 +5710,20 @@ type X__msfilterreq = struct { // IP_PKTINFO: Packet information (equivalent to RFC2292 sec 5 for IPv4) // This structure is used for // -// 1) Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is -// set on the socket. In this case ipi_ifindex will contain the interface -// index the datagram was received on, ipi_addr is the IP address the -// datagram was received to. -// -// 2) Sending a datagram using a specific interface or IP source address. -// if ipi_ifindex is set to non-zero when in_pktinfo is passed as -// ancilliary data of type IP_PKTINFO, this will be used as the source -// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst -// will be used for the source address. -// -// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary -// IP_PKTINFO option silently overrides the bound interface when it is -// specified during send time. +// 1. Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is +// set on the socket. In this case ipi_ifindex will contain the interface +// index the datagram was received on, ipi_addr is the IP address the +// datagram was received to. +// +// 2. Sending a datagram using a specific interface or IP source address. +// if ipi_ifindex is set to non-zero when in_pktinfo is passed as +// ancilliary data of type IP_PKTINFO, this will be used as the source +// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst +// will be used for the source address. +// +// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary +// IP_PKTINFO option silently overrides the bound interface when it is +// specified during send time. type In_pktinfo = struct { Fipi_ifindex uint32 Fipi_spec_dst struct{ Fs_addr In_addr_t } diff --git a/vendor/modernc.org/libc/netdb/netdb_freebsd_386.go b/vendor/modernc.org/libc/netdb/netdb_freebsd_386.go index ac3a1207..307a4969 100644 --- a/vendor/modernc.org/libc/netdb/netdb_freebsd_386.go +++ b/vendor/modernc.org/libc/netdb/netdb_freebsd_386.go @@ -611,8 +611,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/netdb/netdb_freebsd_amd64.go b/vendor/modernc.org/libc/netdb/netdb_freebsd_amd64.go index f4877d1f..0846c05e 100644 --- a/vendor/modernc.org/libc/netdb/netdb_freebsd_amd64.go +++ b/vendor/modernc.org/libc/netdb/netdb_freebsd_amd64.go @@ -62,9 +62,9 @@ const ( X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_NETDB_H_ = 0 // netdb.h:60:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:91:1: X_PATH_HOSTS = "/etc/hosts" // netdb.h:93:1: X_PATH_NETWORKS = "/etc/networks" // netdb.h:94:1: @@ -76,7 +76,7 @@ const ( X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_UINT32_T_DECLARED = 0 // netdb.h:87:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -368,12 +368,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -616,8 +619,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/netdb/netdb_freebsd_arm.go b/vendor/modernc.org/libc/netdb/netdb_freebsd_arm.go new file mode 100644 index 00000000..c07572dc --- /dev/null +++ b/vendor/modernc.org/libc/netdb/netdb_freebsd_arm.go @@ -0,0 +1,662 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_freebsd_arm.go -pkgname netdb', DO NOT EDIT. + +package netdb + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AI_ADDRCONFIG = 0x00000400 // netdb.h:200:1: + AI_ALL = 0x00000100 // netdb.h:198:1: + AI_CANONNAME = 0x00000002 // netdb.h:190:1: + AI_DEFAULT = 1536 // netdb.h:203:1: + AI_MASK = 3343 // netdb.h:194:1: + AI_NUMERICHOST = 0x00000004 // netdb.h:191:1: + AI_NUMERICSERV = 0x00000008 // netdb.h:192:1: + AI_PASSIVE = 0x00000001 // netdb.h:189:1: + AI_V4MAPPED = 0x00000800 // netdb.h:201:1: + AI_V4MAPPED_CFG = 0x00000200 // netdb.h:199:1: + EAI_AGAIN = 2 // netdb.h:168:1: + EAI_BADFLAGS = 3 // netdb.h:169:1: + EAI_BADHINTS = 12 // netdb.h:181:1: + EAI_FAIL = 4 // netdb.h:170:1: + EAI_FAMILY = 5 // netdb.h:171:1: + EAI_MAX = 15 // netdb.h:184:1: + EAI_MEMORY = 6 // netdb.h:172:1: + EAI_NONAME = 8 // netdb.h:177:1: + EAI_OVERFLOW = 14 // netdb.h:183:1: + EAI_PROTOCOL = 13 // netdb.h:182:1: + EAI_SERVICE = 9 // netdb.h:178:1: + EAI_SOCKTYPE = 10 // netdb.h:179:1: + EAI_SYSTEM = 11 // netdb.h:180:1: + HOST_NOT_FOUND = 1 // netdb.h:155:1: + IPPORT_RESERVED = 1024 // netdb.h:146:1: + NETDB_INTERNAL = -1 // netdb.h:153:1: + NETDB_SUCCESS = 0 // netdb.h:154:1: + NI_DGRAM = 0x00000010 // netdb.h:218:1: + NI_MAXHOST = 1025 // netdb.h:208:1: + NI_MAXSERV = 32 // netdb.h:209:1: + NI_NAMEREQD = 0x00000004 // netdb.h:216:1: + NI_NOFQDN = 0x00000001 // netdb.h:214:1: + NI_NUMERICHOST = 0x00000002 // netdb.h:215:1: + NI_NUMERICSCOPE = 0x00000020 // netdb.h:219:1: + NI_NUMERICSERV = 0x00000008 // netdb.h:217:1: + NO_ADDRESS = 4 // netdb.h:159:1: + NO_DATA = 4 // netdb.h:158:1: + NO_RECOVERY = 3 // netdb.h:157:1: + SCOPE_DELIMITER = 37 // netdb.h:224:1: + TRY_AGAIN = 2 // netdb.h:156:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_IN_ADDR_T_DECLARED = 0 // netdb.h:67:1: + X_IN_PORT_T_DECLARED = 0 // netdb.h:72:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_NETDB_H_ = 0 // netdb.h:60:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:91:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:93:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:94:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:95:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:96:1: + X_PATH_SERVICES_DB = "/var/db/services.db" // netdb.h:97:1: + X_SIZE_T_DECLARED = 0 // netdb.h:77:1: + X_SOCKLEN_T_DECLARED = 0 // netdb.h:82:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_UINT32_T_DECLARED = 0 // netdb.h:87:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: (BSD-3-Clause AND ISC) +// +// Copyright (c) 1980, 1983, 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. +// +// - +// Portions Copyright (c) 1993 by Digital Equipment Corporation. +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies, and that +// the name of Digital Equipment Corporation not be used in advertising or +// publicity pertaining to distribution of the document or software without +// specific, written prior permission. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +// WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +// CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +// DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +// PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +// SOFTWARE. +// - +// --Copyright-- + +// @(#)netdb.h 8.1 (Berkeley) 6/2/93 +// From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type In_addr_t = X__uint32_t /* netdb.h:66:20 */ + +type In_port_t = X__uint16_t /* netdb.h:71:20 */ + +type Socklen_t = X__socklen_t /* netdb.h:81:21 */ + +type Uint32_t = X__uint32_t /* netdb.h:86:20 */ + +// Structures returned by network data base library. All addresses are +// supplied in host order, and returned in network order (suitable for +// use in system calls). +type Hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:106:1 */ + +type Netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net Uint32_t +} /* netdb.h:115:1 */ + +type Servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr +} /* netdb.h:122:1 */ + +type Protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 +} /* netdb.h:129:1 */ + +type Addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen Socklen_t + Fai_canonname uintptr + Fai_addr uintptr + Fai_next uintptr +} /* netdb.h:135:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netdb/netdb_freebsd_arm64.go b/vendor/modernc.org/libc/netdb/netdb_freebsd_arm64.go new file mode 100644 index 00000000..0846c05e --- /dev/null +++ b/vendor/modernc.org/libc/netdb/netdb_freebsd_arm64.go @@ -0,0 +1,724 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_freebsd_amd64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AI_ADDRCONFIG = 0x00000400 // netdb.h:200:1: + AI_ALL = 0x00000100 // netdb.h:198:1: + AI_CANONNAME = 0x00000002 // netdb.h:190:1: + AI_DEFAULT = 1536 // netdb.h:203:1: + AI_MASK = 3343 // netdb.h:194:1: + AI_NUMERICHOST = 0x00000004 // netdb.h:191:1: + AI_NUMERICSERV = 0x00000008 // netdb.h:192:1: + AI_PASSIVE = 0x00000001 // netdb.h:189:1: + AI_V4MAPPED = 0x00000800 // netdb.h:201:1: + AI_V4MAPPED_CFG = 0x00000200 // netdb.h:199:1: + EAI_AGAIN = 2 // netdb.h:168:1: + EAI_BADFLAGS = 3 // netdb.h:169:1: + EAI_BADHINTS = 12 // netdb.h:181:1: + EAI_FAIL = 4 // netdb.h:170:1: + EAI_FAMILY = 5 // netdb.h:171:1: + EAI_MAX = 15 // netdb.h:184:1: + EAI_MEMORY = 6 // netdb.h:172:1: + EAI_NONAME = 8 // netdb.h:177:1: + EAI_OVERFLOW = 14 // netdb.h:183:1: + EAI_PROTOCOL = 13 // netdb.h:182:1: + EAI_SERVICE = 9 // netdb.h:178:1: + EAI_SOCKTYPE = 10 // netdb.h:179:1: + EAI_SYSTEM = 11 // netdb.h:180:1: + HOST_NOT_FOUND = 1 // netdb.h:155:1: + IPPORT_RESERVED = 1024 // netdb.h:146:1: + NETDB_INTERNAL = -1 // netdb.h:153:1: + NETDB_SUCCESS = 0 // netdb.h:154:1: + NI_DGRAM = 0x00000010 // netdb.h:218:1: + NI_MAXHOST = 1025 // netdb.h:208:1: + NI_MAXSERV = 32 // netdb.h:209:1: + NI_NAMEREQD = 0x00000004 // netdb.h:216:1: + NI_NOFQDN = 0x00000001 // netdb.h:214:1: + NI_NUMERICHOST = 0x00000002 // netdb.h:215:1: + NI_NUMERICSCOPE = 0x00000020 // netdb.h:219:1: + NI_NUMERICSERV = 0x00000008 // netdb.h:217:1: + NO_ADDRESS = 4 // netdb.h:159:1: + NO_DATA = 4 // netdb.h:158:1: + NO_RECOVERY = 3 // netdb.h:157:1: + SCOPE_DELIMITER = 37 // netdb.h:224:1: + TRY_AGAIN = 2 // netdb.h:156:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_IN_ADDR_T_DECLARED = 0 // netdb.h:67:1: + X_IN_PORT_T_DECLARED = 0 // netdb.h:72:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_NETDB_H_ = 0 // netdb.h:60:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:91:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:93:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:94:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:95:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:96:1: + X_PATH_SERVICES_DB = "/var/db/services.db" // netdb.h:97:1: + X_SIZE_T_DECLARED = 0 // netdb.h:77:1: + X_SOCKLEN_T_DECLARED = 0 // netdb.h:82:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_UINT32_T_DECLARED = 0 // netdb.h:87:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: (BSD-3-Clause AND ISC) +// +// Copyright (c) 1980, 1983, 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. +// +// - +// Portions Copyright (c) 1993 by Digital Equipment Corporation. +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies, and that +// the name of Digital Equipment Corporation not be used in advertising or +// publicity pertaining to distribution of the document or software without +// specific, written prior permission. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +// WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +// CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +// DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +// PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +// SOFTWARE. +// - +// --Copyright-- + +// @(#)netdb.h 8.1 (Berkeley) 6/2/93 +// From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type In_addr_t = X__uint32_t /* netdb.h:66:20 */ + +type In_port_t = X__uint16_t /* netdb.h:71:20 */ + +type Socklen_t = X__socklen_t /* netdb.h:81:21 */ + +type Uint32_t = X__uint32_t /* netdb.h:86:20 */ + +// Structures returned by network data base library. All addresses are +// supplied in host order, and returned in network order (suitable for +// use in system calls). +type Hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:106:1 */ + +type Netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net Uint32_t +} /* netdb.h:115:1 */ + +type Servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr +} /* netdb.h:122:1 */ + +type Protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:129:1 */ + +type Addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen Socklen_t + F__ccgo_pad1 [4]byte + Fai_canonname uintptr + Fai_addr uintptr + Fai_next uintptr +} /* netdb.h:135:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_386.go b/vendor/modernc.org/libc/netdb/netdb_linux_386.go index fc6570d4..43671211 100644 --- a/vendor/modernc.org/libc/netdb/netdb_linux_386.go +++ b/vendor/modernc.org/libc/netdb/netdb_linux_386.go @@ -481,7 +481,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -617,8 +618,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -630,7 +632,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1367,7 +1370,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1378,13 +1382,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ @@ -1982,7 +1988,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2029,7 +2036,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2343,18 +2351,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -2378,7 +2389,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2390,7 +2402,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 @@ -2461,7 +2474,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2598,7 +2612,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2675,8 +2690,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]int8 @@ -2979,8 +2995,9 @@ type Rpcent = struct { // <https://www.gnu.org/licenses/>. // Description of data base entry for a single network. NOTE: here a -// poor assumption is made. The network number is expected to fit -// into an unsigned long int variable. +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. type Netent = struct { Fn_name uintptr Fn_aliases uintptr diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_amd64.go b/vendor/modernc.org/libc/netdb/netdb_linux_amd64.go index d6474a79..a995ad8d 100644 --- a/vendor/modernc.org/libc/netdb/netdb_linux_amd64.go +++ b/vendor/modernc.org/libc/netdb/netdb_linux_amd64.go @@ -550,8 +550,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -589,7 +590,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -637,7 +639,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1394,7 +1397,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1405,8 +1409,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -2010,7 +2015,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2057,7 +2063,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2369,18 +2376,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -2404,7 +2414,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2416,7 +2427,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 @@ -2487,7 +2499,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2628,7 +2641,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2705,8 +2719,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]int8 @@ -3013,8 +3028,9 @@ type Rpcent = struct { // <https://www.gnu.org/licenses/>. // Description of data base entry for a single network. NOTE: here a -// poor assumption is made. The network number is expected to fit -// into an unsigned long int variable. +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. type Netent = struct { Fn_name uintptr Fn_aliases uintptr diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_arm.go b/vendor/modernc.org/libc/netdb/netdb_linux_arm.go index 9301fcd8..937853f5 100644 --- a/vendor/modernc.org/libc/netdb/netdb_linux_arm.go +++ b/vendor/modernc.org/libc/netdb/netdb_linux_arm.go @@ -477,7 +477,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -613,8 +614,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -626,7 +628,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1424,7 +1427,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1435,13 +1439,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ @@ -2040,7 +2046,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2087,7 +2094,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2452,18 +2460,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2487,7 +2498,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2499,7 +2511,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 @@ -2570,7 +2583,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2714,7 +2728,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2791,8 +2806,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 @@ -3095,8 +3111,9 @@ type Rpcent = struct { // <https://www.gnu.org/licenses/>. // Description of data base entry for a single network. NOTE: here a -// poor assumption is made. The network number is expected to fit -// into an unsigned long int variable. +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. type Netent = struct { Fn_name uintptr Fn_aliases uintptr diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_arm64.go b/vendor/modernc.org/libc/netdb/netdb_linux_arm64.go index 869851d1..4f5ceb4d 100644 --- a/vendor/modernc.org/libc/netdb/netdb_linux_arm64.go +++ b/vendor/modernc.org/libc/netdb/netdb_linux_arm64.go @@ -487,7 +487,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -623,8 +624,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -636,7 +638,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1461,7 +1464,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1472,8 +1476,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -2076,7 +2081,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2123,7 +2129,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2468,18 +2475,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -2506,7 +2516,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2518,7 +2529,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2589,7 +2601,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2738,7 +2751,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2815,8 +2829,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 @@ -3123,8 +3138,9 @@ type Rpcent = struct { // <https://www.gnu.org/licenses/>. // Description of data base entry for a single network. NOTE: here a -// poor assumption is made. The network number is expected to fit -// into an unsigned long int variable. +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. type Netent = struct { Fn_name uintptr Fn_aliases uintptr diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_ppc64le.go b/vendor/modernc.org/libc/netdb/netdb_linux_ppc64le.go index c42af433..0fb42e97 100644 --- a/vendor/modernc.org/libc/netdb/netdb_linux_ppc64le.go +++ b/vendor/modernc.org/libc/netdb/netdb_linux_ppc64le.go @@ -502,7 +502,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -638,8 +639,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -651,7 +653,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1405,7 +1408,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1416,8 +1420,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -2020,7 +2025,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2067,7 +2073,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2379,18 +2386,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2414,7 +2424,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2426,7 +2437,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2497,7 +2509,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2644,7 +2657,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2721,8 +2735,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 @@ -3029,8 +3044,9 @@ type Rpcent = struct { // <https://www.gnu.org/licenses/>. // Description of data base entry for a single network. NOTE: here a -// poor assumption is made. The network number is expected to fit -// into an unsigned long int variable. +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. type Netent = struct { Fn_name uintptr Fn_aliases uintptr diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go b/vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go index 0f2867e6..4a9228fc 100644 --- a/vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go +++ b/vendor/modernc.org/libc/netdb/netdb_linux_riscv64.go @@ -467,8 +467,9 @@ const ( ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:103:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -596,7 +597,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -644,7 +646,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1573,7 +1576,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1584,8 +1588,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -2188,7 +2193,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2235,7 +2241,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2553,9 +2560,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -2589,18 +2597,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2624,7 +2635,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2636,7 +2648,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2707,7 +2720,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2843,7 +2857,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2920,8 +2935,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 @@ -3228,8 +3244,9 @@ type Rpcent = struct { // <https://www.gnu.org/licenses/>. // Description of data base entry for a single network. NOTE: here a -// poor assumption is made. The network number is expected to fit -// into an unsigned long int variable. +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. type Netent = struct { Fn_name uintptr Fn_aliases uintptr diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_s390x.go b/vendor/modernc.org/libc/netdb/netdb_linux_s390x.go index eb3e6ed3..daca8334 100644 --- a/vendor/modernc.org/libc/netdb/netdb_linux_s390x.go +++ b/vendor/modernc.org/libc/netdb/netdb_linux_s390x.go @@ -487,7 +487,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -623,8 +624,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -636,7 +638,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1392,7 +1395,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1403,8 +1407,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -2007,7 +2012,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2054,7 +2060,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2365,18 +2372,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2400,7 +2410,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2412,7 +2423,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2483,7 +2495,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2624,7 +2637,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2701,8 +2715,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 @@ -3009,8 +3024,9 @@ type Rpcent = struct { // <https://www.gnu.org/licenses/>. // Description of data base entry for a single network. NOTE: here a -// poor assumption is made. The network number is expected to fit -// into an unsigned long int variable. +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. type Netent = struct { Fn_name uintptr Fn_aliases uintptr diff --git a/vendor/modernc.org/libc/netdb/netdb_netbsd_arm.go b/vendor/modernc.org/libc/netdb/netdb_netbsd_arm.go new file mode 100644 index 00000000..460fdc1d --- /dev/null +++ b/vendor/modernc.org/libc/netdb/netdb_netbsd_arm.go @@ -0,0 +1,1009 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_netbsd_arm.go -pkgname netdb', DO NOT EDIT. + +package netdb + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AI_ADDRCONFIG = 0x00000400 // netdb.h:269:1: + AI_CANONNAME = 0x00000002 // netdb.h:266:1: + AI_MASK = 3087 // netdb.h:273:1: + AI_NUMERICHOST = 0x00000004 // netdb.h:267:1: + AI_NUMERICSERV = 0x00000008 // netdb.h:268:1: + AI_PASSIVE = 0x00000001 // netdb.h:265:1: + AI_SRV = 0x00000800 // netdb.h:272:1: + EAI_ADDRFAMILY = 1 // netdb.h:243:1: + EAI_AGAIN = 2 // netdb.h:244:1: + EAI_BADFLAGS = 3 // netdb.h:245:1: + EAI_BADHINTS = 12 // netdb.h:254:1: + EAI_FAIL = 4 // netdb.h:246:1: + EAI_FAMILY = 5 // netdb.h:247:1: + EAI_MAX = 15 // netdb.h:257:1: + EAI_MEMORY = 6 // netdb.h:248:1: + EAI_NODATA = 7 // netdb.h:249:1: + EAI_NONAME = 8 // netdb.h:250:1: + EAI_OVERFLOW = 14 // netdb.h:256:1: + EAI_PROTOCOL = 13 // netdb.h:255:1: + EAI_SERVICE = 9 // netdb.h:251:1: + EAI_SOCKTYPE = 10 // netdb.h:252:1: + EAI_SYSTEM = 11 // netdb.h:253:1: + HOST_NOT_FOUND = 1 // netdb.h:230:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + NETDB_INTERNAL = -1 // netdb.h:226:1: + NETDB_SUCCESS = 0 // netdb.h:227:1: + NI_DGRAM = 0x00000010 // netdb.h:300:1: + NI_MAXHOST = 1025 // netdb.h:289:1: + NI_MAXSERV = 32 // netdb.h:290:1: + NI_NAMEREQD = 0x00000004 // netdb.h:298:1: + NI_NOFQDN = 0x00000001 // netdb.h:296:1: + NI_NUMERICHOST = 0x00000002 // netdb.h:297:1: + NI_NUMERICSCOPE = 0x00000040 // netdb.h:302:1: + NI_NUMERICSERV = 0x00000008 // netdb.h:299:1: + NI_WITHSCOPEID = 0x00000020 // netdb.h:301:1: + NO_ADDRESS = 4 // netdb.h:235:1: + NO_DATA = 4 // netdb.h:233:1: + NO_RECOVERY = 3 // netdb.h:232:1: + PRIX16 = "X" // int_fmtio.h:186:1: + PRIX32 = "X" // int_fmtio.h:187:1: + PRIX64 = "llX" // int_fmtio.h:189:1: + PRIX8 = "X" // int_fmtio.h:185:1: + PRIXFAST16 = "X" // int_fmtio.h:202:1: + PRIXFAST32 = "X" // int_fmtio.h:203:1: + PRIXFAST64 = "llX" // int_fmtio.h:205:1: + PRIXFAST8 = "X" // int_fmtio.h:201:1: + PRIXLEAST16 = "X" // int_fmtio.h:194:1: + PRIXLEAST32 = "X" // int_fmtio.h:195:1: + PRIXLEAST64 = "llX" // int_fmtio.h:197:1: + PRIXLEAST8 = "X" // int_fmtio.h:193:1: + PRIXMAX = "llX" // int_fmtio.h:206:1: + PRIXPTR = "lX" // int_fmtio.h:211:1: + PRId16 = "d" // int_fmtio.h:44:1: + PRId32 = "d" // int_fmtio.h:45:1: + PRId64 = "lld" // int_fmtio.h:47:1: + PRId8 = "d" // int_fmtio.h:43:1: + PRIdFAST16 = "d" // int_fmtio.h:60:1: + PRIdFAST32 = "d" // int_fmtio.h:61:1: + PRIdFAST64 = "lld" // int_fmtio.h:63:1: + PRIdFAST8 = "d" // int_fmtio.h:59:1: + PRIdLEAST16 = "d" // int_fmtio.h:52:1: + PRIdLEAST32 = "d" // int_fmtio.h:53:1: + PRIdLEAST64 = "lld" // int_fmtio.h:55:1: + PRIdLEAST8 = "d" // int_fmtio.h:51:1: + PRIdMAX = "lld" // int_fmtio.h:64:1: + PRIdPTR = "ld" // int_fmtio.h:69:1: + PRIi16 = "i" // int_fmtio.h:72:1: + PRIi32 = "i" // int_fmtio.h:73:1: + PRIi64 = "lli" // int_fmtio.h:75:1: + PRIi8 = "i" // int_fmtio.h:71:1: + PRIiFAST16 = "i" // int_fmtio.h:88:1: + PRIiFAST32 = "i" // int_fmtio.h:89:1: + PRIiFAST64 = "lli" // int_fmtio.h:91:1: + PRIiFAST8 = "i" // int_fmtio.h:87:1: + PRIiLEAST16 = "i" // int_fmtio.h:80:1: + PRIiLEAST32 = "i" // int_fmtio.h:81:1: + PRIiLEAST64 = "lli" // int_fmtio.h:83:1: + PRIiLEAST8 = "i" // int_fmtio.h:79:1: + PRIiMAX = "lli" // int_fmtio.h:92:1: + PRIiPTR = "li" // int_fmtio.h:97:1: + PRIo16 = "o" // int_fmtio.h:102:1: + PRIo32 = "o" // int_fmtio.h:103:1: + PRIo64 = "llo" // int_fmtio.h:105:1: + PRIo8 = "o" // int_fmtio.h:101:1: + PRIoFAST16 = "o" // int_fmtio.h:118:1: + PRIoFAST32 = "o" // int_fmtio.h:119:1: + PRIoFAST64 = "llo" // int_fmtio.h:121:1: + PRIoFAST8 = "o" // int_fmtio.h:117:1: + PRIoLEAST16 = "o" // int_fmtio.h:110:1: + PRIoLEAST32 = "o" // int_fmtio.h:111:1: + PRIoLEAST64 = "llo" // int_fmtio.h:113:1: + PRIoLEAST8 = "o" // int_fmtio.h:109:1: + PRIoMAX = "llo" // int_fmtio.h:122:1: + PRIoPTR = "lo" // int_fmtio.h:127:1: + PRIu16 = "u" // int_fmtio.h:130:1: + PRIu32 = "u" // int_fmtio.h:131:1: + PRIu64 = "llu" // int_fmtio.h:133:1: + PRIu8 = "u" // int_fmtio.h:129:1: + PRIuFAST16 = "u" // int_fmtio.h:146:1: + PRIuFAST32 = "u" // int_fmtio.h:147:1: + PRIuFAST64 = "llu" // int_fmtio.h:149:1: + PRIuFAST8 = "u" // int_fmtio.h:145:1: + PRIuLEAST16 = "u" // int_fmtio.h:138:1: + PRIuLEAST32 = "u" // int_fmtio.h:139:1: + PRIuLEAST64 = "llu" // int_fmtio.h:141:1: + PRIuLEAST8 = "u" // int_fmtio.h:137:1: + PRIuMAX = "llu" // int_fmtio.h:150:1: + PRIuPTR = "lu" // int_fmtio.h:155:1: + PRIx16 = "x" // int_fmtio.h:158:1: + PRIx32 = "x" // int_fmtio.h:159:1: + PRIx64 = "llx" // int_fmtio.h:161:1: + PRIx8 = "x" // int_fmtio.h:157:1: + PRIxFAST16 = "x" // int_fmtio.h:174:1: + PRIxFAST32 = "x" // int_fmtio.h:175:1: + PRIxFAST64 = "llx" // int_fmtio.h:177:1: + PRIxFAST8 = "x" // int_fmtio.h:173:1: + PRIxLEAST16 = "x" // int_fmtio.h:166:1: + PRIxLEAST32 = "x" // int_fmtio.h:167:1: + PRIxLEAST64 = "llx" // int_fmtio.h:169:1: + PRIxLEAST8 = "x" // int_fmtio.h:165:1: + PRIxMAX = "llx" // int_fmtio.h:178:1: + PRIxPTR = "lx" // int_fmtio.h:183:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SCNd16 = "hd" // int_fmtio.h:216:1: + SCNd32 = "d" // int_fmtio.h:217:1: + SCNd64 = "lld" // int_fmtio.h:219:1: + SCNd8 = "hhd" // int_fmtio.h:215:1: + SCNdFAST16 = "d" // int_fmtio.h:232:1: + SCNdFAST32 = "d" // int_fmtio.h:233:1: + SCNdFAST64 = "lld" // int_fmtio.h:235:1: + SCNdFAST8 = "d" // int_fmtio.h:231:1: + SCNdLEAST16 = "hd" // int_fmtio.h:224:1: + SCNdLEAST32 = "d" // int_fmtio.h:225:1: + SCNdLEAST64 = "lld" // int_fmtio.h:227:1: + SCNdLEAST8 = "hhd" // int_fmtio.h:223:1: + SCNdMAX = "lld" // int_fmtio.h:236:1: + SCNdPTR = "ld" // int_fmtio.h:241:1: + SCNi16 = "hi" // int_fmtio.h:244:1: + SCNi32 = "i" // int_fmtio.h:245:1: + SCNi64 = "lli" // int_fmtio.h:247:1: + SCNi8 = "hhi" // int_fmtio.h:243:1: + SCNiFAST16 = "i" // int_fmtio.h:260:1: + SCNiFAST32 = "i" // int_fmtio.h:261:1: + SCNiFAST64 = "lli" // int_fmtio.h:263:1: + SCNiFAST8 = "i" // int_fmtio.h:259:1: + SCNiLEAST16 = "hi" // int_fmtio.h:252:1: + SCNiLEAST32 = "i" // int_fmtio.h:253:1: + SCNiLEAST64 = "lli" // int_fmtio.h:255:1: + SCNiLEAST8 = "hhi" // int_fmtio.h:251:1: + SCNiMAX = "lli" // int_fmtio.h:264:1: + SCNiPTR = "li" // int_fmtio.h:269:1: + SCNo16 = "ho" // int_fmtio.h:274:1: + SCNo32 = "o" // int_fmtio.h:275:1: + SCNo64 = "llo" // int_fmtio.h:277:1: + SCNo8 = "hho" // int_fmtio.h:273:1: + SCNoFAST16 = "o" // int_fmtio.h:290:1: + SCNoFAST32 = "o" // int_fmtio.h:291:1: + SCNoFAST64 = "llo" // int_fmtio.h:293:1: + SCNoFAST8 = "o" // int_fmtio.h:289:1: + SCNoLEAST16 = "ho" // int_fmtio.h:282:1: + SCNoLEAST32 = "o" // int_fmtio.h:283:1: + SCNoLEAST64 = "llo" // int_fmtio.h:285:1: + SCNoLEAST8 = "hho" // int_fmtio.h:281:1: + SCNoMAX = "llo" // int_fmtio.h:294:1: + SCNoPTR = "lo" // int_fmtio.h:299:1: + SCNu16 = "hu" // int_fmtio.h:302:1: + SCNu32 = "u" // int_fmtio.h:303:1: + SCNu64 = "llu" // int_fmtio.h:305:1: + SCNu8 = "hhu" // int_fmtio.h:301:1: + SCNuFAST16 = "u" // int_fmtio.h:318:1: + SCNuFAST32 = "u" // int_fmtio.h:319:1: + SCNuFAST64 = "llu" // int_fmtio.h:321:1: + SCNuFAST8 = "u" // int_fmtio.h:317:1: + SCNuLEAST16 = "hu" // int_fmtio.h:310:1: + SCNuLEAST32 = "u" // int_fmtio.h:311:1: + SCNuLEAST64 = "llu" // int_fmtio.h:313:1: + SCNuLEAST8 = "hhu" // int_fmtio.h:309:1: + SCNuMAX = "llu" // int_fmtio.h:322:1: + SCNuPTR = "lu" // int_fmtio.h:327:1: + SCNx16 = "hx" // int_fmtio.h:330:1: + SCNx32 = "x" // int_fmtio.h:331:1: + SCNx64 = "llx" // int_fmtio.h:333:1: + SCNx8 = "hhx" // int_fmtio.h:329:1: + SCNxFAST16 = "x" // int_fmtio.h:346:1: + SCNxFAST32 = "x" // int_fmtio.h:347:1: + SCNxFAST64 = "llx" // int_fmtio.h:349:1: + SCNxFAST8 = "x" // int_fmtio.h:345:1: + SCNxLEAST16 = "hx" // int_fmtio.h:338:1: + SCNxLEAST32 = "x" // int_fmtio.h:339:1: + SCNxLEAST64 = "llx" // int_fmtio.h:341:1: + SCNxLEAST8 = "hhx" // int_fmtio.h:337:1: + SCNxMAX = "llx" // int_fmtio.h:350:1: + SCNxPTR = "lx" // int_fmtio.h:355:1: + SCOPE_DELIMITER = 37 // netdb.h:308:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + TRY_AGAIN = 2 // netdb.h:231:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_FMTIO_H_ = 0 // int_fmtio.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BSD_INT16_T_ = 0 // stdint.h:50:1: + X_BSD_INT32_T_ = 0 // stdint.h:60:1: + X_BSD_INT64_T_ = 0 // stdint.h:70:1: + X_BSD_INT8_T_ = 0 // stdint.h:40:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // stdint.h:55:1: + X_BSD_UINT32_T_ = 0 // stdint.h:65:1: + X_BSD_UINT64_T_ = 0 // stdint.h:75:1: + X_BSD_UINT8_T_ = 0 // stdint.h:45:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INTTYPES_H_ = 0 // inttypes.h:33:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_NETDB_H_ = 0 // netdb.h:91:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:113:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:116:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:119:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:122:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:125:1: + X_PATH_SERVICES_CDB = "/var/db/services.cdb" // netdb.h:128:1: + X_PATH_SERVICES_DB = "/var/db/services.db" // netdb.h:131:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_INTTYPES_H_ = 0 // inttypes.h:33:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: endian_machdep.h,v 1.9 2014/01/29 01:03:13 matt Exp $ + +// __ARMEB__ or __AARCH64EB__ is predefined when building big-endian ARM. +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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. + +// 7.8 Format conversion of integer types + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Int8_t = X__int8_t /* stdint.h:39:18 */ + +type Uint8_t = X__uint8_t /* stdint.h:44:19 */ + +type Int16_t = X__int16_t /* stdint.h:49:19 */ + +type Uint16_t = X__uint16_t /* stdint.h:54:20 */ + +type Int32_t = X__int32_t /* stdint.h:59:19 */ + +type Uint32_t = X__uint32_t /* stdint.h:64:20 */ + +type Int64_t = X__int64_t /* stdint.h:69:19 */ + +type Uint64_t = X__uint64_t /* stdint.h:74:20 */ + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type Imaxdiv_t = struct { + Fquot Intmax_t + Frem Intmax_t +} /* inttypes.h:60:3 */ + +type Locale_t = uintptr /* inttypes.h:66:25 */ + +// Data types +type Socklen_t = X__socklen_t /* netdb.h:102:21 */ + +// % +// Structures returned by network data base library. All addresses are +// supplied in host order, and returned in network order (suitable for +// use in system calls). +type Hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:148:1 */ + +// % +// Assumption here is that a network number +// fits in an unsigned long -- probably a poor one. +type Netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net Uint32_t +} /* netdb.h:161:1 */ + +type Servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr +} /* netdb.h:176:1 */ + +type Protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 +} /* netdb.h:183:1 */ + +// Note: ai_addrlen used to be a size_t, per RFC 2553. +// In XNS5.2, and subsequently in POSIX-2001 and +// draft-ietf-ipngwg-rfc2553bis-02.txt it was changed to a socklen_t. +// To accommodate for this while preserving binary compatibility with the +// old interface, we prepend or append 32 bits of padding, depending on +// the (LP64) architecture's endianness. +// +// This should be deleted the next time the libc major number is +// incremented. +type Addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen X__socklen_t + Fai_canonname uintptr + Fai_addr uintptr + Fai_next uintptr +} /* netdb.h:202:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netdb/netdb_openbsd_386.go b/vendor/modernc.org/libc/netdb/netdb_openbsd_386.go new file mode 100644 index 00000000..4f1d9fd7 --- /dev/null +++ b/vendor/modernc.org/libc/netdb/netdb_openbsd_386.go @@ -0,0 +1,1462 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_openbsd_386.go -pkgname netdb', DO NOT EDIT. + +package netdb + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AI_ADDRCONFIG = 64 // netdb.h:165:1: + AI_CANONNAME = 2 // netdb.h:160:1: + AI_EXT = 8 // netdb.h:162:1: + AI_FQDN = 32 // netdb.h:164:1: + AI_MASK = 119 // netdb.h:167:1: + AI_NUMERICHOST = 4 // netdb.h:161:1: + AI_NUMERICSERV = 16 // netdb.h:163:1: + AI_PASSIVE = 1 // netdb.h:159:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EAI_ADDRFAMILY = -9 // netdb.h:196:1: + EAI_AGAIN = -3 // netdb.h:190:1: + EAI_BADFLAGS = -1 // netdb.h:188:1: + EAI_BADHINTS = -12 // netdb.h:199:1: + EAI_FAIL = -4 // netdb.h:191:1: + EAI_FAMILY = -6 // netdb.h:193:1: + EAI_MEMORY = -10 // netdb.h:197:1: + EAI_NODATA = -5 // netdb.h:192:1: + EAI_NONAME = -2 // netdb.h:189:1: + EAI_OVERFLOW = -14 // netdb.h:201:1: + EAI_PROTOCOL = -13 // netdb.h:200:1: + EAI_SERVICE = -8 // netdb.h:195:1: + EAI_SOCKTYPE = -7 // netdb.h:194:1: + EAI_SYSTEM = -11 // netdb.h:198:1: + ERRSET_FAIL = 2 // netdb.h:225:1: + ERRSET_INVAL = 3 // netdb.h:226:1: + ERRSET_NODATA = 5 // netdb.h:228:1: + ERRSET_NOMEMORY = 1 // netdb.h:224:1: + ERRSET_NONAME = 4 // netdb.h:227:1: + ERRSET_SUCCESS = 0 // netdb.h:223:1: + HOST_NOT_FOUND = 1 // netdb.h:151:1: + ICMP6_FILTER = 18 // in6.h:304:1: + INET6_ADDRSTRLEN = 46 // in6.h:97:1: + INET_ADDRSTRLEN = 16 // in.h:382:1: + IN_CLASSA_MAX = 128 // in.h:195:1: + IN_CLASSA_NSHIFT = 24 // in.h:193:1: + IN_CLASSB_MAX = 65536 // in.h:202:1: + IN_CLASSB_NSHIFT = 16 // in.h:200:1: + IN_CLASSC_NSHIFT = 8 // in.h:207:1: + IN_CLASSD_NSHIFT = 28 // in.h:214:1: + IN_LOOPBACKNET = 127 // in.h:253:1: + IN_RFC3021_NSHIFT = 31 // in.h:219:1: + IPCTL_ARPDOWN = 40 // in.h:698:1: + IPCTL_ARPQUEUE = 41 // in.h:699:1: + IPCTL_ARPQUEUED = 36 // in.h:694:1: + IPCTL_ARPTIMEOUT = 39 // in.h:697:1: + IPCTL_DEFTTL = 3 // in.h:662:1: + IPCTL_DIRECTEDBCAST = 6 // in.h:664:1: + IPCTL_ENCDEBUG = 12 // in.h:670:1: + IPCTL_FORWARDING = 1 // in.h:660:1: + IPCTL_IFQUEUE = 30 // in.h:688:1: + IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1: + IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1: + IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1: + IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1: + IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1: + IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1: + IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1: + IPCTL_IPSEC_BYTES = 20 // in.h:678:1: + IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1: + IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1: + IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1: + IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1: + IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1: + IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1: + IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1: + IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1: + IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1: + IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1: + IPCTL_IPSEC_STATS = 13 // in.h:671:1: + IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1: + IPCTL_MAXID = 42 // in.h:700:1: + IPCTL_MFORWARDING = 31 // in.h:689:1: + IPCTL_MRTMFC = 37 // in.h:695:1: + IPCTL_MRTPROTO = 34 // in.h:692:1: + IPCTL_MRTSTATS = 35 // in.h:693:1: + IPCTL_MRTVIF = 38 // in.h:696:1: + IPCTL_MTUDISC = 27 // in.h:685:1: + IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1: + IPCTL_MULTIPATH = 32 // in.h:690:1: + IPCTL_SENDREDIRECTS = 2 // in.h:661:1: + IPCTL_SOURCEROUTE = 5 // in.h:663:1: + IPCTL_STATS = 33 // in.h:691:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1: + IPPORT_HILASTAUTO = 65535 // in.h:160:1: + IPPORT_RESERVED = 1024 // in.h:153:1: + IPPORT_USERRESERVED = 49151 // in.h:154:1: + IPPROTO_AH = 51 // in.h:89:1: + IPPROTO_CARP = 112 // in.h:99:1: + IPPROTO_DIVERT = 258 // in.h:109:1: + IPPROTO_DONE = 257 // in.h:173:1: + IPPROTO_DSTOPTS = 60 // in.h:93:1: + IPPROTO_EGP = 8 // in.h:78:1: + IPPROTO_ENCAP = 98 // in.h:96:1: + IPPROTO_EON = 80 // in.h:94:1: + IPPROTO_ESP = 50 // in.h:88:1: + IPPROTO_ETHERIP = 97 // in.h:95:1: + IPPROTO_FRAGMENT = 44 // in.h:85:1: + IPPROTO_GGP = 3 // in.h:74:1: + IPPROTO_GRE = 47 // in.h:87:1: + IPPROTO_HOPOPTS = 0 // in.h:71:1: + IPPROTO_ICMP = 1 // in.h:72:1: + IPPROTO_ICMPV6 = 58 // in.h:91:1: + IPPROTO_IDP = 22 // in.h:81:1: + IPPROTO_IGMP = 2 // in.h:73:1: + IPPROTO_IP = 0 // in.h:70:1: + IPPROTO_IPCOMP = 108 // in.h:98:1: + IPPROTO_IPIP = 4 // in.h:75:1: + IPPROTO_IPV4 = 4 // in.h:76:1: + IPPROTO_IPV6 = 41 // in.h:83:1: + IPPROTO_MAX = 256 // in.h:106:1: + IPPROTO_MAXID = 259 // in.h:393:1: + IPPROTO_MOBILE = 55 // in.h:90:1: + IPPROTO_MPLS = 137 // in.h:102:1: + IPPROTO_NONE = 59 // in.h:92:1: + IPPROTO_PFSYNC = 240 // in.h:103:1: + IPPROTO_PIM = 103 // in.h:97:1: + IPPROTO_PUP = 12 // in.h:79:1: + IPPROTO_RAW = 255 // in.h:104:1: + IPPROTO_ROUTING = 43 // in.h:84:1: + IPPROTO_RSVP = 46 // in.h:86:1: + IPPROTO_SCTP = 132 // in.h:100:1: + IPPROTO_TCP = 6 // in.h:77:1: + IPPROTO_TP = 29 // in.h:82:1: + IPPROTO_UDP = 17 // in.h:80:1: + IPPROTO_UDPLITE = 136 // in.h:101:1: + IPSEC6_OUTSA = 56 // in6.h:337:1: + IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1: + IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1: + IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1: + IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1: + IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1: + IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1: + IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1: + IPSEC_LEVEL_NONE = 0x00 // in.h:329:1: + IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1: + IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1: + IPSEC_LEVEL_USE = 0x02 // in.h:331:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:578:1: + IPV6CTL_DAD_PENDING = 49 // in6.h:589:1: + IPV6CTL_DEFHLIM = 3 // in6.h:567:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1: + IPV6CTL_FORWARDING = 1 // in6.h:565:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:568:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1: + IPV6CTL_IFQUEUE = 51 // in6.h:591:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1: + IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:583:1: + IPV6CTL_MAXID = 55 // in6.h:595:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1: + IPV6CTL_MFORWARDING = 42 // in6.h:584:1: + IPV6CTL_MRTMFC = 53 // in6.h:593:1: + IPV6CTL_MRTMIF = 52 // in6.h:592:1: + IPV6CTL_MRTPROTO = 8 // in6.h:571:1: + IPV6CTL_MRTSTATS = 7 // in6.h:570:1: + IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1: + IPV6CTL_MULTIPATH = 43 // in6.h:585:1: + IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1: + IPV6CTL_SOIIKEY = 54 // in6.h:594:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:573:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1: + IPV6CTL_STATS = 6 // in6.h:569:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1: + IPV6PROTO_MAXID = 259 // in6.h:470:1: + IPV6_AUTH_LEVEL = 53 // in6.h:333:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1: + IPV6_CHECKSUM = 26 // in6.h:307:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1: + IPV6_DONTFRAG = 62 // in6.h:345:1: + IPV6_DSTOPTS = 50 // in6.h:330:1: + IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1: + IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1: + IPV6_HOPLIMIT = 47 // in6.h:327:1: + IPV6_HOPOPTS = 49 // in6.h:329:1: + IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1: + IPV6_JOIN_GROUP = 12 // in6.h:300:1: + IPV6_LEAVE_GROUP = 13 // in6.h:301:1: + IPV6_MINHOPCOUNT = 65 // in6.h:349:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:298:1: + IPV6_MULTICAST_IF = 9 // in6.h:297:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:299:1: + IPV6_NEXTHOP = 48 // in6.h:328:1: + IPV6_PATHMTU = 44 // in6.h:322:1: + IPV6_PIPEX = 63 // in6.h:346:1: + IPV6_PKTINFO = 46 // in6.h:326:1: + IPV6_PORTRANGE = 14 // in6.h:302:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:395:1: + IPV6_RECVDSTOPTS = 40 // in6.h:317:1: + IPV6_RECVDSTPORT = 64 // in6.h:348:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:314:1: + IPV6_RECVHOPOPTS = 39 // in6.h:316:1: + IPV6_RECVPATHMTU = 43 // in6.h:320:1: + IPV6_RECVPKTINFO = 36 // in6.h:313:1: + IPV6_RECVRTHDR = 38 // in6.h:315:1: + IPV6_RECVTCLASS = 57 // in6.h:339:1: + IPV6_RTABLE = 0x1021 // in6.h:351:1: + IPV6_RTHDR = 51 // in6.h:331:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:354:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1: + IPV6_TCLASS = 61 // in6.h:344:1: + IPV6_UNICAST_HOPS = 4 // in6.h:296:1: + IPV6_USE_MIN_MTU = 42 // in6.h:319:1: + IPV6_V6ONLY = 27 // in6.h:308:1: + IP_ADD_MEMBERSHIP = 12 // in.h:297:1: + IP_AUTH_LEVEL = 20 // in.h:300:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1: + IP_DROP_MEMBERSHIP = 13 // in.h:298:1: + IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1: + IP_ESP_TRANS_LEVEL = 21 // in.h:301:1: + IP_HDRINCL = 2 // in.h:287:1: + IP_IPCOMP_LEVEL = 29 // in.h:309:1: + IP_IPDEFTTL = 37 // in.h:317:1: + IP_IPSECFLOWINFO = 36 // in.h:316:1: + IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1: + IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1: + IP_IPSEC_LOCAL_ID = 23 // in.h:303:1: + IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1: + IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1: + IP_IPSEC_REMOTE_ID = 24 // in.h:304:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1: + IP_MINTTL = 32 // in.h:312:1: + IP_MIN_MEMBERSHIPS = 15 // in.h:353:1: + IP_MULTICAST_IF = 9 // in.h:294:1: + IP_MULTICAST_LOOP = 11 // in.h:296:1: + IP_MULTICAST_TTL = 10 // in.h:295:1: + IP_OPTIONS = 1 // in.h:286:1: + IP_PIPEX = 34 // in.h:314:1: + IP_PORTRANGE = 19 // in.h:299:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:374:1: + IP_PORTRANGE_HIGH = 1 // in.h:375:1: + IP_PORTRANGE_LOW = 2 // in.h:376:1: + IP_RECVDSTADDR = 7 // in.h:292:1: + IP_RECVDSTPORT = 33 // in.h:313:1: + IP_RECVIF = 30 // in.h:310:1: + IP_RECVOPTS = 5 // in.h:290:1: + IP_RECVRETOPTS = 6 // in.h:291:1: + IP_RECVRTABLE = 35 // in.h:315:1: + IP_RECVTTL = 31 // in.h:311:1: + IP_RETOPTS = 8 // in.h:293:1: + IP_RTABLE = 0x1021 // in.h:321:1: + IP_SENDSRCADDR = 7 // in.h:318:1: + IP_TOS = 3 // in.h:288:1: + IP_TTL = 4 // in.h:289:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NETDB_INTERNAL = -1 // netdb.h:149:1: + NETDB_SUCCESS = 0 // netdb.h:150:1: + NI_DGRAM = 16 // netdb.h:175:1: + NI_MAXHOST = 256 // netdb.h:179:1: + NI_MAXSERV = 32 // netdb.h:180:1: + NI_NAMEREQD = 8 // netdb.h:174:1: + NI_NOFQDN = 4 // netdb.h:173:1: + NI_NUMERICHOST = 1 // netdb.h:171:1: + NI_NUMERICSERV = 2 // netdb.h:172:1: + NO_ADDRESS = 4 // netdb.h:155:1: + NO_DATA = 4 // netdb.h:154:1: + NO_RECOVERY = 3 // netdb.h:153:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + RRSET_VALIDATED = 1 // netdb.h:218:1: + SCOPE_DELIMITER = 37 // netdb.h:185:1: + SIN6_LEN = 0 // in6.h:104:1: + TRY_AGAIN = 2 // netdb.h:152:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IN_ADDR_DECLARED = 0 // in.h:163:1: + X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NETDB_H_ = 0 // netdb.h:88:1: + X_NETINET6_IN6_H_ = 0 // in6.h:69:1: + X_NETINET_IN_H_ = 0 // in.h:39:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:97:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:98:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:99:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:100:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:101:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: netdb.h,v 1.33 2015/01/18 20:29:31 deraadt Exp $ + +// ++Copyright++ 1980, 1983, 1988, 1993 +// - +// Copyright (c) 1980, 1983, 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. +// - +// Portions Copyright (c) 1993 by Digital Equipment Corporation. +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies, and that +// the name of Digital Equipment Corporation not be used in advertising or +// publicity pertaining to distribution of the document or software without +// specific, written prior permission. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +// WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +// CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +// DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +// PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +// SOFTWARE. +// - +// --Copyright-- + +// Copyright (c) 1995, 1996, 1997, 1998, 1999 Craig Metz. 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 author nor the names of any 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. + +// @(#)netdb.h 8.1 (Berkeley) 6/2/93 +// $From: netdb.h,v 8.7 1996/05/09 05:59:09 vixie Exp $ + +// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $ +// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ + +// Copyright (c) 1982, 1986, 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. + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// <sys/_endian.h> is pulled in by <sys/types.h> + +type Sa_family_t = X__sa_family_t /* in.h:58:23 */ // sockaddr address family type + +type In_addr_t = X__in_addr_t /* in.h:63:21 */ // base type for internet address +type In_port_t = X__in_port_t /* in.h:64:21 */ // IP port type + +// Protocols + +// Only used internally, so it can be outside the range of valid IP protocols + +// From FreeBSD: +// +// Local port number conventions: +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// The default range is IPPORT_RESERVED through +// IPPORT_USERRESERVED, although that is settable by sysctl. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH changes the range of candidate port numbers +// into the "high" range. These are reserved for client outbound connections +// which do not want to be filtered by any firewalls. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. This +// convention is based on "vouchsafe" principles only. It is only secure +// if you trust the remote host to restrict these ports. +// +// The default range of ports and the high range can be changed by +// sysctl(3). (net.inet.ip.port{hi}{first,last}) +// +// Changing those values has bad security implications if you are +// using a a stateless firewall that is allowing packets outside of that +// range in order to allow transparent outgoing connections. +// +// Such a firewall configuration will generally depend on the use of these +// default values. If you change them, you may find your Security +// Administrator looking for you with a heavy object. + +// Ports < IPPORT_RESERVED are reserved for +// privileged processes (e.g. root). +// Ports > IPPORT_USERRESERVED are reserved +// for servers, not necessarily privileged. + +// Default local port range to use by setting IP_PORTRANGE_HIGH + +// IP Version 4 Internet address (a structure for historical reasons) +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:167:1 */ + +// last return value of *_input(), meaning "all job for this pkt is done". + +// Definitions of bits in internet address integers. +// On subnets, the decomposition of addresses to host and net parts +// is done according to subnet mask, not the masks here. +// +// By byte-swapping the constants, we avoid ever having to byte-swap IP +// addresses inside the kernel. Unfortunately, user-level programs rely +// on these macros not doing byte-swapping. + +// These ones aren't really net and host fields, but routing needn't know. + +// IP Version 4 socket address. +type Sockaddr_in = struct { + Fsin_len U_int8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]Int8_t +} /* in.h:258:1 */ + +// Structure used to describe IP options. +// Used to store options internally, to pass them to a process, +// or to restore options retrieved earlier. +// The ip_dst is used for the first-hop gateway when using a source route +// (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]Int8_t +} /* in.h:273:1 */ + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// source address to use + +// Security levels - IPsec, not IPSO + +// Defaults and limits for options +// The imo_membership vector for each socket starts at IP_MIN_MEMBERSHIPS +// and is dynamically allocated at run-time, bounded by IP_MAX_MEMBERSHIPS, +// and is reallocated when needed, sized according to a power-of-two increment. + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:359:1 */ + +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:364:1 */ + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Buffer lengths for strings containing printable IP addresses + +// Definitions for inet sysctl operations. +// +// Third level is protocol number. +// Fourth level is desired variable within that protocol. + +// Names for IP sysctl objects + +// INET6 stuff +// $OpenBSD: in6.h,v 1.109 2021/06/02 00:20:50 dlg Exp $ +// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ + +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb2.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } +} /* in6.h:81:1 */ + +// Socket address for IPv6 +type Sockaddr_in6 = struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t +} /* in6.h:106:1 */ + +// IPv6 route structure +type Route_in6 = struct { + Fro_rt uintptr + Fro_tableid U_long + Fro_dst struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } +} /* in6.h:150:1 */ + +// Definition of some useful macros to handle IP6 addresses + +// Macros started with IPV6_ADDR is KAME local + +// Unspecified + +// Loopback + +// IPv4 compatible + +// Mapped + +// Unicast Scope +// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). + +// Multicast + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. + +// new socket options introduced in RFC3542 + +// More new socket options introduced in RFC3542 + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:366:1 */ + +// IPV6_PKTINFO: Packet information(RFC3542 sec 6) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:374:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +// XXX Not allowed here by POSIX, but required by RFC 3542, so go +// XXX with the code on the pavement. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } + Fip6m_mtu U_int32_t +} /* in6.h:384:1 */ + +// Argument for IPV6_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +type Socklen_t = X__socklen_t /* in6.h:401:21 */ + +// Structures returned by network data base library. All addresses are +// supplied in host order, and returned in network order (suitable for +// use in system calls). +type Hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:108:1 */ + +// Assumption here is that a network number +// fits in an in_addr_t -- probably a poor one. +type Netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net In_addr_t +} /* netdb.h:121:1 */ + +type Servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + Fs_proto uintptr +} /* netdb.h:128:1 */ + +type Protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 +} /* netdb.h:135:1 */ + +// Error return codes from gethostbyname() and gethostbyaddr() +// (left in extern int h_errno). + +// Values for getaddrinfo() and getnameinfo() +// valid flags for addrinfo + +// #define NI_NUMERICSCOPE 32 return the scope number, not the name + +// Scope delimit character (KAME hack) + +type Addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen Socklen_t + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:203:1 */ + +// Flags for getrrsetbyname() + +// Return codes for getrrsetbyname() + +// Structures used by getrrsetbyname() and freerrset() +type Rdatainfo = struct { + Frdi_length uint32 + Frdi_data uintptr +} /* netdb.h:233:1 */ + +type Rrsetinfo = struct { + Frri_flags uint32 + Frri_rdclass uint32 + Frri_rdtype uint32 + Frri_ttl uint32 + Frri_nrdatas uint32 + Frri_nsigs uint32 + Frri_name uintptr + Frri_rdatas uintptr + Frri_sigs uintptr +} /* netdb.h:238:1 */ + +type Servent_data = struct { + Ffp uintptr + Faliases uintptr + Fmaxaliases int32 + Fstayopen int32 + Fline uintptr +} /* netdb.h:250:1 */ + +type Protoent_data = struct { + Ffp uintptr + Faliases uintptr + Fmaxaliases int32 + Fstayopen int32 + Fline uintptr +} /* netdb.h:258:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go b/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go index 40fb26c9..78cea261 100644 --- a/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go +++ b/vendor/modernc.org/libc/netdb/netdb_openbsd_amd64.go @@ -288,8 +288,8 @@ const ( TRY_AGAIN = 2 // netdb.h:152:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -306,34 +306,34 @@ const ( X_NETDB_H_ = 0 // netdb.h:88:1: X_NETINET6_IN6_H_ = 0 // in6.h:69:1: X_NETINET_IN_H_ = 0 // in.h:39:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:97:1: X_PATH_HOSTS = "/etc/hosts" // netdb.h:98:1: X_PATH_NETWORKS = "/etc/networks" // netdb.h:99:1: X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:100:1: X_PATH_SERVICES = "/etc/services" // netdb.h:101:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -629,7 +629,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -799,7 +799,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -959,18 +959,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -1052,27 +1051,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/netdb/netdb_openbsd_arm64.go b/vendor/modernc.org/libc/netdb/netdb_openbsd_arm64.go new file mode 100644 index 00000000..31233ad8 --- /dev/null +++ b/vendor/modernc.org/libc/netdb/netdb_openbsd_arm64.go @@ -0,0 +1,1474 @@ +// Code generated by 'ccgo netdb/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netdb/netdb_openbsd_arm64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AI_ADDRCONFIG = 64 // netdb.h:165:1: + AI_CANONNAME = 2 // netdb.h:160:1: + AI_EXT = 8 // netdb.h:162:1: + AI_FQDN = 32 // netdb.h:164:1: + AI_MASK = 119 // netdb.h:167:1: + AI_NUMERICHOST = 4 // netdb.h:161:1: + AI_NUMERICSERV = 16 // netdb.h:163:1: + AI_PASSIVE = 1 // netdb.h:159:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EAI_ADDRFAMILY = -9 // netdb.h:196:1: + EAI_AGAIN = -3 // netdb.h:190:1: + EAI_BADFLAGS = -1 // netdb.h:188:1: + EAI_BADHINTS = -12 // netdb.h:199:1: + EAI_FAIL = -4 // netdb.h:191:1: + EAI_FAMILY = -6 // netdb.h:193:1: + EAI_MEMORY = -10 // netdb.h:197:1: + EAI_NODATA = -5 // netdb.h:192:1: + EAI_NONAME = -2 // netdb.h:189:1: + EAI_OVERFLOW = -14 // netdb.h:201:1: + EAI_PROTOCOL = -13 // netdb.h:200:1: + EAI_SERVICE = -8 // netdb.h:195:1: + EAI_SOCKTYPE = -7 // netdb.h:194:1: + EAI_SYSTEM = -11 // netdb.h:198:1: + ERRSET_FAIL = 2 // netdb.h:225:1: + ERRSET_INVAL = 3 // netdb.h:226:1: + ERRSET_NODATA = 5 // netdb.h:228:1: + ERRSET_NOMEMORY = 1 // netdb.h:224:1: + ERRSET_NONAME = 4 // netdb.h:227:1: + ERRSET_SUCCESS = 0 // netdb.h:223:1: + HOST_NOT_FOUND = 1 // netdb.h:151:1: + ICMP6_FILTER = 18 // in6.h:304:1: + INET6_ADDRSTRLEN = 46 // in6.h:97:1: + INET_ADDRSTRLEN = 16 // in.h:382:1: + IN_CLASSA_MAX = 128 // in.h:195:1: + IN_CLASSA_NSHIFT = 24 // in.h:193:1: + IN_CLASSB_MAX = 65536 // in.h:202:1: + IN_CLASSB_NSHIFT = 16 // in.h:200:1: + IN_CLASSC_NSHIFT = 8 // in.h:207:1: + IN_CLASSD_NSHIFT = 28 // in.h:214:1: + IN_LOOPBACKNET = 127 // in.h:253:1: + IN_RFC3021_NSHIFT = 31 // in.h:219:1: + IPCTL_ARPDOWN = 40 // in.h:698:1: + IPCTL_ARPQUEUE = 41 // in.h:699:1: + IPCTL_ARPQUEUED = 36 // in.h:694:1: + IPCTL_ARPTIMEOUT = 39 // in.h:697:1: + IPCTL_DEFTTL = 3 // in.h:662:1: + IPCTL_DIRECTEDBCAST = 6 // in.h:664:1: + IPCTL_ENCDEBUG = 12 // in.h:670:1: + IPCTL_FORWARDING = 1 // in.h:660:1: + IPCTL_IFQUEUE = 30 // in.h:688:1: + IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1: + IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1: + IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1: + IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1: + IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1: + IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1: + IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1: + IPCTL_IPSEC_BYTES = 20 // in.h:678:1: + IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1: + IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1: + IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1: + IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1: + IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1: + IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1: + IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1: + IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1: + IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1: + IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1: + IPCTL_IPSEC_STATS = 13 // in.h:671:1: + IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1: + IPCTL_MAXID = 42 // in.h:700:1: + IPCTL_MFORWARDING = 31 // in.h:689:1: + IPCTL_MRTMFC = 37 // in.h:695:1: + IPCTL_MRTPROTO = 34 // in.h:692:1: + IPCTL_MRTSTATS = 35 // in.h:693:1: + IPCTL_MRTVIF = 38 // in.h:696:1: + IPCTL_MTUDISC = 27 // in.h:685:1: + IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1: + IPCTL_MULTIPATH = 32 // in.h:690:1: + IPCTL_SENDREDIRECTS = 2 // in.h:661:1: + IPCTL_SOURCEROUTE = 5 // in.h:663:1: + IPCTL_STATS = 33 // in.h:691:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1: + IPPORT_HILASTAUTO = 65535 // in.h:160:1: + IPPORT_RESERVED = 1024 // in.h:153:1: + IPPORT_USERRESERVED = 49151 // in.h:154:1: + IPPROTO_AH = 51 // in.h:89:1: + IPPROTO_CARP = 112 // in.h:99:1: + IPPROTO_DIVERT = 258 // in.h:109:1: + IPPROTO_DONE = 257 // in.h:173:1: + IPPROTO_DSTOPTS = 60 // in.h:93:1: + IPPROTO_EGP = 8 // in.h:78:1: + IPPROTO_ENCAP = 98 // in.h:96:1: + IPPROTO_EON = 80 // in.h:94:1: + IPPROTO_ESP = 50 // in.h:88:1: + IPPROTO_ETHERIP = 97 // in.h:95:1: + IPPROTO_FRAGMENT = 44 // in.h:85:1: + IPPROTO_GGP = 3 // in.h:74:1: + IPPROTO_GRE = 47 // in.h:87:1: + IPPROTO_HOPOPTS = 0 // in.h:71:1: + IPPROTO_ICMP = 1 // in.h:72:1: + IPPROTO_ICMPV6 = 58 // in.h:91:1: + IPPROTO_IDP = 22 // in.h:81:1: + IPPROTO_IGMP = 2 // in.h:73:1: + IPPROTO_IP = 0 // in.h:70:1: + IPPROTO_IPCOMP = 108 // in.h:98:1: + IPPROTO_IPIP = 4 // in.h:75:1: + IPPROTO_IPV4 = 4 // in.h:76:1: + IPPROTO_IPV6 = 41 // in.h:83:1: + IPPROTO_MAX = 256 // in.h:106:1: + IPPROTO_MAXID = 259 // in.h:393:1: + IPPROTO_MOBILE = 55 // in.h:90:1: + IPPROTO_MPLS = 137 // in.h:102:1: + IPPROTO_NONE = 59 // in.h:92:1: + IPPROTO_PFSYNC = 240 // in.h:103:1: + IPPROTO_PIM = 103 // in.h:97:1: + IPPROTO_PUP = 12 // in.h:79:1: + IPPROTO_RAW = 255 // in.h:104:1: + IPPROTO_ROUTING = 43 // in.h:84:1: + IPPROTO_RSVP = 46 // in.h:86:1: + IPPROTO_SCTP = 132 // in.h:100:1: + IPPROTO_TCP = 6 // in.h:77:1: + IPPROTO_TP = 29 // in.h:82:1: + IPPROTO_UDP = 17 // in.h:80:1: + IPPROTO_UDPLITE = 136 // in.h:101:1: + IPSEC6_OUTSA = 56 // in6.h:337:1: + IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1: + IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1: + IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1: + IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1: + IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1: + IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1: + IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1: + IPSEC_LEVEL_NONE = 0x00 // in.h:329:1: + IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1: + IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1: + IPSEC_LEVEL_USE = 0x02 // in.h:331:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:578:1: + IPV6CTL_DAD_PENDING = 49 // in6.h:589:1: + IPV6CTL_DEFHLIM = 3 // in6.h:567:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1: + IPV6CTL_FORWARDING = 1 // in6.h:565:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:568:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1: + IPV6CTL_IFQUEUE = 51 // in6.h:591:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1: + IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:583:1: + IPV6CTL_MAXID = 55 // in6.h:595:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1: + IPV6CTL_MFORWARDING = 42 // in6.h:584:1: + IPV6CTL_MRTMFC = 53 // in6.h:593:1: + IPV6CTL_MRTMIF = 52 // in6.h:592:1: + IPV6CTL_MRTPROTO = 8 // in6.h:571:1: + IPV6CTL_MRTSTATS = 7 // in6.h:570:1: + IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1: + IPV6CTL_MULTIPATH = 43 // in6.h:585:1: + IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1: + IPV6CTL_SOIIKEY = 54 // in6.h:594:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:573:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1: + IPV6CTL_STATS = 6 // in6.h:569:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1: + IPV6PROTO_MAXID = 259 // in6.h:470:1: + IPV6_AUTH_LEVEL = 53 // in6.h:333:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1: + IPV6_CHECKSUM = 26 // in6.h:307:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1: + IPV6_DONTFRAG = 62 // in6.h:345:1: + IPV6_DSTOPTS = 50 // in6.h:330:1: + IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1: + IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1: + IPV6_HOPLIMIT = 47 // in6.h:327:1: + IPV6_HOPOPTS = 49 // in6.h:329:1: + IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1: + IPV6_JOIN_GROUP = 12 // in6.h:300:1: + IPV6_LEAVE_GROUP = 13 // in6.h:301:1: + IPV6_MINHOPCOUNT = 65 // in6.h:349:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:298:1: + IPV6_MULTICAST_IF = 9 // in6.h:297:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:299:1: + IPV6_NEXTHOP = 48 // in6.h:328:1: + IPV6_PATHMTU = 44 // in6.h:322:1: + IPV6_PIPEX = 63 // in6.h:346:1: + IPV6_PKTINFO = 46 // in6.h:326:1: + IPV6_PORTRANGE = 14 // in6.h:302:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:395:1: + IPV6_RECVDSTOPTS = 40 // in6.h:317:1: + IPV6_RECVDSTPORT = 64 // in6.h:348:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:314:1: + IPV6_RECVHOPOPTS = 39 // in6.h:316:1: + IPV6_RECVPATHMTU = 43 // in6.h:320:1: + IPV6_RECVPKTINFO = 36 // in6.h:313:1: + IPV6_RECVRTHDR = 38 // in6.h:315:1: + IPV6_RECVTCLASS = 57 // in6.h:339:1: + IPV6_RTABLE = 0x1021 // in6.h:351:1: + IPV6_RTHDR = 51 // in6.h:331:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:354:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1: + IPV6_TCLASS = 61 // in6.h:344:1: + IPV6_UNICAST_HOPS = 4 // in6.h:296:1: + IPV6_USE_MIN_MTU = 42 // in6.h:319:1: + IPV6_V6ONLY = 27 // in6.h:308:1: + IP_ADD_MEMBERSHIP = 12 // in.h:297:1: + IP_AUTH_LEVEL = 20 // in.h:300:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1: + IP_DROP_MEMBERSHIP = 13 // in.h:298:1: + IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1: + IP_ESP_TRANS_LEVEL = 21 // in.h:301:1: + IP_HDRINCL = 2 // in.h:287:1: + IP_IPCOMP_LEVEL = 29 // in.h:309:1: + IP_IPDEFTTL = 37 // in.h:317:1: + IP_IPSECFLOWINFO = 36 // in.h:316:1: + IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1: + IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1: + IP_IPSEC_LOCAL_ID = 23 // in.h:303:1: + IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1: + IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1: + IP_IPSEC_REMOTE_ID = 24 // in.h:304:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1: + IP_MINTTL = 32 // in.h:312:1: + IP_MIN_MEMBERSHIPS = 15 // in.h:353:1: + IP_MULTICAST_IF = 9 // in.h:294:1: + IP_MULTICAST_LOOP = 11 // in.h:296:1: + IP_MULTICAST_TTL = 10 // in.h:295:1: + IP_OPTIONS = 1 // in.h:286:1: + IP_PIPEX = 34 // in.h:314:1: + IP_PORTRANGE = 19 // in.h:299:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:374:1: + IP_PORTRANGE_HIGH = 1 // in.h:375:1: + IP_PORTRANGE_LOW = 2 // in.h:376:1: + IP_RECVDSTADDR = 7 // in.h:292:1: + IP_RECVDSTPORT = 33 // in.h:313:1: + IP_RECVIF = 30 // in.h:310:1: + IP_RECVOPTS = 5 // in.h:290:1: + IP_RECVRETOPTS = 6 // in.h:291:1: + IP_RECVRTABLE = 35 // in.h:315:1: + IP_RECVTTL = 31 // in.h:311:1: + IP_RETOPTS = 8 // in.h:293:1: + IP_RTABLE = 0x1021 // in.h:321:1: + IP_SENDSRCADDR = 7 // in.h:318:1: + IP_TOS = 3 // in.h:288:1: + IP_TTL = 4 // in.h:289:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NETDB_INTERNAL = -1 // netdb.h:149:1: + NETDB_SUCCESS = 0 // netdb.h:150:1: + NI_DGRAM = 16 // netdb.h:175:1: + NI_MAXHOST = 256 // netdb.h:179:1: + NI_MAXSERV = 32 // netdb.h:180:1: + NI_NAMEREQD = 8 // netdb.h:174:1: + NI_NOFQDN = 4 // netdb.h:173:1: + NI_NUMERICHOST = 1 // netdb.h:171:1: + NI_NUMERICSERV = 2 // netdb.h:172:1: + NO_ADDRESS = 4 // netdb.h:155:1: + NO_DATA = 4 // netdb.h:154:1: + NO_RECOVERY = 3 // netdb.h:153:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + RRSET_VALIDATED = 1 // netdb.h:218:1: + SCOPE_DELIMITER = 37 // netdb.h:185:1: + SIN6_LEN = 0 // in6.h:104:1: + TRY_AGAIN = 2 // netdb.h:152:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IN_ADDR_DECLARED = 0 // in.h:163:1: + X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_NETDB_H_ = 0 // netdb.h:88:1: + X_NETINET6_IN6_H_ = 0 // in6.h:69:1: + X_NETINET_IN_H_ = 0 // in.h:39:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:97:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:98:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:99:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:100:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:101:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: netdb.h,v 1.33 2015/01/18 20:29:31 deraadt Exp $ + +// ++Copyright++ 1980, 1983, 1988, 1993 +// - +// Copyright (c) 1980, 1983, 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. +// - +// Portions Copyright (c) 1993 by Digital Equipment Corporation. +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies, and that +// the name of Digital Equipment Corporation not be used in advertising or +// publicity pertaining to distribution of the document or software without +// specific, written prior permission. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +// WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +// CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +// DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +// PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +// SOFTWARE. +// - +// --Copyright-- + +// Copyright (c) 1995, 1996, 1997, 1998, 1999 Craig Metz. 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 author nor the names of any 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. + +// @(#)netdb.h 8.1 (Berkeley) 6/2/93 +// $From: netdb.h,v 8.7 1996/05/09 05:59:09 vixie Exp $ + +// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $ +// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ + +// Copyright (c) 1982, 1986, 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. + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// <sys/_endian.h> is pulled in by <sys/types.h> + +type Sa_family_t = X__sa_family_t /* in.h:58:23 */ // sockaddr address family type + +type In_addr_t = X__in_addr_t /* in.h:63:21 */ // base type for internet address +type In_port_t = X__in_port_t /* in.h:64:21 */ // IP port type + +// Protocols + +// Only used internally, so it can be outside the range of valid IP protocols + +// From FreeBSD: +// +// Local port number conventions: +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// The default range is IPPORT_RESERVED through +// IPPORT_USERRESERVED, although that is settable by sysctl. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH changes the range of candidate port numbers +// into the "high" range. These are reserved for client outbound connections +// which do not want to be filtered by any firewalls. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. This +// convention is based on "vouchsafe" principles only. It is only secure +// if you trust the remote host to restrict these ports. +// +// The default range of ports and the high range can be changed by +// sysctl(3). (net.inet.ip.port{hi}{first,last}) +// +// Changing those values has bad security implications if you are +// using a a stateless firewall that is allowing packets outside of that +// range in order to allow transparent outgoing connections. +// +// Such a firewall configuration will generally depend on the use of these +// default values. If you change them, you may find your Security +// Administrator looking for you with a heavy object. + +// Ports < IPPORT_RESERVED are reserved for +// privileged processes (e.g. root). +// Ports > IPPORT_USERRESERVED are reserved +// for servers, not necessarily privileged. + +// Default local port range to use by setting IP_PORTRANGE_HIGH + +// IP Version 4 Internet address (a structure for historical reasons) +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:167:1 */ + +// last return value of *_input(), meaning "all job for this pkt is done". + +// Definitions of bits in internet address integers. +// On subnets, the decomposition of addresses to host and net parts +// is done according to subnet mask, not the masks here. +// +// By byte-swapping the constants, we avoid ever having to byte-swap IP +// addresses inside the kernel. Unfortunately, user-level programs rely +// on these macros not doing byte-swapping. + +// These ones aren't really net and host fields, but routing needn't know. + +// IP Version 4 socket address. +type Sockaddr_in = struct { + Fsin_len U_int8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]Int8_t +} /* in.h:258:1 */ + +// Structure used to describe IP options. +// Used to store options internally, to pass them to a process, +// or to restore options retrieved earlier. +// The ip_dst is used for the first-hop gateway when using a source route +// (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]Int8_t +} /* in.h:273:1 */ + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// source address to use + +// Security levels - IPsec, not IPSO + +// Defaults and limits for options +// The imo_membership vector for each socket starts at IP_MIN_MEMBERSHIPS +// and is dynamically allocated at run-time, bounded by IP_MAX_MEMBERSHIPS, +// and is reallocated when needed, sized according to a power-of-two increment. + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:359:1 */ + +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:364:1 */ + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Buffer lengths for strings containing printable IP addresses + +// Definitions for inet sysctl operations. +// +// Third level is protocol number. +// Fourth level is desired variable within that protocol. + +// Names for IP sysctl objects + +// INET6 stuff +// $OpenBSD: in6.h,v 1.109 2021/06/02 00:20:50 dlg Exp $ +// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ + +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb2.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } +} /* in6.h:81:1 */ + +// Socket address for IPv6 +type Sockaddr_in6 = struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t +} /* in6.h:106:1 */ + +// IPv6 route structure +type Route_in6 = struct { + Fro_rt uintptr + Fro_tableid U_long + Fro_dst struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } + F__ccgo_pad1 [4]byte +} /* in6.h:150:1 */ + +// Definition of some useful macros to handle IP6 addresses + +// Macros started with IPV6_ADDR is KAME local + +// Unspecified + +// Loopback + +// IPv4 compatible + +// Mapped + +// Unicast Scope +// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). + +// Multicast + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. + +// new socket options introduced in RFC3542 + +// More new socket options introduced in RFC3542 + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:366:1 */ + +// IPV6_PKTINFO: Packet information(RFC3542 sec 6) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:374:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +// XXX Not allowed here by POSIX, but required by RFC 3542, so go +// XXX with the code on the pavement. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } + Fip6m_mtu U_int32_t +} /* in6.h:384:1 */ + +// Argument for IPV6_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +type Socklen_t = X__socklen_t /* in6.h:401:21 */ + +// Structures returned by network data base library. All addresses are +// supplied in host order, and returned in network order (suitable for +// use in system calls). +type Hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:108:1 */ + +// Assumption here is that a network number +// fits in an in_addr_t -- probably a poor one. +type Netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net In_addr_t +} /* netdb.h:121:1 */ + +type Servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr +} /* netdb.h:128:1 */ + +type Protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:135:1 */ + +// Error return codes from gethostbyname() and gethostbyaddr() +// (left in extern int h_errno). + +// Values for getaddrinfo() and getnameinfo() +// valid flags for addrinfo + +// #define NI_NUMERICSCOPE 32 return the scope number, not the name + +// Scope delimit character (KAME hack) + +type Addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen Socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:203:1 */ + +// Flags for getrrsetbyname() + +// Return codes for getrrsetbyname() + +// Structures used by getrrsetbyname() and freerrset() +type Rdatainfo = struct { + Frdi_length uint32 + F__ccgo_pad1 [4]byte + Frdi_data uintptr +} /* netdb.h:233:1 */ + +type Rrsetinfo = struct { + Frri_flags uint32 + Frri_rdclass uint32 + Frri_rdtype uint32 + Frri_ttl uint32 + Frri_nrdatas uint32 + Frri_nsigs uint32 + Frri_name uintptr + Frri_rdatas uintptr + Frri_sigs uintptr +} /* netdb.h:238:1 */ + +type Servent_data = struct { + Ffp uintptr + Faliases uintptr + Fmaxaliases int32 + Fstayopen int32 + Fline uintptr +} /* netdb.h:250:1 */ + +type Protoent_data = struct { + Ffp uintptr + Faliases uintptr + Fmaxaliases int32 + Fstayopen int32 + Fline uintptr +} /* netdb.h:258:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go b/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go index afb6c70b..5d34ac45 100644 --- a/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_darwin_amd64.go -pkgname in', DO NOT EDIT. +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_darwin_amd64.go -pkgname in', DO NOT EDIT. package in diff --git a/vendor/modernc.org/libc/netinet/in/capi_freebsd_arm.go b/vendor/modernc.org/libc/netinet/in/capi_freebsd_arm.go new file mode 100644 index 00000000..378005b6 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_arm.go -pkgname in', DO NOT EDIT. + +package in + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netinet/in/capi_freebsd_arm64.go b/vendor/modernc.org/libc/netinet/in/capi_freebsd_arm64.go new file mode 100644 index 00000000..015be3a9 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_amd64.go -pkgname in', DO NOT EDIT. + +package in + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netinet/in/capi_netbsd_arm.go b/vendor/modernc.org/libc/netinet/in/capi_netbsd_arm.go new file mode 100644 index 00000000..2a530c23 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_netbsd_arm.go -pkgname in', DO NOT EDIT. + +package in + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go b/vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go new file mode 100644 index 00000000..c53a8156 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_386.go -pkgname in', DO NOT EDIT. + +package in + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go b/vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go new file mode 100644 index 00000000..a96a7b87 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_arm64.go -pkgname in', DO NOT EDIT. + +package in + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go b/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go index 294ff74e..69111122 100644 --- a/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/in_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_darwin_amd64.go -pkgname in', DO NOT EDIT. +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_darwin_amd64.go -pkgname in', DO NOT EDIT. package in @@ -15,684 +15,684 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 - AF_CCITT = 10 - AF_CHAOS = 5 - AF_CNT = 21 - AF_COIP = 20 - AF_DATAKIT = 9 - AF_DECnet = 12 - AF_DLI = 13 - AF_E164 = 28 - AF_ECMA = 8 - AF_HYLINK = 15 - AF_IEEE80211 = 37 - AF_IMPLINK = 3 - AF_INET = 2 - AF_INET6 = 30 - AF_IPX = 23 - AF_ISDN = 28 - AF_ISO = 7 - AF_LAT = 14 - AF_LINK = 18 - AF_LOCAL = 1 - AF_MAX = 40 - AF_NATM = 31 - AF_NDRV = 27 - AF_NETBIOS = 33 - AF_NS = 6 - AF_OSI = 7 - AF_PPP = 34 - AF_PUP = 4 - AF_RESERVED_36 = 36 - AF_ROUTE = 17 - AF_SIP = 24 - AF_SNA = 11 - AF_SYSTEM = 32 - AF_UNIX = 1 - AF_UNSPEC = 0 - AF_UTUN = 38 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - CONNECT_DATA_AUTHENTICATED = 0x4 - CONNECT_DATA_IDEMPOTENT = 0x2 - CONNECT_RESUME_ON_READ_WRITE = 0x1 - FD_SETSIZE = 1024 - ICMP6_FILTER = 18 - ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 - INADDR_NONE = 0xffffffff - INET6_ADDRSTRLEN = 46 - INET_ADDRSTRLEN = 16 - INT16_MAX = 32767 - INT16_MIN = -32768 - INT32_MAX = 2147483647 - INT32_MIN = -2147483648 - INT64_MAX = 9223372036854775807 - INT64_MIN = -9223372036854775808 - INT8_MAX = 127 - INT8_MIN = -128 - INTMAX_MAX = 9223372036854775807 - INTMAX_MIN = -9223372036854775808 - INTPTR_MAX = 9223372036854775807 - INTPTR_MIN = -9223372036854775808 - INT_FAST16_MAX = 32767 - INT_FAST16_MIN = -32768 - INT_FAST32_MAX = 2147483647 - INT_FAST32_MIN = -2147483648 - INT_FAST64_MAX = 9223372036854775807 - INT_FAST64_MIN = -9223372036854775808 - INT_FAST8_MAX = 127 - INT_FAST8_MIN = -128 - INT_LEAST16_MAX = 32767 - INT_LEAST16_MIN = -32768 - INT_LEAST32_MAX = 2147483647 - INT_LEAST32_MIN = -2147483648 - INT_LEAST64_MAX = 9223372036854775807 - INT_LEAST64_MIN = -9223372036854775808 - INT_LEAST8_MAX = 127 - INT_LEAST8_MIN = -128 - IN_CLASSA_HOST = 0x00ffffff - IN_CLASSA_MAX = 128 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 24 - IN_CLASSB_HOST = 0x0000ffff - IN_CLASSB_MAX = 65536 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 16 - IN_CLASSC_HOST = 0x000000ff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 8 - IN_CLASSD_HOST = 0x0fffffff - IN_CLASSD_NET = 0xf0000000 - IN_CLASSD_NSHIFT = 28 - IN_LOOPBACKNET = 127 - IPCTL_ACCEPTSOURCEROUTE = 13 - IPCTL_DEFTTL = 3 - IPCTL_DIRECTEDBROADCAST = 9 - IPCTL_FASTFORWARDING = 14 - IPCTL_FORWARDING = 1 - IPCTL_GIF_TTL = 16 - IPCTL_INTRQDROPS = 11 - IPCTL_INTRQMAXLEN = 10 - IPCTL_KEEPFAITH = 15 - IPCTL_MAXID = 17 - IPCTL_RTEXPIRE = 5 - IPCTL_RTMAXCACHE = 7 - IPCTL_RTMINEXPIRE = 6 - IPCTL_SENDREDIRECTS = 2 - IPCTL_SOURCEROUTE = 8 - IPCTL_STATS = 12 - IPPORT_HIFIRSTAUTO = 49152 - IPPORT_HILASTAUTO = 65535 - IPPORT_RESERVED = 1024 - IPPORT_RESERVEDSTART = 600 - IPPORT_USERRESERVED = 5000 - IPPROTO_3PC = 34 - IPPROTO_ADFS = 68 - IPPROTO_AH = 51 - IPPROTO_AHIP = 61 - IPPROTO_APES = 99 - IPPROTO_ARGUS = 13 - IPPROTO_AX25 = 93 - IPPROTO_BHA = 49 - IPPROTO_BLT = 30 - IPPROTO_BRSATMON = 76 - IPPROTO_CFTP = 62 - IPPROTO_CHAOS = 16 - IPPROTO_CMTP = 38 - IPPROTO_CPHB = 73 - IPPROTO_CPNX = 72 - IPPROTO_DDP = 37 - IPPROTO_DGP = 86 - IPPROTO_DIVERT = 254 - IPPROTO_DONE = 257 - IPPROTO_DSTOPTS = 60 - IPPROTO_EGP = 8 - IPPROTO_EMCON = 14 - IPPROTO_ENCAP = 98 - IPPROTO_EON = 80 - IPPROTO_ESP = 50 - IPPROTO_ETHERIP = 97 - IPPROTO_FRAGMENT = 44 - IPPROTO_GGP = 3 - IPPROTO_GMTP = 100 - IPPROTO_GRE = 47 - IPPROTO_HELLO = 63 - IPPROTO_HMP = 20 - IPPROTO_HOPOPTS = 0 - IPPROTO_ICMP = 1 - IPPROTO_ICMPV6 = 58 - IPPROTO_IDP = 22 - IPPROTO_IDPR = 35 - IPPROTO_IDRP = 45 - IPPROTO_IGMP = 2 - IPPROTO_IGP = 85 - IPPROTO_IGRP = 88 - IPPROTO_IL = 40 - IPPROTO_INLSP = 52 - IPPROTO_INP = 32 - IPPROTO_IP = 0 - IPPROTO_IPCOMP = 108 - IPPROTO_IPCV = 71 - IPPROTO_IPEIP = 94 - IPPROTO_IPIP = 4 - IPPROTO_IPPC = 67 - IPPROTO_IPV4 = 4 - IPPROTO_IPV6 = 41 - IPPROTO_IRTP = 28 - IPPROTO_KRYPTOLAN = 65 - IPPROTO_LARP = 91 - IPPROTO_LEAF1 = 25 - IPPROTO_LEAF2 = 26 - IPPROTO_MAX = 256 - IPPROTO_MAXID = 52 - IPPROTO_MEAS = 19 - IPPROTO_MHRP = 48 - IPPROTO_MICP = 95 - IPPROTO_MTP = 92 - IPPROTO_MUX = 18 - IPPROTO_ND = 77 - IPPROTO_NHRP = 54 - IPPROTO_NONE = 59 - IPPROTO_NSP = 31 - IPPROTO_NVPII = 11 - IPPROTO_OSPFIGP = 89 - IPPROTO_PGM = 113 - IPPROTO_PIGP = 9 - IPPROTO_PIM = 103 - IPPROTO_PRM = 21 - IPPROTO_PUP = 12 - IPPROTO_PVP = 75 - IPPROTO_RAW = 255 - IPPROTO_RCCMON = 10 - IPPROTO_RDP = 27 - IPPROTO_ROUTING = 43 - IPPROTO_RSVP = 46 - IPPROTO_RVD = 66 - IPPROTO_SATEXPAK = 64 - IPPROTO_SATMON = 69 - IPPROTO_SCCSP = 96 - IPPROTO_SCTP = 132 - IPPROTO_SDRP = 42 - IPPROTO_SEP = 33 - IPPROTO_SRPC = 90 - IPPROTO_ST = 7 - IPPROTO_SVMTP = 82 - IPPROTO_SWIPE = 53 - IPPROTO_TCF = 87 - IPPROTO_TCP = 6 - IPPROTO_TP = 29 - IPPROTO_TPXX = 39 - IPPROTO_TRUNK1 = 23 - IPPROTO_TRUNK2 = 24 - IPPROTO_TTP = 84 - IPPROTO_UDP = 17 - IPPROTO_VINES = 83 - IPPROTO_VISA = 70 - IPPROTO_VMTP = 81 - IPPROTO_WBEXPAK = 79 - IPPROTO_WBMON = 78 - IPPROTO_WSN = 74 - IPPROTO_XNET = 15 - IPPROTO_XTP = 36 - IPV6CTL_ACCEPT_RTADV = 12 - IPV6CTL_ADDRCTLPOLICY = 38 - IPV6CTL_AUTO_FLOWLABEL = 17 - IPV6CTL_AUTO_LINKLOCAL = 35 - IPV6CTL_DAD_COUNT = 16 - IPV6CTL_DEFHLIM = 3 - IPV6CTL_DEFMCASTHLIM = 18 - IPV6CTL_FORWARDING = 1 - IPV6CTL_FORWSRCRT = 5 - IPV6CTL_GIF_HLIM = 19 - IPV6CTL_HDRNESTLIMIT = 15 - IPV6CTL_KAME_VERSION = 20 - IPV6CTL_KEEPFAITH = 13 - IPV6CTL_LOG_INTERVAL = 14 - IPV6CTL_MAXDYNROUTES = 49 - IPV6CTL_MAXFRAGPACKETS = 9 - IPV6CTL_MAXFRAGS = 41 - IPV6CTL_MAXID = 51 - IPV6CTL_MAXIFDEFROUTERS = 48 - IPV6CTL_MAXIFPREFIXES = 47 - IPV6CTL_MCAST_PMTU = 44 - IPV6CTL_MRTPROTO = 8 - IPV6CTL_MRTSTATS = 7 - IPV6CTL_NEIGHBORGCTHRESH = 46 - IPV6CTL_PREFER_TEMPADDR = 37 - IPV6CTL_RIP6STATS = 36 - IPV6CTL_RR_PRUNE = 22 - IPV6CTL_RTEXPIRE = 25 - IPV6CTL_RTMAXCACHE = 27 - IPV6CTL_RTMINEXPIRE = 26 - IPV6CTL_SENDREDIRECTS = 2 - IPV6CTL_SOURCECHECK = 10 - IPV6CTL_SOURCECHECK_LOGINT = 11 - IPV6CTL_STATS = 6 - IPV6CTL_TEMPPLTIME = 33 - IPV6CTL_TEMPVLTIME = 34 - IPV6CTL_USETEMPADDR = 32 - IPV6CTL_USE_DEFAULTZONE = 39 - IPV6CTL_USE_DEPRECATED = 21 - IPV6CTL_V6ONLY = 24 - IPV6PORT_ANONMAX = 65535 - IPV6PORT_ANONMIN = 49152 - IPV6PORT_RESERVED = 1024 - IPV6PORT_RESERVEDMAX = 1023 - IPV6PORT_RESERVEDMIN = 600 - IPV6PROTO_MAXID = 104 - IPV6_2292DSTOPTS = 23 - IPV6_2292HOPLIMIT = 20 - IPV6_2292HOPOPTS = 22 - IPV6_2292NEXTHOP = 21 - IPV6_2292PKTINFO = 19 - IPV6_2292PKTOPTIONS = 25 - IPV6_2292RTHDR = 24 - IPV6_BINDV6ONLY = 27 - IPV6_BOUND_IF = 125 - IPV6_CHECKSUM = 26 - IPV6_DEFAULT_MULTICAST_HOPS = 1 - IPV6_DEFAULT_MULTICAST_LOOP = 1 - IPV6_FAITH = 29 - IPV6_FW_ADD = 30 - IPV6_FW_DEL = 31 - IPV6_FW_FLUSH = 32 - IPV6_FW_GET = 34 - IPV6_FW_ZERO = 33 - IPV6_IPSEC_POLICY = 28 - IPV6_JOIN_GROUP = 12 - IPV6_LEAVE_GROUP = 13 - IPV6_MAX_GROUP_SRC_FILTER = 512 - IPV6_MAX_MEMBERSHIPS = 4095 - IPV6_MAX_SOCK_SRC_FILTER = 128 - IPV6_MIN_MEMBERSHIPS = 31 - IPV6_MULTICAST_HOPS = 10 - IPV6_MULTICAST_IF = 9 - IPV6_MULTICAST_LOOP = 11 - IPV6_PORTRANGE = 14 - IPV6_PORTRANGE_DEFAULT = 0 - IPV6_PORTRANGE_HIGH = 1 - IPV6_PORTRANGE_LOW = 2 - IPV6_RECVTCLASS = 35 - IPV6_RTHDR_LOOSE = 0 - IPV6_RTHDR_STRICT = 1 - IPV6_RTHDR_TYPE_0 = 0 - IPV6_SOCKOPT_RESERVED1 = 3 - IPV6_TCLASS = 36 - IPV6_UNICAST_HOPS = 4 - IPV6_V6ONLY = 27 - IP_ADD_MEMBERSHIP = 12 - IP_ADD_SOURCE_MEMBERSHIP = 70 - IP_BLOCK_SOURCE = 72 - IP_BOUND_IF = 25 - IP_DEFAULT_MULTICAST_LOOP = 1 - IP_DEFAULT_MULTICAST_TTL = 1 - IP_DROP_MEMBERSHIP = 13 - IP_DROP_SOURCE_MEMBERSHIP = 71 - IP_DUMMYNET_CONFIGURE = 60 - IP_DUMMYNET_DEL = 61 - IP_DUMMYNET_FLUSH = 62 - IP_DUMMYNET_GET = 64 - IP_FAITH = 22 - IP_FW_ADD = 40 - IP_FW_DEL = 41 - IP_FW_FLUSH = 42 - IP_FW_GET = 44 - IP_FW_RESETLOG = 45 - IP_FW_ZERO = 43 - IP_HDRINCL = 2 - IP_IPSEC_POLICY = 21 - IP_MAX_GROUP_SRC_FILTER = 512 - IP_MAX_MEMBERSHIPS = 4095 - IP_MAX_SOCK_MUTE_FILTER = 128 - IP_MAX_SOCK_SRC_FILTER = 128 - IP_MIN_MEMBERSHIPS = 31 - IP_MSFILTER = 74 - IP_MULTICAST_IF = 9 - IP_MULTICAST_IFINDEX = 66 - IP_MULTICAST_LOOP = 11 - IP_MULTICAST_TTL = 10 - IP_MULTICAST_VIF = 14 - IP_NAT__XXX = 55 - IP_OLD_FW_ADD = 50 - IP_OLD_FW_DEL = 51 - IP_OLD_FW_FLUSH = 52 - IP_OLD_FW_GET = 54 - IP_OLD_FW_RESETLOG = 56 - IP_OLD_FW_ZERO = 53 - IP_OPTIONS = 1 - IP_PKTINFO = 26 - IP_PORTRANGE = 19 - IP_PORTRANGE_DEFAULT = 0 - IP_PORTRANGE_HIGH = 1 - IP_PORTRANGE_LOW = 2 - IP_RECVDSTADDR = 7 - IP_RECVIF = 20 - IP_RECVOPTS = 5 - IP_RECVPKTINFO = 26 - IP_RECVRETOPTS = 6 - IP_RECVTOS = 27 - IP_RECVTTL = 24 - IP_RETOPTS = 8 - IP_RSVP_OFF = 16 - IP_RSVP_ON = 15 - IP_RSVP_VIF_OFF = 18 - IP_RSVP_VIF_ON = 17 - IP_STRIPHDR = 23 - IP_TOS = 3 - IP_TRAFFIC_MGT_BACKGROUND = 65 - IP_TTL = 4 - IP_UNBLOCK_SOURCE = 73 - KEV_DL_ADDMULTI = 7 - KEV_DL_AWDL_RESTRICTED = 26 - KEV_DL_AWDL_UNRESTRICTED = 27 - KEV_DL_DELMULTI = 8 - KEV_DL_IFCAP_CHANGED = 19 - KEV_DL_IFDELEGATE_CHANGED = 25 - KEV_DL_IF_ATTACHED = 9 - KEV_DL_IF_DETACHED = 11 - KEV_DL_IF_DETACHING = 10 - KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 - KEV_DL_ISSUES = 24 - KEV_DL_LINK_ADDRESS_CHANGED = 16 - KEV_DL_LINK_OFF = 12 - KEV_DL_LINK_ON = 13 - KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 - KEV_DL_LOW_POWER_MODE_CHANGED = 30 - KEV_DL_MASTER_ELECTED = 23 - KEV_DL_NODE_ABSENCE = 22 - KEV_DL_NODE_PRESENCE = 21 - KEV_DL_PROTO_ATTACHED = 14 - KEV_DL_PROTO_DETACHED = 15 - KEV_DL_QOS_MODE_CHANGED = 29 - KEV_DL_RRC_STATE_CHANGED = 28 - KEV_DL_SIFFLAGS = 1 - KEV_DL_SIFGENERIC = 6 - KEV_DL_SIFMEDIA = 5 - KEV_DL_SIFMETRICS = 2 - KEV_DL_SIFMTU = 3 - KEV_DL_SIFPHYS = 4 - KEV_DL_SUBCLASS = 2 - KEV_DL_WAKEFLAGS_CHANGED = 17 - KEV_INET6_ADDR_DELETED = 3 - KEV_INET6_CHANGED_ADDR = 2 - KEV_INET6_DEFROUTER = 6 - KEV_INET6_NEW_LL_ADDR = 4 - KEV_INET6_NEW_RTADV_ADDR = 5 - KEV_INET6_NEW_USER_ADDR = 1 - KEV_INET6_REQUEST_NAT64_PREFIX = 7 - KEV_INET6_SUBCLASS = 6 - KEV_INET_ADDR_DELETED = 3 - KEV_INET_ARPCOLLISION = 7 - KEV_INET_ARPRTRALIVE = 10 - KEV_INET_ARPRTRFAILURE = 9 - KEV_INET_CHANGED_ADDR = 2 - KEV_INET_NEW_ADDR = 1 - KEV_INET_PORTINUSE = 8 - KEV_INET_SIFBRDADDR = 5 - KEV_INET_SIFDSTADDR = 4 - KEV_INET_SIFNETMASK = 6 - KEV_INET_SUBCLASS = 1 - LITTLE_ENDIAN = 1234 - MCAST_BLOCK_SOURCE = 84 - MCAST_EXCLUDE = 2 - MCAST_INCLUDE = 1 - MCAST_JOIN_GROUP = 80 - MCAST_JOIN_SOURCE_GROUP = 82 - MCAST_LEAVE_GROUP = 81 - MCAST_LEAVE_SOURCE_GROUP = 83 - MCAST_UNBLOCK_SOURCE = 85 - MCAST_UNDEFINED = 0 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - NBBY = 8 - NETSVC_MRKNG_LVL_L2 = 1 - NETSVC_MRKNG_LVL_L3L2_ALL = 2 - NETSVC_MRKNG_LVL_L3L2_BK = 3 - NETSVC_MRKNG_UNKNOWN = 0 - NET_MAXID = 40 - NET_RT_DUMP = 1 - NET_RT_DUMP2 = 7 - NET_RT_FLAGS = 2 - NET_RT_FLAGS_PRIV = 10 - NET_RT_IFLIST = 3 - NET_RT_IFLIST2 = 6 - NET_RT_MAXID = 11 - NET_RT_STAT = 4 - NET_RT_TRASH = 5 - NET_SERVICE_TYPE_AV = 6 - NET_SERVICE_TYPE_BE = 0 - NET_SERVICE_TYPE_BK = 1 - NET_SERVICE_TYPE_OAM = 7 - NET_SERVICE_TYPE_RD = 8 - NET_SERVICE_TYPE_RV = 5 - NET_SERVICE_TYPE_SIG = 2 - NET_SERVICE_TYPE_VI = 3 - NET_SERVICE_TYPE_VO = 4 - PDP_ENDIAN = 3412 - PF_APPLETALK = 16 - PF_CCITT = 10 - PF_CHAOS = 5 - PF_CNT = 21 - PF_COIP = 20 - PF_DATAKIT = 9 - PF_DECnet = 12 - PF_DLI = 13 - PF_ECMA = 8 - PF_HYLINK = 15 - PF_IMPLINK = 3 - PF_INET = 2 - PF_INET6 = 30 - PF_IPX = 23 - PF_ISDN = 28 - PF_ISO = 7 - PF_KEY = 29 - PF_LAT = 14 - PF_LINK = 18 - PF_LOCAL = 1 - PF_MAX = 40 - PF_NATM = 31 - PF_NDRV = 27 - PF_NETBIOS = 33 - PF_NS = 6 - PF_OSI = 7 - PF_PIP = 25 - PF_PPP = 34 - PF_PUP = 4 - PF_RESERVED_36 = 36 - PF_ROUTE = 17 - PF_RTIP = 22 - PF_SIP = 24 - PF_SNA = 11 - PF_SYSTEM = 32 - PF_UNIX = 1 - PF_UNSPEC = 0 - PF_UTUN = 38 - PF_XTP = 19 - PTRDIFF_MAX = 9223372036854775807 - PTRDIFF_MIN = -9223372036854775808 - RSIZE_MAX = 9223372036854775807 - SAE_ASSOCID_ANY = 0 - SAE_CONNID_ANY = 0 - SCM_CREDS = 0x03 - SCM_RIGHTS = 0x01 - SCM_TIMESTAMP = 0x02 - SCM_TIMESTAMP_MONOTONIC = 0x04 - SHUT_RD = 0 - SHUT_RDWR = 2 - SHUT_WR = 1 - SIG_ATOMIC_MAX = 2147483647 - SIG_ATOMIC_MIN = -2147483648 - SIN6_LEN = 0 - SIZE_MAX = 18446744073709551615 - SOCK_DGRAM = 2 - SOCK_MAXADDRLEN = 255 - SOCK_RAW = 3 - SOCK_RDM = 4 - SOCK_SEQPACKET = 5 - SOCK_STREAM = 1 - SOL_SOCKET = 0xffff - SOMAXCONN = 128 - SONPX_SETOPTSHUT = 0x000000001 - SO_ACCEPTCONN = 0x0002 - SO_BROADCAST = 0x0020 - SO_DEBUG = 0x0001 - SO_DONTROUTE = 0x0010 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x0008 - SO_LABEL = 0x1010 - SO_LINGER = 0x0080 - SO_LINGER_SEC = 0x1080 - SO_NETSVC_MARKING_LEVEL = 0x1119 - SO_NET_SERVICE_TYPE = 0x1116 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NUMRCVPKT = 0x1112 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x0100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x0004 - SO_REUSEPORT = 0x0200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x0400 - SO_TIMESTAMP_MONOTONIC = 0x0800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x0040 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - UINT16_MAX = 65535 - UINT32_MAX = 4294967295 - UINT64_MAX = 18446744073709551615 - UINT8_MAX = 255 - UINTMAX_MAX = 18446744073709551615 - UINTPTR_MAX = 18446744073709551615 - UINT_FAST16_MAX = 65535 - UINT_FAST32_MAX = 4294967295 - UINT_FAST64_MAX = 18446744073709551615 - UINT_FAST8_MAX = 255 - UINT_LEAST16_MAX = 65535 - UINT_LEAST32_MAX = 4294967295 - UINT_LEAST64_MAX = 18446744073709551615 - UINT_LEAST8_MAX = 255 - WCHAR_MAX = 2147483647 - WCHAR_MIN = -2147483648 - WINT_MAX = 2147483647 - WINT_MIN = -2147483648 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_I386__PARAM_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NETINET6_IN6_H_ = 0 - X_NETINET_IN_H_ = 0 - X_NET_NETKEV_H_ = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SA_FAMILY_T = 0 - X_SIZE_T = 0 - X_SOCKLEN_T = 0 - X_SSIZE_T = 0 - X_SS_MAXSIZE = 128 - X_STRUCT_IOVEC = 0 - X_SUSECONDS_T = 0 - X_SYS_SOCKET_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 - Pseudo_AF_HDRCMPLT = 35 - Pseudo_AF_KEY = 29 - Pseudo_AF_PIP = 25 - Pseudo_AF_RTIP = 22 - Pseudo_AF_XTP = 19 + AF_APPLETALK = 16 // socket.h:375:1: + AF_CCITT = 10 // socket.h:369:1: + AF_CHAOS = 5 // socket.h:363:1: + AF_CNT = 21 // socket.h:380:1: + AF_COIP = 20 // socket.h:379:1: + AF_DATAKIT = 9 // socket.h:368:1: + AF_DECnet = 12 // socket.h:371:1: + AF_DLI = 13 // socket.h:372:1: + AF_E164 = 28 // socket.h:387:1: + AF_ECMA = 8 // socket.h:367:1: + AF_HYLINK = 15 // socket.h:374:1: + AF_IEEE80211 = 37 // socket.h:399:1: + AF_IMPLINK = 3 // socket.h:361:1: + AF_INET = 2 // socket.h:359:1: + AF_INET6 = 30 // socket.h:390:1: + AF_IPX = 23 // socket.h:382:1: + AF_ISDN = 28 // socket.h:386:1: + AF_ISO = 7 // socket.h:365:1: + AF_LAT = 14 // socket.h:373:1: + AF_LINK = 18 // socket.h:377:1: + AF_LOCAL = 1 // socket.h:357:1: + AF_MAX = 40 // socket.h:401:1: + AF_NATM = 31 // socket.h:392:1: + AF_NDRV = 27 // socket.h:385:1: + AF_NETBIOS = 33 // socket.h:394:1: + AF_NS = 6 // socket.h:364:1: + AF_OSI = 7 // socket.h:366:1: + AF_PPP = 34 // socket.h:395:1: + AF_PUP = 4 // socket.h:362:1: + AF_RESERVED_36 = 36 // socket.h:398:1: + AF_ROUTE = 17 // socket.h:376:1: + AF_SIP = 24 // socket.h:383:1: + AF_SNA = 11 // socket.h:370:1: + AF_SYSTEM = 32 // socket.h:393:1: + AF_UNIX = 1 // socket.h:355:1: + AF_UNSPEC = 0 // socket.h:354:1: + AF_UTUN = 38 // socket.h:400:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CONNECT_DATA_AUTHENTICATED = 0x4 // socket.h:300:1: + CONNECT_DATA_IDEMPOTENT = 0x2 // socket.h:299:1: + CONNECT_RESUME_ON_READ_WRITE = 0x1 // socket.h:298:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + ICMP6_FILTER = 18 // in6.h:380:1: + ICMPV6CTL_ND6_ONLINKNSRFC4861 = 50 // in6.h:615:1: + INADDR_NONE = 0xffffffff // in.h:342:1: + INET6_ADDRSTRLEN = 46 // in6.h:161:1: + INET_ADDRSTRLEN = 16 // in.h:388:1: + INT16_MAX = 32767 // stdint.h:599:1: + INT16_MIN = -32768 // stdint.h:600:1: + INT32_MAX = 2147483647 // stdint.h:555:1: + INT32_MIN = -2147483648 // stdint.h:556:1: + INT64_MAX = 9223372036854775807 // stdint.h:461:1: + INT64_MIN = -9223372036854775808 // stdint.h:462:1: + INT8_MAX = 127 // stdint.h:621:1: + INT8_MIN = -128 // stdint.h:622:1: + INTMAX_MAX = 9223372036854775807 // stdint.h:663:1: + INTMAX_MIN = -9223372036854775808 // stdint.h:662:1: + INTPTR_MAX = 9223372036854775807 // stdint.h:649:1: + INTPTR_MIN = -9223372036854775808 // stdint.h:648:1: + INT_FAST16_MAX = 32767 // stdint.h:615:1: + INT_FAST16_MIN = -32768 // stdint.h:614:1: + INT_FAST32_MAX = 2147483647 // stdint.h:574:1: + INT_FAST32_MIN = -2147483648 // stdint.h:573:1: + INT_FAST64_MAX = 9223372036854775807 // stdint.h:483:1: + INT_FAST64_MIN = -9223372036854775808 // stdint.h:482:1: + INT_FAST8_MAX = 127 // stdint.h:634:1: + INT_FAST8_MIN = -128 // stdint.h:633:1: + INT_LEAST16_MAX = 32767 // stdint.h:612:1: + INT_LEAST16_MIN = -32768 // stdint.h:611:1: + INT_LEAST32_MAX = 2147483647 // stdint.h:571:1: + INT_LEAST32_MIN = -2147483648 // stdint.h:570:1: + INT_LEAST64_MAX = 9223372036854775807 // stdint.h:480:1: + INT_LEAST64_MIN = -9223372036854775808 // stdint.h:479:1: + INT_LEAST8_MAX = 127 // stdint.h:631:1: + INT_LEAST8_MIN = -128 // stdint.h:630:1: + IN_CLASSA_HOST = 0x00ffffff // in.h:317:1: + IN_CLASSA_MAX = 128 // in.h:318:1: + IN_CLASSA_NET = 0xff000000 // in.h:315:1: + IN_CLASSA_NSHIFT = 24 // in.h:316:1: + IN_CLASSB_HOST = 0x0000ffff // in.h:323:1: + IN_CLASSB_MAX = 65536 // in.h:324:1: + IN_CLASSB_NET = 0xffff0000 // in.h:321:1: + IN_CLASSB_NSHIFT = 16 // in.h:322:1: + IN_CLASSC_HOST = 0x000000ff // in.h:329:1: + IN_CLASSC_NET = 0xffffff00 // in.h:327:1: + IN_CLASSC_NSHIFT = 8 // in.h:328:1: + IN_CLASSD_HOST = 0x0fffffff // in.h:334:1: + IN_CLASSD_NET = 0xf0000000 // in.h:332:1: + IN_CLASSD_NSHIFT = 28 // in.h:333:1: + IN_LOOPBACKNET = 127 // in.h:369:1: + IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:649:1: + IPCTL_DEFTTL = 3 // in.h:637:1: + IPCTL_DIRECTEDBROADCAST = 9 // in.h:645:1: + IPCTL_FASTFORWARDING = 14 // in.h:650:1: + IPCTL_FORWARDING = 1 // in.h:635:1: + IPCTL_GIF_TTL = 16 // in.h:652:1: + IPCTL_INTRQDROPS = 11 // in.h:647:1: + IPCTL_INTRQMAXLEN = 10 // in.h:646:1: + IPCTL_KEEPFAITH = 15 // in.h:651:1: + IPCTL_MAXID = 17 // in.h:653:1: + IPCTL_RTEXPIRE = 5 // in.h:641:1: + IPCTL_RTMAXCACHE = 7 // in.h:643:1: + IPCTL_RTMINEXPIRE = 6 // in.h:642:1: + IPCTL_SENDREDIRECTS = 2 // in.h:636:1: + IPCTL_SOURCEROUTE = 8 // in.h:644:1: + IPCTL_STATS = 12 // in.h:648:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:286:1: + IPPORT_HILASTAUTO = 65535 // in.h:287:1: + IPPORT_RESERVED = 1024 // in.h:279:1: + IPPORT_RESERVEDSTART = 600 // in.h:295:1: + IPPORT_USERRESERVED = 5000 // in.h:281:1: + IPPROTO_3PC = 34 // in.h:139:1: + IPPROTO_ADFS = 68 // in.h:173:1: + IPPROTO_AH = 51 // in.h:158:1: + IPPROTO_AHIP = 61 // in.h:166:1: + IPPROTO_APES = 99 // in.h:204:1: + IPPROTO_ARGUS = 13 // in.h:116:1: + IPPROTO_AX25 = 93 // in.h:198:1: + IPPROTO_BHA = 49 // in.h:156:1: + IPPROTO_BLT = 30 // in.h:135:1: + IPPROTO_BRSATMON = 76 // in.h:181:1: + IPPROTO_CFTP = 62 // in.h:167:1: + IPPROTO_CHAOS = 16 // in.h:119:1: + IPPROTO_CMTP = 38 // in.h:143:1: + IPPROTO_CPHB = 73 // in.h:178:1: + IPPROTO_CPNX = 72 // in.h:177:1: + IPPROTO_DDP = 37 // in.h:142:1: + IPPROTO_DGP = 86 // in.h:191:1: + IPPROTO_DIVERT = 254 // in.h:213:1: + IPPROTO_DONE = 257 // in.h:221:1: + IPPROTO_DSTOPTS = 60 // in.h:165:1: + IPPROTO_EGP = 8 // in.h:111:1: + IPPROTO_EMCON = 14 // in.h:117:1: + IPPROTO_ENCAP = 98 // in.h:203:1: + IPPROTO_EON = 80 // in.h:185:1: + IPPROTO_ESP = 50 // in.h:157:1: + IPPROTO_ETHERIP = 97 // in.h:202:1: + IPPROTO_FRAGMENT = 44 // in.h:151:1: + IPPROTO_GGP = 3 // in.h:104:1: + IPPROTO_GMTP = 100 // in.h:205:1: + IPPROTO_GRE = 47 // in.h:154:1: + IPPROTO_HELLO = 63 // in.h:168:1: + IPPROTO_HMP = 20 // in.h:125:1: + IPPROTO_HOPOPTS = 0 // in.h:99:1: + IPPROTO_ICMP = 1 // in.h:101:1: + IPPROTO_ICMPV6 = 58 // in.h:163:1: + IPPROTO_IDP = 22 // in.h:127:1: + IPPROTO_IDPR = 35 // in.h:140:1: + IPPROTO_IDRP = 45 // in.h:152:1: + IPPROTO_IGMP = 2 // in.h:103:1: + IPPROTO_IGP = 85 // in.h:190:1: + IPPROTO_IGRP = 88 // in.h:193:1: + IPPROTO_IL = 40 // in.h:145:1: + IPPROTO_INLSP = 52 // in.h:159:1: + IPPROTO_INP = 32 // in.h:137:1: + IPPROTO_IP = 0 // in.h:97:1: + IPPROTO_IPCOMP = 108 // in.h:208:1: + IPPROTO_IPCV = 71 // in.h:176:1: + IPPROTO_IPEIP = 94 // in.h:199:1: + IPPROTO_IPIP = 4 // in.h:106:1: + IPPROTO_IPPC = 67 // in.h:172:1: + IPPROTO_IPV4 = 4 // in.h:105:1: + IPPROTO_IPV6 = 41 // in.h:147:1: + IPPROTO_IRTP = 28 // in.h:133:1: + IPPROTO_KRYPTOLAN = 65 // in.h:170:1: + IPPROTO_LARP = 91 // in.h:196:1: + IPPROTO_LEAF1 = 25 // in.h:130:1: + IPPROTO_LEAF2 = 26 // in.h:131:1: + IPPROTO_MAX = 256 // in.h:218:1: + IPPROTO_MAXID = 52 // in.h:629:1: + IPPROTO_MEAS = 19 // in.h:124:1: + IPPROTO_MHRP = 48 // in.h:155:1: + IPPROTO_MICP = 95 // in.h:200:1: + IPPROTO_MTP = 92 // in.h:197:1: + IPPROTO_MUX = 18 // in.h:123:1: + IPPROTO_ND = 77 // in.h:182:1: + IPPROTO_NHRP = 54 // in.h:161:1: + IPPROTO_NONE = 59 // in.h:164:1: + IPPROTO_NSP = 31 // in.h:136:1: + IPPROTO_NVPII = 11 // in.h:114:1: + IPPROTO_OSPFIGP = 89 // in.h:194:1: + IPPROTO_PGM = 113 // in.h:209:1: + IPPROTO_PIGP = 9 // in.h:112:1: + IPPROTO_PIM = 103 // in.h:207:1: + IPPROTO_PRM = 21 // in.h:126:1: + IPPROTO_PUP = 12 // in.h:115:1: + IPPROTO_PVP = 75 // in.h:180:1: + IPPROTO_RAW = 255 // in.h:215:1: + IPPROTO_RCCMON = 10 // in.h:113:1: + IPPROTO_RDP = 27 // in.h:132:1: + IPPROTO_ROUTING = 43 // in.h:150:1: + IPPROTO_RSVP = 46 // in.h:153:1: + IPPROTO_RVD = 66 // in.h:171:1: + IPPROTO_SATEXPAK = 64 // in.h:169:1: + IPPROTO_SATMON = 69 // in.h:174:1: + IPPROTO_SCCSP = 96 // in.h:201:1: + IPPROTO_SCTP = 132 // in.h:210:1: + IPPROTO_SDRP = 42 // in.h:149:1: + IPPROTO_SEP = 33 // in.h:138:1: + IPPROTO_SRPC = 90 // in.h:195:1: + IPPROTO_ST = 7 // in.h:110:1: + IPPROTO_SVMTP = 82 // in.h:187:1: + IPPROTO_SWIPE = 53 // in.h:160:1: + IPPROTO_TCF = 87 // in.h:192:1: + IPPROTO_TCP = 6 // in.h:108:1: + IPPROTO_TP = 29 // in.h:134:1: + IPPROTO_TPXX = 39 // in.h:144:1: + IPPROTO_TRUNK1 = 23 // in.h:128:1: + IPPROTO_TRUNK2 = 24 // in.h:129:1: + IPPROTO_TTP = 84 // in.h:189:1: + IPPROTO_UDP = 17 // in.h:121:1: + IPPROTO_VINES = 83 // in.h:188:1: + IPPROTO_VISA = 70 // in.h:175:1: + IPPROTO_VMTP = 81 // in.h:186:1: + IPPROTO_WBEXPAK = 79 // in.h:184:1: + IPPROTO_WBMON = 78 // in.h:183:1: + IPPROTO_WSN = 74 // in.h:179:1: + IPPROTO_XNET = 15 // in.h:118:1: + IPPROTO_XTP = 36 // in.h:141:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:580:1: + IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:605:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:585:1: + IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:602:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:584:1: + IPV6CTL_DEFHLIM = 3 // in6.h:569:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:586:1: + IPV6CTL_FORWARDING = 1 // in6.h:567:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:573:1: + IPV6CTL_GIF_HLIM = 19 // in6.h:587:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:583:1: + IPV6CTL_KAME_VERSION = 20 // in6.h:588:1: + IPV6CTL_KEEPFAITH = 13 // in6.h:581:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:582:1: + IPV6CTL_MAXDYNROUTES = 49 // in6.h:614:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:577:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:608:1: + IPV6CTL_MAXID = 51 // in6.h:619:1: + IPV6CTL_MAXIFDEFROUTERS = 48 // in6.h:613:1: + IPV6CTL_MAXIFPREFIXES = 47 // in6.h:612:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:609:1: + IPV6CTL_MRTPROTO = 8 // in6.h:576:1: + IPV6CTL_MRTSTATS = 7 // in6.h:575:1: + IPV6CTL_NEIGHBORGCTHRESH = 46 // in6.h:611:1: + IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:604:1: + IPV6CTL_RIP6STATS = 36 // in6.h:603:1: + IPV6CTL_RR_PRUNE = 22 // in6.h:590:1: + IPV6CTL_RTEXPIRE = 25 // in6.h:595:1: + IPV6CTL_RTMAXCACHE = 27 // in6.h:597:1: + IPV6CTL_RTMINEXPIRE = 26 // in6.h:596:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:568:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:578:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:579:1: + IPV6CTL_STATS = 6 // in6.h:574:1: + IPV6CTL_TEMPPLTIME = 33 // in6.h:600:1: + IPV6CTL_TEMPVLTIME = 34 // in6.h:601:1: + IPV6CTL_USETEMPADDR = 32 // in6.h:599:1: + IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:606:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:589:1: + IPV6CTL_V6ONLY = 24 // in6.h:594:1: + IPV6PORT_ANONMAX = 65535 // in6.h:143:1: + IPV6PORT_ANONMIN = 49152 // in6.h:142:1: + IPV6PORT_RESERVED = 1024 // in6.h:141:1: + IPV6PORT_RESERVEDMAX = 1023 // in6.h:145:1: + IPV6PORT_RESERVEDMIN = 600 // in6.h:144:1: + IPV6PROTO_MAXID = 104 // in6.h:562:1: + IPV6_2292DSTOPTS = 23 // in6.h:385:1: + IPV6_2292HOPLIMIT = 20 // in6.h:382:1: + IPV6_2292HOPOPTS = 22 // in6.h:384:1: + IPV6_2292NEXTHOP = 21 // in6.h:383:1: + IPV6_2292PKTINFO = 19 // in6.h:381:1: + IPV6_2292PKTOPTIONS = 25 // in6.h:389:1: + IPV6_2292RTHDR = 24 // in6.h:386:1: + IPV6_BINDV6ONLY = 27 // in6.h:405:1: + IPV6_BOUND_IF = 125 // in6.h:494:1: + IPV6_CHECKSUM = 26 // in6.h:401:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:506:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:507:1: + IPV6_FAITH = 29 // in6.h:411:1: + IPV6_FW_ADD = 30 // in6.h:414:1: + IPV6_FW_DEL = 31 // in6.h:415:1: + IPV6_FW_FLUSH = 32 // in6.h:416:1: + IPV6_FW_GET = 34 // in6.h:418:1: + IPV6_FW_ZERO = 33 // in6.h:417:1: + IPV6_IPSEC_POLICY = 28 // in6.h:409:1: + IPV6_JOIN_GROUP = 12 // in6.h:375:1: + IPV6_LEAVE_GROUP = 13 // in6.h:376:1: + IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:521:1: + IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:515:1: + IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:522:1: + IPV6_MIN_MEMBERSHIPS = 31 // in6.h:514:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:373:1: + IPV6_MULTICAST_IF = 9 // in6.h:372:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:374:1: + IPV6_PORTRANGE = 14 // in6.h:379:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:552:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:553:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:554:1: + IPV6_RECVTCLASS = 35 // in6.h:426:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:499:1: + IPV6_RTHDR_STRICT = 1 // in6.h:500:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:501:1: + IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:369:1: + IPV6_TCLASS = 36 // in6.h:427:1: + IPV6_UNICAST_HOPS = 4 // in6.h:371:1: + IPV6_V6ONLY = 27 // in6.h:403:1: + IP_ADD_MEMBERSHIP = 12 // in.h:418:1: + IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:464:1: + IP_BLOCK_SOURCE = 72 // in.h:466:1: + IP_BOUND_IF = 25 // in.h:434:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:485:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:484:1: + IP_DROP_MEMBERSHIP = 13 // in.h:419:1: + IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:465:1: + IP_DUMMYNET_CONFIGURE = 60 // in.h:455:1: + IP_DUMMYNET_DEL = 61 // in.h:456:1: + IP_DUMMYNET_FLUSH = 62 // in.h:457:1: + IP_DUMMYNET_GET = 64 // in.h:458:1: + IP_FAITH = 22 // in.h:429:1: + IP_FW_ADD = 40 // in.h:439:1: + IP_FW_DEL = 41 // in.h:440:1: + IP_FW_FLUSH = 42 // in.h:441:1: + IP_FW_GET = 44 // in.h:443:1: + IP_FW_RESETLOG = 45 // in.h:444:1: + IP_FW_ZERO = 43 // in.h:442:1: + IP_HDRINCL = 2 // in.h:408:1: + IP_IPSEC_POLICY = 21 // in.h:428:1: + IP_MAX_GROUP_SRC_FILTER = 512 // in.h:499:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:493:1: + IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:501:1: + IP_MAX_SOCK_SRC_FILTER = 128 // in.h:500:1: + IP_MIN_MEMBERSHIPS = 31 // in.h:492:1: + IP_MSFILTER = 74 // in.h:470:1: + IP_MULTICAST_IF = 9 // in.h:415:1: + IP_MULTICAST_IFINDEX = 66 // in.h:461:1: + IP_MULTICAST_LOOP = 11 // in.h:417:1: + IP_MULTICAST_TTL = 10 // in.h:416:1: + IP_MULTICAST_VIF = 14 // in.h:420:1: + IP_NAT__XXX = 55 // in.h:452:1: + IP_OLD_FW_ADD = 50 // in.h:447:1: + IP_OLD_FW_DEL = 51 // in.h:448:1: + IP_OLD_FW_FLUSH = 52 // in.h:449:1: + IP_OLD_FW_GET = 54 // in.h:451:1: + IP_OLD_FW_RESETLOG = 56 // in.h:453:1: + IP_OLD_FW_ZERO = 53 // in.h:450:1: + IP_OPTIONS = 1 // in.h:407:1: + IP_PKTINFO = 26 // in.h:435:1: + IP_PORTRANGE = 19 // in.h:425:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:593:1: + IP_PORTRANGE_HIGH = 1 // in.h:594:1: + IP_PORTRANGE_LOW = 2 // in.h:595:1: + IP_RECVDSTADDR = 7 // in.h:413:1: + IP_RECVIF = 20 // in.h:426:1: + IP_RECVOPTS = 5 // in.h:411:1: + IP_RECVPKTINFO = 26 // in.h:436:1: + IP_RECVRETOPTS = 6 // in.h:412:1: + IP_RECVTOS = 27 // in.h:437:1: + IP_RECVTTL = 24 // in.h:433:1: + IP_RETOPTS = 8 // in.h:414:1: + IP_RSVP_OFF = 16 // in.h:422:1: + IP_RSVP_ON = 15 // in.h:421:1: + IP_RSVP_VIF_OFF = 18 // in.h:424:1: + IP_RSVP_VIF_ON = 17 // in.h:423:1: + IP_STRIPHDR = 23 // in.h:431:1: + IP_TOS = 3 // in.h:409:1: + IP_TRAFFIC_MGT_BACKGROUND = 65 // in.h:460:1: + IP_TTL = 4 // in.h:410:1: + IP_UNBLOCK_SOURCE = 73 // in.h:467:1: + KEV_DL_ADDMULTI = 7 // net_kev.h:61:1: + KEV_DL_AWDL_RESTRICTED = 26 // net_kev.h:80:1: + KEV_DL_AWDL_UNRESTRICTED = 27 // net_kev.h:81:1: + KEV_DL_DELMULTI = 8 // net_kev.h:62:1: + KEV_DL_IFCAP_CHANGED = 19 // net_kev.h:73:1: + KEV_DL_IFDELEGATE_CHANGED = 25 // net_kev.h:79:1: + KEV_DL_IF_ATTACHED = 9 // net_kev.h:63:1: + KEV_DL_IF_DETACHED = 11 // net_kev.h:65:1: + KEV_DL_IF_DETACHING = 10 // net_kev.h:64:1: + KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 // net_kev.h:72:1: + KEV_DL_ISSUES = 24 // net_kev.h:78:1: + KEV_DL_LINK_ADDRESS_CHANGED = 16 // net_kev.h:70:1: + KEV_DL_LINK_OFF = 12 // net_kev.h:66:1: + KEV_DL_LINK_ON = 13 // net_kev.h:67:1: + KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 // net_kev.h:74:1: + KEV_DL_LOW_POWER_MODE_CHANGED = 30 // net_kev.h:84:1: + KEV_DL_MASTER_ELECTED = 23 // net_kev.h:77:1: + KEV_DL_NODE_ABSENCE = 22 // net_kev.h:76:1: + KEV_DL_NODE_PRESENCE = 21 // net_kev.h:75:1: + KEV_DL_PROTO_ATTACHED = 14 // net_kev.h:68:1: + KEV_DL_PROTO_DETACHED = 15 // net_kev.h:69:1: + KEV_DL_QOS_MODE_CHANGED = 29 // net_kev.h:83:1: + KEV_DL_RRC_STATE_CHANGED = 28 // net_kev.h:82:1: + KEV_DL_SIFFLAGS = 1 // net_kev.h:55:1: + KEV_DL_SIFGENERIC = 6 // net_kev.h:60:1: + KEV_DL_SIFMEDIA = 5 // net_kev.h:59:1: + KEV_DL_SIFMETRICS = 2 // net_kev.h:56:1: + KEV_DL_SIFMTU = 3 // net_kev.h:57:1: + KEV_DL_SIFPHYS = 4 // net_kev.h:58:1: + KEV_DL_SUBCLASS = 2 // net_kev.h:50:1: + KEV_DL_WAKEFLAGS_CHANGED = 17 // net_kev.h:71:1: + KEV_INET6_ADDR_DELETED = 3 // net_kev.h:91:1: + KEV_INET6_CHANGED_ADDR = 2 // net_kev.h:90:1: + KEV_INET6_DEFROUTER = 6 // net_kev.h:94:1: + KEV_INET6_NEW_LL_ADDR = 4 // net_kev.h:92:1: + KEV_INET6_NEW_RTADV_ADDR = 5 // net_kev.h:93:1: + KEV_INET6_NEW_USER_ADDR = 1 // net_kev.h:89:1: + KEV_INET6_REQUEST_NAT64_PREFIX = 7 // net_kev.h:95:1: + KEV_INET6_SUBCLASS = 6 // net_kev.h:87:1: + KEV_INET_ADDR_DELETED = 3 // net_kev.h:39:1: + KEV_INET_ARPCOLLISION = 7 // net_kev.h:43:1: + KEV_INET_ARPRTRALIVE = 10 // net_kev.h:48:1: + KEV_INET_ARPRTRFAILURE = 9 // net_kev.h:47:1: + KEV_INET_CHANGED_ADDR = 2 // net_kev.h:38:1: + KEV_INET_NEW_ADDR = 1 // net_kev.h:37:1: + KEV_INET_PORTINUSE = 8 // net_kev.h:45:1: + KEV_INET_SIFBRDADDR = 5 // net_kev.h:41:1: + KEV_INET_SIFDSTADDR = 4 // net_kev.h:40:1: + KEV_INET_SIFNETMASK = 6 // net_kev.h:42:1: + KEV_INET_SUBCLASS = 1 // net_kev.h:35:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MCAST_BLOCK_SOURCE = 84 // in.h:477:1: + MCAST_EXCLUDE = 2 // in.h:587:1: + MCAST_INCLUDE = 1 // in.h:586:1: + MCAST_JOIN_GROUP = 80 // in.h:473:1: + MCAST_JOIN_SOURCE_GROUP = 82 // in.h:475:1: + MCAST_LEAVE_GROUP = 81 // in.h:474:1: + MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:476:1: + MCAST_UNBLOCK_SOURCE = 85 // in.h:478:1: + MCAST_UNDEFINED = 0 // in.h:585:1: + MSG_CTRUNC = 0x20 // socket.h:563:1: + MSG_DONTROUTE = 0x4 // socket.h:560:1: + MSG_DONTWAIT = 0x80 // socket.h:566:1: + MSG_EOF = 0x100 // socket.h:567:1: + MSG_EOR = 0x8 // socket.h:561:1: + MSG_FLUSH = 0x400 // socket.h:572:1: + MSG_HAVEMORE = 0x2000 // socket.h:575:1: + MSG_HOLD = 0x800 // socket.h:573:1: + MSG_NEEDSA = 0x10000 // socket.h:578:1: + MSG_OOB = 0x1 // socket.h:558:1: + MSG_PEEK = 0x2 // socket.h:559:1: + MSG_RCVMORE = 0x4000 // socket.h:576:1: + MSG_SEND = 0x1000 // socket.h:574:1: + MSG_TRUNC = 0x10 // socket.h:562:1: + MSG_WAITALL = 0x40 // socket.h:564:1: + MSG_WAITSTREAM = 0x200 // socket.h:570:1: + NBBY = 8 // types.h:186:1: + NETSVC_MRKNG_LVL_L2 = 1 // socket.h:283:1: + NETSVC_MRKNG_LVL_L3L2_ALL = 2 // socket.h:284:1: + NETSVC_MRKNG_LVL_L3L2_BK = 3 // socket.h:285:1: + NETSVC_MRKNG_UNKNOWN = 0 // socket.h:282:1: + NET_MAXID = 40 // socket.h:506:1: + NET_RT_DUMP = 1 // socket.h:519:1: + NET_RT_DUMP2 = 7 // socket.h:525:1: + NET_RT_FLAGS = 2 // socket.h:520:1: + NET_RT_FLAGS_PRIV = 10 // socket.h:530:1: + NET_RT_IFLIST = 3 // socket.h:521:1: + NET_RT_IFLIST2 = 6 // socket.h:524:1: + NET_RT_MAXID = 11 // socket.h:531:1: + NET_RT_STAT = 4 // socket.h:522:1: + NET_RT_TRASH = 5 // socket.h:523:1: + NET_SERVICE_TYPE_AV = 6 // socket.h:276:1: + NET_SERVICE_TYPE_BE = 0 // socket.h:270:1: + NET_SERVICE_TYPE_BK = 1 // socket.h:271:1: + NET_SERVICE_TYPE_OAM = 7 // socket.h:277:1: + NET_SERVICE_TYPE_RD = 8 // socket.h:278:1: + NET_SERVICE_TYPE_RV = 5 // socket.h:275:1: + NET_SERVICE_TYPE_SIG = 2 // socket.h:272:1: + NET_SERVICE_TYPE_VI = 3 // socket.h:273:1: + NET_SERVICE_TYPE_VO = 4 // socket.h:274:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + PF_APPLETALK = 16 // socket.h:469:1: + PF_CCITT = 10 // socket.h:463:1: + PF_CHAOS = 5 // socket.h:457:1: + PF_CNT = 21 // socket.h:474:1: + PF_COIP = 20 // socket.h:473:1: + PF_DATAKIT = 9 // socket.h:462:1: + PF_DECnet = 12 // socket.h:465:1: + PF_DLI = 13 // socket.h:466:1: + PF_ECMA = 8 // socket.h:461:1: + PF_HYLINK = 15 // socket.h:468:1: + PF_IMPLINK = 3 // socket.h:455:1: + PF_INET = 2 // socket.h:454:1: + PF_INET6 = 30 // socket.h:482:1: + PF_IPX = 23 // socket.h:476:1: + PF_ISDN = 28 // socket.h:480:1: + PF_ISO = 7 // socket.h:459:1: + PF_KEY = 29 // socket.h:481:1: + PF_LAT = 14 // socket.h:467:1: + PF_LINK = 18 // socket.h:471:1: + PF_LOCAL = 1 // socket.h:452:1: + PF_MAX = 40 // socket.h:489:1: + PF_NATM = 31 // socket.h:483:1: + PF_NDRV = 27 // socket.h:479:1: + PF_NETBIOS = 33 // socket.h:485:1: + PF_NS = 6 // socket.h:458:1: + PF_OSI = 7 // socket.h:460:1: + PF_PIP = 25 // socket.h:478:1: + PF_PPP = 34 // socket.h:486:1: + PF_PUP = 4 // socket.h:456:1: + PF_RESERVED_36 = 36 // socket.h:487:1: + PF_ROUTE = 17 // socket.h:470:1: + PF_RTIP = 22 // socket.h:477:1: + PF_SIP = 24 // socket.h:475:1: + PF_SNA = 11 // socket.h:464:1: + PF_SYSTEM = 32 // socket.h:484:1: + PF_UNIX = 1 // socket.h:453:1: + PF_UNSPEC = 0 // socket.h:451:1: + PF_UTUN = 38 // socket.h:488:1: + PF_XTP = 19 // socket.h:472:1: + PTRDIFF_MAX = 9223372036854775807 // stdint.h:652:1: + PTRDIFF_MIN = -9223372036854775808 // stdint.h:651:1: + RSIZE_MAX = 9223372036854775807 // stdint.h:658:1: + SAE_ASSOCID_ANY = 0 // socket.h:290:1: + SAE_CONNID_ANY = 0 // socket.h:294:1: + SCM_CREDS = 0x03 // socket.h:661:1: + SCM_RIGHTS = 0x01 // socket.h:658:1: + SCM_TIMESTAMP = 0x02 // socket.h:660:1: + SCM_TIMESTAMP_MONOTONIC = 0x04 // socket.h:662:1: + SHUT_RD = 0 // socket.h:670:1: + SHUT_RDWR = 2 // socket.h:672:1: + SHUT_WR = 1 // socket.h:671:1: + SIG_ATOMIC_MAX = 2147483647 // stdint.h:668:1: + SIG_ATOMIC_MIN = -2147483648 // stdint.h:667:1: + SIN6_LEN = 0 // in6.h:167:1: + SIZE_MAX = 18446744073709551615 // stdint.h:653:1: + SOCK_DGRAM = 2 // socket.h:112:1: + SOCK_MAXADDRLEN = 255 // socket.h:414:1: + SOCK_RAW = 3 // socket.h:113:1: + SOCK_RDM = 4 // socket.h:115:1: + SOCK_SEQPACKET = 5 // socket.h:117:1: + SOCK_STREAM = 1 // socket.h:111:1: + SOL_SOCKET = 0xffff // socket.h:348:1: + SOMAXCONN = 128 // socket.h:540:1: + SONPX_SETOPTSHUT = 0x000000001 // socket.h:338:1: + SO_ACCEPTCONN = 0x0002 // socket.h:123:1: + SO_BROADCAST = 0x0020 // socket.h:127:1: + SO_DEBUG = 0x0001 // socket.h:122:1: + SO_DONTROUTE = 0x0010 // socket.h:126:1: + SO_DONTTRUNC = 0x2000 // socket.h:142:1: + SO_ERROR = 0x1007 // socket.h:160:1: + SO_KEEPALIVE = 0x0008 // socket.h:125:1: + SO_LABEL = 0x1010 // socket.h:163:1: + SO_LINGER = 0x0080 // socket.h:130:1: + SO_LINGER_SEC = 0x1080 // socket.h:176:1: + SO_NETSVC_MARKING_LEVEL = 0x1119 // socket.h:185:1: + SO_NET_SERVICE_TYPE = 0x1116 // socket.h:182:1: + SO_NKE = 0x1021 // socket.h:167:1: + SO_NOADDRERR = 0x1023 // socket.h:169:1: + SO_NOSIGPIPE = 0x1022 // socket.h:168:1: + SO_NOTIFYCONFLICT = 0x1026 // socket.h:173:1: + SO_NP_EXTENSIONS = 0x1083 // socket.h:178:1: + SO_NREAD = 0x1020 // socket.h:166:1: + SO_NUMRCVPKT = 0x1112 // socket.h:181:1: + SO_NWRITE = 0x1024 // socket.h:170:1: + SO_OOBINLINE = 0x0100 // socket.h:134:1: + SO_PEERLABEL = 0x1011 // socket.h:164:1: + SO_RANDOMPORT = 0x1082 // socket.h:177:1: + SO_RCVBUF = 0x1002 // socket.h:155:1: + SO_RCVLOWAT = 0x1004 // socket.h:157:1: + SO_RCVTIMEO = 0x1006 // socket.h:159:1: + SO_REUSEADDR = 0x0004 // socket.h:124:1: + SO_REUSEPORT = 0x0200 // socket.h:136:1: + SO_REUSESHAREUID = 0x1025 // socket.h:171:1: + SO_SNDBUF = 0x1001 // socket.h:154:1: + SO_SNDLOWAT = 0x1003 // socket.h:156:1: + SO_SNDTIMEO = 0x1005 // socket.h:158:1: + SO_TIMESTAMP = 0x0400 // socket.h:137:1: + SO_TIMESTAMP_MONOTONIC = 0x0800 // socket.h:138:1: + SO_TYPE = 0x1008 // socket.h:161:1: + SO_UPCALLCLOSEWAIT = 0x1027 // socket.h:174:1: + SO_USELOOPBACK = 0x0040 // socket.h:129:1: + SO_WANTMORE = 0x4000 // socket.h:144:1: + SO_WANTOOBFLAG = 0x8000 // socket.h:145:1: + UINT16_MAX = 65535 // stdint.h:601:1: + UINT32_MAX = 4294967295 // stdint.h:557:1: + UINT64_MAX = 18446744073709551615 // stdint.h:463:1: + UINT8_MAX = 255 // stdint.h:623:1: + UINTMAX_MAX = 18446744073709551615 // stdint.h:664:1: + UINTPTR_MAX = 18446744073709551615 // stdint.h:650:1: + UINT_FAST16_MAX = 65535 // stdint.h:616:1: + UINT_FAST32_MAX = 4294967295 // stdint.h:575:1: + UINT_FAST64_MAX = 18446744073709551615 // stdint.h:484:1: + UINT_FAST8_MAX = 255 // stdint.h:635:1: + UINT_LEAST16_MAX = 65535 // stdint.h:613:1: + UINT_LEAST32_MAX = 4294967295 // stdint.h:572:1: + UINT_LEAST64_MAX = 18446744073709551615 // stdint.h:481:1: + UINT_LEAST8_MAX = 255 // stdint.h:632:1: + WCHAR_MAX = 2147483647 // stdint.h:678:1: + WCHAR_MIN = -2147483648 // stdint.h:682:1: + WINT_MAX = 2147483647 // stdint.h:674:1: + WINT_MIN = -2147483648 // stdint.h:673:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_I386__PARAM_H_ = 0 // _param.h:30:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // stdint.h:251:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NETINET6_IN6_H_ = 0 // in6.h:99:1: + X_NETINET_IN_H_ = 0 // in.h:65:1: + X_NET_NETKEV_H_ = 0 // net_kev.h:30:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SA_FAMILY_T = 0 // _sa_family_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SOCKLEN_T = 0 // _socklen_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SS_MAXSIZE = 128 // socket.h:429:1: + X_STRUCT_IOVEC = 0 // _iovec_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SOCKET_H_ = 0 // socket.h:73:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // stdint.h:257:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: + Pseudo_AF_HDRCMPLT = 35 // socket.h:396:1: + Pseudo_AF_KEY = 29 // socket.h:388:1: + Pseudo_AF_PIP = 25 // socket.h:384:1: + Pseudo_AF_RTIP = 22 // socket.h:381:1: + Pseudo_AF_XTP = 19 // socket.h:378:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -4955,20 +4955,20 @@ type X__msfilterreq = struct { // IP_PKTINFO: Packet information (equivalent to RFC2292 sec 5 for IPv4) // This structure is used for // -// 1) Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is -// set on the socket. In this case ipi_ifindex will contain the interface -// index the datagram was received on, ipi_addr is the IP address the -// datagram was received to. +// 1. Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is +// set on the socket. In this case ipi_ifindex will contain the interface +// index the datagram was received on, ipi_addr is the IP address the +// datagram was received to. // -// 2) Sending a datagram using a specific interface or IP source address. -// if ipi_ifindex is set to non-zero when in_pktinfo is passed as -// ancilliary data of type IP_PKTINFO, this will be used as the source -// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst -// will be used for the source address. +// 2. Sending a datagram using a specific interface or IP source address. +// if ipi_ifindex is set to non-zero when in_pktinfo is passed as +// ancilliary data of type IP_PKTINFO, this will be used as the source +// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst +// will be used for the source address. // -// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary -// IP_PKTINFO option silently overrides the bound interface when it is -// specified during send time. +// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary +// IP_PKTINFO option silently overrides the bound interface when it is +// specified during send time. type In_pktinfo = struct { Fipi_ifindex uint32 Fipi_spec_dst struct{ Fs_addr In_addr_t } diff --git a/vendor/modernc.org/libc/netinet/in/in_darwin_arm64.go b/vendor/modernc.org/libc/netinet/in/in_darwin_arm64.go index 52e689ff..4f284bc6 100644 --- a/vendor/modernc.org/libc/netinet/in/in_darwin_arm64.go +++ b/vendor/modernc.org/libc/netinet/in/in_darwin_arm64.go @@ -5256,20 +5256,20 @@ type X__msfilterreq = struct { // IP_PKTINFO: Packet information (equivalent to RFC2292 sec 5 for IPv4) // This structure is used for // -// 1) Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is -// set on the socket. In this case ipi_ifindex will contain the interface -// index the datagram was received on, ipi_addr is the IP address the -// datagram was received to. -// -// 2) Sending a datagram using a specific interface or IP source address. -// if ipi_ifindex is set to non-zero when in_pktinfo is passed as -// ancilliary data of type IP_PKTINFO, this will be used as the source -// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst -// will be used for the source address. -// -// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary -// IP_PKTINFO option silently overrides the bound interface when it is -// specified during send time. +// 1. Receiving ancilliary data about the datagram if IP_PKTINFO sockopt is +// set on the socket. In this case ipi_ifindex will contain the interface +// index the datagram was received on, ipi_addr is the IP address the +// datagram was received to. +// +// 2. Sending a datagram using a specific interface or IP source address. +// if ipi_ifindex is set to non-zero when in_pktinfo is passed as +// ancilliary data of type IP_PKTINFO, this will be used as the source +// interface to send the datagram from. If ipi_ifindex is null, ip_spec_dst +// will be used for the source address. +// +// Note: if IP_BOUND_IF is set on the socket, ipi_ifindex in the ancillary +// IP_PKTINFO option silently overrides the bound interface when it is +// specified during send time. type In_pktinfo = struct { Fipi_ifindex uint32 Fipi_spec_dst struct{ Fs_addr In_addr_t } diff --git a/vendor/modernc.org/libc/netinet/in/in_freebsd_386.go b/vendor/modernc.org/libc/netinet/in/in_freebsd_386.go index c4281e0e..070fa047 100644 --- a/vendor/modernc.org/libc/netinet/in/in_freebsd_386.go +++ b/vendor/modernc.org/libc/netinet/in/in_freebsd_386.go @@ -916,8 +916,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/netinet/in/in_freebsd_amd64.go b/vendor/modernc.org/libc/netinet/in/in_freebsd_amd64.go index f6fe442a..fd794f3b 100644 --- a/vendor/modernc.org/libc/netinet/in/in_freebsd_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/in_freebsd_amd64.go @@ -15,40 +15,42 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // endian.h:63:1: - BYTE_ORDER = 1234 // endian.h:65:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: ICMP6_FILTER = 18 // in6.h:420:1: ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47 // in6.h:638:1: INET6_ADDRSTRLEN = 46 // in6.h:112:1: INET_ADDRSTRLEN = 16 // in.h:130:1: - IN_CLASSA_HOST = 0x00ffffff // in.h:352:1: - IN_CLASSA_MAX = 128 // in.h:353:1: - IN_CLASSA_NET = 0xff000000 // in.h:350:1: - IN_CLASSA_NSHIFT = 24 // in.h:351:1: - IN_CLASSB_HOST = 0x0000ffff // in.h:358:1: - IN_CLASSB_MAX = 65536 // in.h:359:1: - IN_CLASSB_NET = 0xffff0000 // in.h:356:1: - IN_CLASSB_NSHIFT = 16 // in.h:357:1: - IN_CLASSC_HOST = 0x000000ff // in.h:364:1: - IN_CLASSC_NET = 0xffffff00 // in.h:362:1: - IN_CLASSC_NSHIFT = 8 // in.h:363:1: - IN_CLASSD_HOST = 0x0fffffff // in.h:369:1: - IN_CLASSD_NET = 0xf0000000 // in.h:367:1: - IN_CLASSD_NSHIFT = 28 // in.h:368:1: - IN_LOOPBACKNET = 127 // in.h:401:1: - IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:634:1: - IPCTL_DEFTTL = 3 // in.h:622:1: - IPCTL_DIRECTEDBROADCAST = 9 // in.h:630:1: - IPCTL_FASTFORWARDING = 14 // in.h:635:1: - IPCTL_FORWARDING = 1 // in.h:620:1: - IPCTL_GIF_TTL = 16 // in.h:637:1: - IPCTL_INTRDQDROPS = 18 // in.h:639:1: - IPCTL_INTRDQMAXLEN = 17 // in.h:638:1: - IPCTL_INTRQDROPS = 11 // in.h:632:1: - IPCTL_INTRQMAXLEN = 10 // in.h:631:1: - IPCTL_SENDREDIRECTS = 2 // in.h:621:1: - IPCTL_SOURCEROUTE = 8 // in.h:629:1: - IPCTL_STATS = 12 // in.h:633:1: + IN_CLASSA_HOST = 0x00ffffff // in.h:357:1: + IN_CLASSA_MAX = 128 // in.h:358:1: + IN_CLASSA_NET = 0xff000000 // in.h:355:1: + IN_CLASSA_NSHIFT = 24 // in.h:356:1: + IN_CLASSB_HOST = 0x0000ffff // in.h:363:1: + IN_CLASSB_MAX = 65536 // in.h:364:1: + IN_CLASSB_NET = 0xffff0000 // in.h:361:1: + IN_CLASSB_NSHIFT = 16 // in.h:362:1: + IN_CLASSC_HOST = 0x000000ff // in.h:369:1: + IN_CLASSC_NET = 0xffffff00 // in.h:367:1: + IN_CLASSC_NSHIFT = 8 // in.h:368:1: + IN_CLASSD_HOST = 0x0fffffff // in.h:379:1: + IN_CLASSD_NET = 0xf0000000 // in.h:377:1: + IN_CLASSD_NSHIFT = 28 // in.h:378:1: + IN_HISTORICAL_NETS = 0 // in.h:351:1: + IN_LOOPBACKNET = 127 // in.h:412:1: + IN_NETMASK_DEFAULT = 0xffffff00 // in.h:372:1: + IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:646:1: + IPCTL_DEFTTL = 3 // in.h:634:1: + IPCTL_DIRECTEDBROADCAST = 9 // in.h:642:1: + IPCTL_FASTFORWARDING = 14 // in.h:647:1: + IPCTL_FORWARDING = 1 // in.h:632:1: + IPCTL_GIF_TTL = 16 // in.h:649:1: + IPCTL_INTRDQDROPS = 18 // in.h:651:1: + IPCTL_INTRDQMAXLEN = 17 // in.h:650:1: + IPCTL_INTRQDROPS = 11 // in.h:644:1: + IPCTL_INTRQMAXLEN = 10 // in.h:643:1: + IPCTL_SENDREDIRECTS = 2 // in.h:633:1: + IPCTL_SOURCEROUTE = 8 // in.h:641:1: + IPCTL_STATS = 12 // in.h:645:1: IPPORT_EPHEMERALFIRST = 10000 // in.h:325:1: IPPORT_EPHEMERALLAST = 65535 // in.h:326:1: IPPORT_HIFIRSTAUTO = 49152 // in.h:331:1: @@ -284,123 +286,124 @@ const ( IPV6_USE_MIN_MTU = 42 // in6.h:460:1: IPV6_V6ONLY = 27 // in6.h:433:1: IPV6_VLAN_PCP = 75 // in6.h:515:1: - IP_ADD_MEMBERSHIP = 12 // in.h:422:1: - IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:478:1: - IP_BINDANY = 24 // in.h:435:1: - IP_BINDMULTI = 25 // in.h:436:1: - IP_BLOCK_SOURCE = 72 // in.h:480:1: - IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:509:1: - IP_DEFAULT_MULTICAST_TTL = 1 // in.h:508:1: - IP_DONTFRAG = 67 // in.h:474:1: - IP_DROP_MEMBERSHIP = 13 // in.h:423:1: - IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:479:1: - IP_DUMMYNET3 = 49 // in.h:453:1: - IP_DUMMYNET_CONFIGURE = 60 // in.h:467:1: - IP_DUMMYNET_DEL = 61 // in.h:468:1: - IP_DUMMYNET_FLUSH = 62 // in.h:469:1: - IP_DUMMYNET_GET = 64 // in.h:470:1: - IP_FLOWID = 90 // in.h:499:1: - IP_FLOWTYPE = 91 // in.h:500:1: - IP_FW3 = 48 // in.h:452:1: - IP_FW_ADD = 50 // in.h:455:1: - IP_FW_DEL = 51 // in.h:456:1: - IP_FW_FLUSH = 52 // in.h:457:1: - IP_FW_GET = 54 // in.h:459:1: - IP_FW_NAT_CFG = 56 // in.h:462:1: - IP_FW_NAT_DEL = 57 // in.h:463:1: - IP_FW_NAT_GET_CONFIG = 58 // in.h:464:1: - IP_FW_NAT_GET_LOG = 59 // in.h:465:1: - IP_FW_RESETLOG = 55 // in.h:460:1: - IP_FW_TABLE_ADD = 40 // in.h:446:1: - IP_FW_TABLE_DEL = 41 // in.h:447:1: - IP_FW_TABLE_FLUSH = 42 // in.h:448:1: - IP_FW_TABLE_GETSIZE = 43 // in.h:449:1: - IP_FW_TABLE_LIST = 44 // in.h:450:1: - IP_FW_ZERO = 53 // in.h:458:1: - IP_HDRINCL = 2 // in.h:410:1: - IP_IPSEC_POLICY = 21 // in.h:432:1: - IP_MAX_GROUP_SRC_FILTER = 512 // in.h:520:1: - IP_MAX_MEMBERSHIPS = 4095 // in.h:514:1: - IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:522:1: - IP_MAX_SOCK_SRC_FILTER = 128 // in.h:521:1: - IP_MINTTL = 66 // in.h:473:1: - IP_MSFILTER = 74 // in.h:484:1: - IP_MULTICAST_IF = 9 // in.h:418:1: - IP_MULTICAST_LOOP = 11 // in.h:421:1: - IP_MULTICAST_TTL = 10 // in.h:420:1: - IP_MULTICAST_VIF = 14 // in.h:424:1: - IP_ONESBCAST = 23 // in.h:434:1: - IP_OPTIONS = 1 // in.h:409:1: - IP_ORIGDSTADDR = 27 // in.h:438:1: - IP_PORTRANGE = 19 // in.h:429:1: - IP_PORTRANGE_DEFAULT = 0 // in.h:613:1: - IP_PORTRANGE_HIGH = 1 // in.h:614:1: - IP_PORTRANGE_LOW = 2 // in.h:615:1: - IP_RECVDSTADDR = 7 // in.h:415:1: - IP_RECVFLOWID = 93 // in.h:502:1: - IP_RECVIF = 20 // in.h:430:1: - IP_RECVOPTS = 5 // in.h:413:1: - IP_RECVORIGDSTADDR = 27 // in.h:439:1: - IP_RECVRETOPTS = 6 // in.h:414:1: - IP_RECVRSSBUCKETID = 94 // in.h:503:1: - IP_RECVTOS = 68 // in.h:475:1: - IP_RECVTTL = 65 // in.h:472:1: - IP_RETOPTS = 8 // in.h:417:1: - IP_RSSBUCKETID = 92 // in.h:501:1: - IP_RSS_LISTEN_BUCKET = 26 // in.h:437:1: - IP_RSVP_OFF = 16 // in.h:426:1: - IP_RSVP_ON = 15 // in.h:425:1: - IP_RSVP_VIF_OFF = 18 // in.h:428:1: - IP_RSVP_VIF_ON = 17 // in.h:427:1: - IP_SENDSRCADDR = 7 // in.h:416:1: - IP_TOS = 3 // in.h:411:1: - IP_TTL = 4 // in.h:412:1: - IP_UNBLOCK_SOURCE = 73 // in.h:481:1: - IP_VLAN_PCP = 75 // in.h:487:1: - LITTLE_ENDIAN = 1234 // endian.h:62:1: - MCAST_BLOCK_SOURCE = 84 // in.h:495:1: - MCAST_EXCLUDE = 2 // in.h:607:1: - MCAST_INCLUDE = 1 // in.h:606:1: - MCAST_JOIN_GROUP = 80 // in.h:491:1: - MCAST_JOIN_SOURCE_GROUP = 82 // in.h:493:1: - MCAST_LEAVE_GROUP = 81 // in.h:492:1: - MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:494:1: - MCAST_UNBLOCK_SOURCE = 85 // in.h:496:1: - MCAST_UNDEFINED = 0 // in.h:605:1: - PDP_ENDIAN = 3412 // endian.h:64:1: + IP_ADD_MEMBERSHIP = 12 // in.h:434:1: + IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:490:1: + IP_BINDANY = 24 // in.h:447:1: + IP_BINDMULTI = 25 // in.h:448:1: + IP_BLOCK_SOURCE = 72 // in.h:492:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:521:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:520:1: + IP_DONTFRAG = 67 // in.h:486:1: + IP_DROP_MEMBERSHIP = 13 // in.h:435:1: + IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:491:1: + IP_DUMMYNET3 = 49 // in.h:465:1: + IP_DUMMYNET_CONFIGURE = 60 // in.h:479:1: + IP_DUMMYNET_DEL = 61 // in.h:480:1: + IP_DUMMYNET_FLUSH = 62 // in.h:481:1: + IP_DUMMYNET_GET = 64 // in.h:482:1: + IP_FLOWID = 90 // in.h:511:1: + IP_FLOWTYPE = 91 // in.h:512:1: + IP_FW3 = 48 // in.h:464:1: + IP_FW_ADD = 50 // in.h:467:1: + IP_FW_DEL = 51 // in.h:468:1: + IP_FW_FLUSH = 52 // in.h:469:1: + IP_FW_GET = 54 // in.h:471:1: + IP_FW_NAT_CFG = 56 // in.h:474:1: + IP_FW_NAT_DEL = 57 // in.h:475:1: + IP_FW_NAT_GET_CONFIG = 58 // in.h:476:1: + IP_FW_NAT_GET_LOG = 59 // in.h:477:1: + IP_FW_RESETLOG = 55 // in.h:472:1: + IP_FW_TABLE_ADD = 40 // in.h:458:1: + IP_FW_TABLE_DEL = 41 // in.h:459:1: + IP_FW_TABLE_FLUSH = 42 // in.h:460:1: + IP_FW_TABLE_GETSIZE = 43 // in.h:461:1: + IP_FW_TABLE_LIST = 44 // in.h:462:1: + IP_FW_ZERO = 53 // in.h:470:1: + IP_HDRINCL = 2 // in.h:422:1: + IP_IPSEC_POLICY = 21 // in.h:444:1: + IP_MAX_GROUP_SRC_FILTER = 512 // in.h:532:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:526:1: + IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:534:1: + IP_MAX_SOCK_SRC_FILTER = 128 // in.h:533:1: + IP_MINTTL = 66 // in.h:485:1: + IP_MSFILTER = 74 // in.h:496:1: + IP_MULTICAST_IF = 9 // in.h:430:1: + IP_MULTICAST_LOOP = 11 // in.h:433:1: + IP_MULTICAST_TTL = 10 // in.h:432:1: + IP_MULTICAST_VIF = 14 // in.h:436:1: + IP_ONESBCAST = 23 // in.h:446:1: + IP_OPTIONS = 1 // in.h:421:1: + IP_ORIGDSTADDR = 27 // in.h:450:1: + IP_PORTRANGE = 19 // in.h:441:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:625:1: + IP_PORTRANGE_HIGH = 1 // in.h:626:1: + IP_PORTRANGE_LOW = 2 // in.h:627:1: + IP_RECVDSTADDR = 7 // in.h:427:1: + IP_RECVFLOWID = 93 // in.h:514:1: + IP_RECVIF = 20 // in.h:442:1: + IP_RECVOPTS = 5 // in.h:425:1: + IP_RECVORIGDSTADDR = 27 // in.h:451:1: + IP_RECVRETOPTS = 6 // in.h:426:1: + IP_RECVRSSBUCKETID = 94 // in.h:515:1: + IP_RECVTOS = 68 // in.h:487:1: + IP_RECVTTL = 65 // in.h:484:1: + IP_RETOPTS = 8 // in.h:429:1: + IP_RSSBUCKETID = 92 // in.h:513:1: + IP_RSS_LISTEN_BUCKET = 26 // in.h:449:1: + IP_RSVP_OFF = 16 // in.h:438:1: + IP_RSVP_ON = 15 // in.h:437:1: + IP_RSVP_VIF_OFF = 18 // in.h:440:1: + IP_RSVP_VIF_ON = 17 // in.h:439:1: + IP_SENDSRCADDR = 7 // in.h:428:1: + IP_TOS = 3 // in.h:423:1: + IP_TTL = 4 // in.h:424:1: + IP_UNBLOCK_SOURCE = 73 // in.h:493:1: + IP_VLAN_PCP = 75 // in.h:499:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + MCAST_BLOCK_SOURCE = 84 // in.h:507:1: + MCAST_EXCLUDE = 2 // in.h:619:1: + MCAST_INCLUDE = 1 // in.h:618:1: + MCAST_JOIN_GROUP = 80 // in.h:503:1: + MCAST_JOIN_SOURCE_GROUP = 82 // in.h:505:1: + MCAST_LEAVE_GROUP = 81 // in.h:504:1: + MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:506:1: + MCAST_UNBLOCK_SOURCE = 85 // in.h:508:1: + MCAST_UNDEFINED = 0 // in.h:617:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: SIN6_LEN = 0 // in6.h:122:1: - X_BIG_ENDIAN = 4321 // endian.h:52:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: X_BYTEORDER_FUNC_DEFINED = 0 // in.h:118:1: X_BYTEORDER_PROTOTYPED = 0 // in.h:108:1: - X_BYTE_ORDER = 1234 // endian.h:55:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_IN_ADDR_T_DECLARED = 0 // in.h:68:1: X_IN_PORT_T_DECLARED = 0 // in.h:73:1: - X_LITTLE_ENDIAN = 1234 // endian.h:51:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: X_LP64 = 1 // <predefined>:1:1: X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_NETINET6_IN6_H_ = 0 // in6.h:71:1: X_NETINET_IN_H_ = 0 // in.h:36:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: - X_PDP_ENDIAN = 3412 // endian.h:53:1: - X_QUAD_HIGHWORD = 1 // endian.h:44:1: - X_QUAD_LOWWORD = 0 // endian.h:45:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: X_SA_FAMILY_T_DECLARED = 0 // in.h:78:1: X_SIZE_T_DECLARED = 0 // in6.h:701:1: X_SOCKLEN_T_DECLARED = 0 // in.h:91:1: X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1: X_STRUCT_IN_ADDR_DECLARED = 0 // in.h:86:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_UINT16_T_DECLARED = 0 // in.h:58:1: X_UINT32_T_DECLARED = 0 // in.h:63:1: X_UINT8_T_DECLARED = 0 // in.h:53:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -670,12 +673,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -918,8 +924,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -1005,13 +1011,10 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // $FreeBSD$ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD // -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -1021,14 +1024,11 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // 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 +// 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 REGENTS OR CONTRIBUTORS BE LIABLE +// 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) @@ -1037,13 +1037,12 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 // $FreeBSD$ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1987, 1991 Regents of the University of California. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -1054,11 +1053,14 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// 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 AUTHOR OR CONTRIBUTORS BE LIABLE +// 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) @@ -1066,17 +1068,19 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // 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$ -// Define the order of 32-bit words in 64-bit words. +// BSD Compatiblity // Definitions for byte order, according to byte significance from low // address to high. +// Define the order of 32-bit words in 64-bit words. + // Deprecated variants that don't have enough underscores to be useful in more // strict namespaces. +// bswap primitives, based on compiler builtins + // Protocols common to RFC 1700, POSIX, and X/Open. type Uint8_t = X__uint8_t /* in.h:52:20 */ @@ -1218,9 +1222,10 @@ type Sockaddr_in = struct { // 512, but that conflicts with some well-known-services that firewalls may // have a fit if we use. -// Definitions of bits in internet address integers. -// On subnets, the decomposition of addresses to host and net parts -// is done according to subnet mask, not the masks here. +// Historical definitions of bits in internet address integers +// (pre-CIDR). Class A/B/C are long obsolete, and now deprecated. +// Hide these definitions from the kernel unless IN_HISTORICAL_NETS +// is defined. Provide the historical definitions to user level for now. // Options for use with [gs]etsockopt at the IP level. // First word of comment is data type; bool is stored in int. @@ -1253,7 +1258,7 @@ type Sockaddr_in = struct { type Ip_mreq = struct { Fimr_multiaddr struct{ Fs_addr In_addr_t } Fimr_interface struct{ Fs_addr In_addr_t } -} /* in.h:527:1 */ +} /* in.h:539:1 */ // Modified argument structure for IP_MULTICAST_IF, obtained from Linux. // This is used to specify an interface index for multicast sends, as @@ -1262,14 +1267,14 @@ type Ip_mreqn = struct { Fimr_multiaddr struct{ Fs_addr In_addr_t } Fimr_address struct{ Fs_addr In_addr_t } Fimr_ifindex int32 -} /* in.h:537:1 */ +} /* in.h:549:1 */ // Argument structure for IPv4 Multicast Source Filter APIs. [RFC3678] type Ip_mreq_source = struct { Fimr_multiaddr struct{ Fs_addr In_addr_t } Fimr_sourceaddr struct{ Fs_addr In_addr_t } Fimr_interface struct{ Fs_addr In_addr_t } -} /* in.h:546:1 */ +} /* in.h:558:1 */ // Argument structures for Protocol-Independent Multicast Source // Filter APIs. [RFC3678] @@ -1283,7 +1288,7 @@ type Group_req = struct { F__ss_align X__int64_t F__ss_pad2 [112]int8 } -} /* in.h:556:1 */ +} /* in.h:568:1 */ type Group_source_req = struct { Fgsr_interface Uint32_t @@ -1302,7 +1307,7 @@ type Group_source_req = struct { F__ss_align X__int64_t F__ss_pad2 [112]int8 } -} /* in.h:561:1 */ +} /* in.h:573:1 */ // The following structure is private; do not use it from user applications. // It is used to communicate IP_MSFILTER/IPV6_MSFILTER information between @@ -1320,7 +1325,7 @@ type X__msfilterreq = struct { F__ss_pad2 [112]int8 } Fmsfr_srcs uintptr -} /* in.h:574:1 */ +} /* in.h:586:1 */ // Filter modes; also used to represent per-socket filter mode internally. diff --git a/vendor/modernc.org/libc/netinet/in/in_freebsd_arm.go b/vendor/modernc.org/libc/netinet/in/in_freebsd_arm.go new file mode 100644 index 00000000..d2600423 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/in_freebsd_arm.go @@ -0,0 +1,1466 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_arm.go -pkgname in', DO NOT EDIT. + +package in + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + ICMP6_FILTER = 18 // in6.h:420:1: + ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47 // in6.h:638:1: + INET6_ADDRSTRLEN = 46 // in6.h:112:1: + INET_ADDRSTRLEN = 16 // in.h:130:1: + IN_CLASSA_HOST = 0x00ffffff // in.h:357:1: + IN_CLASSA_MAX = 128 // in.h:358:1: + IN_CLASSA_NET = 0xff000000 // in.h:355:1: + IN_CLASSA_NSHIFT = 24 // in.h:356:1: + IN_CLASSB_HOST = 0x0000ffff // in.h:363:1: + IN_CLASSB_MAX = 65536 // in.h:364:1: + IN_CLASSB_NET = 0xffff0000 // in.h:361:1: + IN_CLASSB_NSHIFT = 16 // in.h:362:1: + IN_CLASSC_HOST = 0x000000ff // in.h:369:1: + IN_CLASSC_NET = 0xffffff00 // in.h:367:1: + IN_CLASSC_NSHIFT = 8 // in.h:368:1: + IN_CLASSD_HOST = 0x0fffffff // in.h:379:1: + IN_CLASSD_NET = 0xf0000000 // in.h:377:1: + IN_CLASSD_NSHIFT = 28 // in.h:378:1: + IN_HISTORICAL_NETS = 0 // in.h:351:1: + IN_LOOPBACKNET = 127 // in.h:412:1: + IN_NETMASK_DEFAULT = 0xffffff00 // in.h:372:1: + IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:646:1: + IPCTL_DEFTTL = 3 // in.h:634:1: + IPCTL_DIRECTEDBROADCAST = 9 // in.h:642:1: + IPCTL_FASTFORWARDING = 14 // in.h:647:1: + IPCTL_FORWARDING = 1 // in.h:632:1: + IPCTL_GIF_TTL = 16 // in.h:649:1: + IPCTL_INTRDQDROPS = 18 // in.h:651:1: + IPCTL_INTRDQMAXLEN = 17 // in.h:650:1: + IPCTL_INTRQDROPS = 11 // in.h:644:1: + IPCTL_INTRQMAXLEN = 10 // in.h:643:1: + IPCTL_SENDREDIRECTS = 2 // in.h:633:1: + IPCTL_SOURCEROUTE = 8 // in.h:641:1: + IPCTL_STATS = 12 // in.h:645:1: + IPPORT_EPHEMERALFIRST = 10000 // in.h:325:1: + IPPORT_EPHEMERALLAST = 65535 // in.h:326:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:331:1: + IPPORT_HILASTAUTO = 65535 // in.h:332:1: + IPPORT_MAX = 65535 // in.h:342:1: + IPPORT_RESERVED = 1024 // in.h:320:1: + IPPORT_RESERVEDSTART = 600 // in.h:340:1: + IPPROTO_3PC = 34 // in.h:173:1: + IPPROTO_ADFS = 68 // in.h:206:1: + IPPROTO_AH = 51 // in.h:189:1: + IPPROTO_AHIP = 61 // in.h:199:1: + IPPROTO_APES = 99 // in.h:237:1: + IPPROTO_ARGUS = 13 // in.h:153:1: + IPPROTO_AX25 = 93 // in.h:231:1: + IPPROTO_BHA = 49 // in.h:187:1: + IPPROTO_BLT = 30 // in.h:169:1: + IPPROTO_BRSATMON = 76 // in.h:214:1: + IPPROTO_CARP = 112 // in.h:247:1: + IPPROTO_CFTP = 62 // in.h:200:1: + IPPROTO_CHAOS = 16 // in.h:156:1: + IPPROTO_CMTP = 38 // in.h:177:1: + IPPROTO_CPHB = 73 // in.h:211:1: + IPPROTO_CPNX = 72 // in.h:210:1: + IPPROTO_DCCP = 33 // in.h:172:1: + IPPROTO_DDP = 37 // in.h:176:1: + IPPROTO_DGP = 86 // in.h:224:1: + IPPROTO_DIVERT = 258 // in.h:262:1: + IPPROTO_DONE = 257 // in.h:259:1: + IPPROTO_DSTOPTS = 60 // in.h:198:1: + IPPROTO_EGP = 8 // in.h:148:1: + IPPROTO_EMCON = 14 // in.h:154:1: + IPPROTO_ENCAP = 98 // in.h:236:1: + IPPROTO_EON = 80 // in.h:218:1: + IPPROTO_ESP = 50 // in.h:188:1: + IPPROTO_ETHERIP = 97 // in.h:235:1: + IPPROTO_FRAGMENT = 44 // in.h:182:1: + IPPROTO_GGP = 3 // in.h:144:1: + IPPROTO_GMTP = 100 // in.h:238:1: + IPPROTO_GRE = 47 // in.h:185:1: + IPPROTO_HELLO = 63 // in.h:201:1: + IPPROTO_HIP = 139 // in.h:243:1: + IPPROTO_HMP = 20 // in.h:159:1: + IPPROTO_HOPOPTS = 0 // in.h:142:1: + IPPROTO_ICMP = 1 // in.h:44:1: + IPPROTO_ICMPV6 = 58 // in.h:196:1: + IPPROTO_IDP = 22 // in.h:161:1: + IPPROTO_IDPR = 35 // in.h:174:1: + IPPROTO_IDRP = 45 // in.h:183:1: + IPPROTO_IGMP = 2 // in.h:143:1: + IPPROTO_IGP = 85 // in.h:223:1: + IPPROTO_IGRP = 88 // in.h:226:1: + IPPROTO_IL = 40 // in.h:179:1: + IPPROTO_INLSP = 52 // in.h:190:1: + IPPROTO_INP = 32 // in.h:171:1: + IPPROTO_IP = 0 // in.h:43:1: + IPPROTO_IPCOMP = 108 // in.h:239:1: + IPPROTO_IPCV = 71 // in.h:209:1: + IPPROTO_IPEIP = 94 // in.h:232:1: + IPPROTO_IPIP = 4 // in.h:146:1: + IPPROTO_IPPC = 67 // in.h:205:1: + IPPROTO_IPV4 = 4 // in.h:145:1: + IPPROTO_IPV6 = 41 // in.h:128:1: + IPPROTO_IRTP = 28 // in.h:167:1: + IPPROTO_KRYPTOLAN = 65 // in.h:203:1: + IPPROTO_LARP = 91 // in.h:229:1: + IPPROTO_LEAF1 = 25 // in.h:164:1: + IPPROTO_LEAF2 = 26 // in.h:165:1: + IPPROTO_MAX = 256 // in.h:256:1: + IPPROTO_MEAS = 19 // in.h:158:1: + IPPROTO_MH = 135 // in.h:241:1: + IPPROTO_MHRP = 48 // in.h:186:1: + IPPROTO_MICP = 95 // in.h:233:1: + IPPROTO_MOBILE = 55 // in.h:193:1: + IPPROTO_MPLS = 137 // in.h:249:1: + IPPROTO_MTP = 92 // in.h:230:1: + IPPROTO_MUX = 18 // in.h:157:1: + IPPROTO_ND = 77 // in.h:215:1: + IPPROTO_NHRP = 54 // in.h:192:1: + IPPROTO_NONE = 59 // in.h:197:1: + IPPROTO_NSP = 31 // in.h:170:1: + IPPROTO_NVPII = 11 // in.h:151:1: + IPPROTO_OLD_DIVERT = 254 // in.h:255:1: + IPPROTO_OSPFIGP = 89 // in.h:227:1: + IPPROTO_PFSYNC = 240 // in.h:250:1: + IPPROTO_PGM = 113 // in.h:248:1: + IPPROTO_PIGP = 9 // in.h:149:1: + IPPROTO_PIM = 103 // in.h:246:1: + IPPROTO_PRM = 21 // in.h:160:1: + IPPROTO_PUP = 12 // in.h:152:1: + IPPROTO_PVP = 75 // in.h:213:1: + IPPROTO_RAW = 255 // in.h:129:1: + IPPROTO_RCCMON = 10 // in.h:150:1: + IPPROTO_RDP = 27 // in.h:166:1: + IPPROTO_RESERVED_253 = 253 // in.h:251:1: + IPPROTO_RESERVED_254 = 254 // in.h:252:1: + IPPROTO_ROUTING = 43 // in.h:181:1: + IPPROTO_RSVP = 46 // in.h:184:1: + IPPROTO_RVD = 66 // in.h:204:1: + IPPROTO_SATEXPAK = 64 // in.h:202:1: + IPPROTO_SATMON = 69 // in.h:207:1: + IPPROTO_SCCSP = 96 // in.h:234:1: + IPPROTO_SCTP = 132 // in.h:240:1: + IPPROTO_SDRP = 42 // in.h:180:1: + IPPROTO_SEND = 259 // in.h:263:1: + IPPROTO_SHIM6 = 140 // in.h:244:1: + IPPROTO_SKIP = 57 // in.h:195:1: + IPPROTO_SPACER = 32767 // in.h:269:1: + IPPROTO_SRPC = 90 // in.h:228:1: + IPPROTO_ST = 7 // in.h:147:1: + IPPROTO_SVMTP = 82 // in.h:220:1: + IPPROTO_SWIPE = 53 // in.h:191:1: + IPPROTO_TCF = 87 // in.h:225:1: + IPPROTO_TCP = 6 // in.h:45:1: + IPPROTO_TLSP = 56 // in.h:194:1: + IPPROTO_TP = 29 // in.h:168:1: + IPPROTO_TPXX = 39 // in.h:178:1: + IPPROTO_TRUNK1 = 23 // in.h:162:1: + IPPROTO_TRUNK2 = 24 // in.h:163:1: + IPPROTO_TTP = 84 // in.h:222:1: + IPPROTO_UDP = 17 // in.h:46:1: + IPPROTO_UDPLITE = 136 // in.h:242:1: + IPPROTO_VINES = 83 // in.h:221:1: + IPPROTO_VISA = 70 // in.h:208:1: + IPPROTO_VMTP = 81 // in.h:219:1: + IPPROTO_WBEXPAK = 79 // in.h:217:1: + IPPROTO_WBMON = 78 // in.h:216:1: + IPPROTO_WSN = 74 // in.h:212:1: + IPPROTO_XNET = 15 // in.h:155:1: + IPPROTO_XTP = 36 // in.h:175:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:599:1: + IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:624:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:604:1: + IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:621:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:603:1: + IPV6CTL_DEFHLIM = 3 // in6.h:588:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:605:1: + IPV6CTL_FORWARDING = 1 // in6.h:586:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:592:1: + IPV6CTL_GIF_HLIM = 19 // in6.h:606:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:602:1: + IPV6CTL_INTRDQMAXLEN = 52 // in6.h:645:1: + IPV6CTL_INTRQMAXLEN = 51 // in6.h:644:1: + IPV6CTL_KAME_VERSION = 20 // in6.h:607:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:601:1: + IPV6CTL_MAXFRAGBUCKETSIZE = 54 // in6.h:648:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:596:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:627:1: + IPV6CTL_MAXFRAGSPERPACKET = 53 // in6.h:647:1: + IPV6CTL_MAXID = 55 // in6.h:649:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:632:1: + IPV6CTL_MRTPROTO = 8 // in6.h:595:1: + IPV6CTL_MRTSTATS = 7 // in6.h:594:1: + IPV6CTL_NORBIT_RAIF = 49 // in6.h:640:1: + IPV6CTL_NO_RADR = 48 // in6.h:639:1: + IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:623:1: + IPV6CTL_RFC6204W3 = 50 // in6.h:642:1: + IPV6CTL_RIP6STATS = 36 // in6.h:622:1: + IPV6CTL_RR_PRUNE = 22 // in6.h:609:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:587:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:597:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:598:1: + IPV6CTL_STATS = 6 // in6.h:593:1: + IPV6CTL_STEALTH = 45 // in6.h:636:1: + IPV6CTL_TEMPPLTIME = 33 // in6.h:619:1: + IPV6CTL_TEMPVLTIME = 34 // in6.h:620:1: + IPV6CTL_USETEMPADDR = 32 // in6.h:618:1: + IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:625:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:608:1: + IPV6CTL_V6ONLY = 24 // in6.h:613:1: + IPV6PORT_ANONMAX = 65535 // in6.h:89:1: + IPV6PORT_ANONMIN = 49152 // in6.h:88:1: + IPV6PORT_RESERVED = 1024 // in6.h:87:1: + IPV6PORT_RESERVEDMAX = 1023 // in6.h:91:1: + IPV6PORT_RESERVEDMIN = 600 // in6.h:90:1: + IPV6PROTO_MAXID = 104 // in6.h:581:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:484:1: + IPV6_BINDANY = 64 // in6.h:493:1: + IPV6_BINDMULTI = 65 // in6.h:495:1: + IPV6_BINDV6ONLY = 27 // in6.h:435:1: + IPV6_CHECKSUM = 26 // in6.h:432:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:527:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:528:1: + IPV6_DONTFRAG = 62 // in6.h:487:1: + IPV6_DSTOPTS = 50 // in6.h:475:1: + IPV6_FLOWID = 67 // in6.h:497:1: + IPV6_FLOWTYPE = 68 // in6.h:498:1: + IPV6_FW_ADD = 30 // in6.h:441:1: + IPV6_FW_DEL = 31 // in6.h:442:1: + IPV6_FW_FLUSH = 32 // in6.h:443:1: + IPV6_FW_GET = 34 // in6.h:445:1: + IPV6_FW_ZERO = 33 // in6.h:444:1: + IPV6_HOPLIMIT = 47 // in6.h:472:1: + IPV6_HOPOPTS = 49 // in6.h:474:1: + IPV6_IPSEC_POLICY = 28 // in6.h:438:1: + IPV6_JOIN_GROUP = 12 // in6.h:417:1: + IPV6_LEAVE_GROUP = 13 // in6.h:418:1: + IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:539:1: + IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:533:1: + IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:540:1: + IPV6_MSFILTER = 74 // in6.h:510:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:415:1: + IPV6_MULTICAST_IF = 9 // in6.h:414:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:416:1: + IPV6_NEXTHOP = 48 // in6.h:473:1: + IPV6_ORIGDSTADDR = 72 // in6.h:503:1: + IPV6_PATHMTU = 44 // in6.h:463:1: + IPV6_PKTINFO = 46 // in6.h:471:1: + IPV6_PORTRANGE = 14 // in6.h:419:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:570:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:571:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:572:1: + IPV6_PREFER_TEMPADDR = 63 // in6.h:489:1: + IPV6_RECVDSTOPTS = 40 // in6.h:455:1: + IPV6_RECVFLOWID = 70 // in6.h:500:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:452:1: + IPV6_RECVHOPOPTS = 39 // in6.h:454:1: + IPV6_RECVORIGDSTADDR = 72 // in6.h:504:1: + IPV6_RECVPATHMTU = 43 // in6.h:461:1: + IPV6_RECVPKTINFO = 36 // in6.h:451:1: + IPV6_RECVRSSBUCKETID = 71 // in6.h:501:1: + IPV6_RECVRTHDR = 38 // in6.h:453:1: + IPV6_RECVTCLASS = 57 // in6.h:482:1: + IPV6_RSSBUCKETID = 69 // in6.h:499:1: + IPV6_RSS_LISTEN_BUCKET = 66 // in6.h:496:1: + IPV6_RTHDR = 51 // in6.h:476:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:449:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:520:1: + IPV6_RTHDR_STRICT = 1 // in6.h:521:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:522:1: + IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:412:1: + IPV6_TCLASS = 61 // in6.h:486:1: + IPV6_UNICAST_HOPS = 4 // in6.h:413:1: + IPV6_USE_MIN_MTU = 42 // in6.h:460:1: + IPV6_V6ONLY = 27 // in6.h:433:1: + IPV6_VLAN_PCP = 75 // in6.h:515:1: + IP_ADD_MEMBERSHIP = 12 // in.h:434:1: + IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:490:1: + IP_BINDANY = 24 // in.h:447:1: + IP_BINDMULTI = 25 // in.h:448:1: + IP_BLOCK_SOURCE = 72 // in.h:492:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:521:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:520:1: + IP_DONTFRAG = 67 // in.h:486:1: + IP_DROP_MEMBERSHIP = 13 // in.h:435:1: + IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:491:1: + IP_DUMMYNET3 = 49 // in.h:465:1: + IP_DUMMYNET_CONFIGURE = 60 // in.h:479:1: + IP_DUMMYNET_DEL = 61 // in.h:480:1: + IP_DUMMYNET_FLUSH = 62 // in.h:481:1: + IP_DUMMYNET_GET = 64 // in.h:482:1: + IP_FLOWID = 90 // in.h:511:1: + IP_FLOWTYPE = 91 // in.h:512:1: + IP_FW3 = 48 // in.h:464:1: + IP_FW_ADD = 50 // in.h:467:1: + IP_FW_DEL = 51 // in.h:468:1: + IP_FW_FLUSH = 52 // in.h:469:1: + IP_FW_GET = 54 // in.h:471:1: + IP_FW_NAT_CFG = 56 // in.h:474:1: + IP_FW_NAT_DEL = 57 // in.h:475:1: + IP_FW_NAT_GET_CONFIG = 58 // in.h:476:1: + IP_FW_NAT_GET_LOG = 59 // in.h:477:1: + IP_FW_RESETLOG = 55 // in.h:472:1: + IP_FW_TABLE_ADD = 40 // in.h:458:1: + IP_FW_TABLE_DEL = 41 // in.h:459:1: + IP_FW_TABLE_FLUSH = 42 // in.h:460:1: + IP_FW_TABLE_GETSIZE = 43 // in.h:461:1: + IP_FW_TABLE_LIST = 44 // in.h:462:1: + IP_FW_ZERO = 53 // in.h:470:1: + IP_HDRINCL = 2 // in.h:422:1: + IP_IPSEC_POLICY = 21 // in.h:444:1: + IP_MAX_GROUP_SRC_FILTER = 512 // in.h:532:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:526:1: + IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:534:1: + IP_MAX_SOCK_SRC_FILTER = 128 // in.h:533:1: + IP_MINTTL = 66 // in.h:485:1: + IP_MSFILTER = 74 // in.h:496:1: + IP_MULTICAST_IF = 9 // in.h:430:1: + IP_MULTICAST_LOOP = 11 // in.h:433:1: + IP_MULTICAST_TTL = 10 // in.h:432:1: + IP_MULTICAST_VIF = 14 // in.h:436:1: + IP_ONESBCAST = 23 // in.h:446:1: + IP_OPTIONS = 1 // in.h:421:1: + IP_ORIGDSTADDR = 27 // in.h:450:1: + IP_PORTRANGE = 19 // in.h:441:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:625:1: + IP_PORTRANGE_HIGH = 1 // in.h:626:1: + IP_PORTRANGE_LOW = 2 // in.h:627:1: + IP_RECVDSTADDR = 7 // in.h:427:1: + IP_RECVFLOWID = 93 // in.h:514:1: + IP_RECVIF = 20 // in.h:442:1: + IP_RECVOPTS = 5 // in.h:425:1: + IP_RECVORIGDSTADDR = 27 // in.h:451:1: + IP_RECVRETOPTS = 6 // in.h:426:1: + IP_RECVRSSBUCKETID = 94 // in.h:515:1: + IP_RECVTOS = 68 // in.h:487:1: + IP_RECVTTL = 65 // in.h:484:1: + IP_RETOPTS = 8 // in.h:429:1: + IP_RSSBUCKETID = 92 // in.h:513:1: + IP_RSS_LISTEN_BUCKET = 26 // in.h:449:1: + IP_RSVP_OFF = 16 // in.h:438:1: + IP_RSVP_ON = 15 // in.h:437:1: + IP_RSVP_VIF_OFF = 18 // in.h:440:1: + IP_RSVP_VIF_ON = 17 // in.h:439:1: + IP_SENDSRCADDR = 7 // in.h:428:1: + IP_TOS = 3 // in.h:423:1: + IP_TTL = 4 // in.h:424:1: + IP_UNBLOCK_SOURCE = 73 // in.h:493:1: + IP_VLAN_PCP = 75 // in.h:499:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + MCAST_BLOCK_SOURCE = 84 // in.h:507:1: + MCAST_EXCLUDE = 2 // in.h:619:1: + MCAST_INCLUDE = 1 // in.h:618:1: + MCAST_JOIN_GROUP = 80 // in.h:503:1: + MCAST_JOIN_SOURCE_GROUP = 82 // in.h:505:1: + MCAST_LEAVE_GROUP = 81 // in.h:504:1: + MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:506:1: + MCAST_UNBLOCK_SOURCE = 85 // in.h:508:1: + MCAST_UNDEFINED = 0 // in.h:617:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SIN6_LEN = 0 // in6.h:122:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BYTEORDER_FUNC_DEFINED = 0 // in.h:118:1: + X_BYTEORDER_PROTOTYPED = 0 // in.h:108:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_IN_ADDR_T_DECLARED = 0 // in.h:68:1: + X_IN_PORT_T_DECLARED = 0 // in.h:73:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_NETINET6_IN6_H_ = 0 // in6.h:71:1: + X_NETINET_IN_H_ = 0 // in.h:36:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_SA_FAMILY_T_DECLARED = 0 // in.h:78:1: + X_SIZE_T_DECLARED = 0 // in6.h:701:1: + X_SOCKLEN_T_DECLARED = 0 // in.h:91:1: + X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1: + X_STRUCT_IN_ADDR_DECLARED = 0 // in.h:86:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_UINT16_T_DECLARED = 0 // in.h:58:1: + X_UINT32_T_DECLARED = 0 // in.h:63:1: + X_UINT8_T_DECLARED = 0 // in.h:53:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2001 David E. O'Brien +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 8.1 (Berkeley) 6/10/93 +// $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +// BSD Compatiblity + +// Definitions for byte order, according to byte significance from low +// address to high. + +// Define the order of 32-bit words in 64-bit words. + +// Deprecated variants that don't have enough underscores to be useful in more +// strict namespaces. + +// bswap primitives, based on compiler builtins + +// Protocols common to RFC 1700, POSIX, and X/Open. + +type Uint8_t = X__uint8_t /* in.h:52:20 */ + +type Uint16_t = X__uint16_t /* in.h:57:21 */ + +type Uint32_t = X__uint32_t /* in.h:62:21 */ + +type In_addr_t = Uint32_t /* in.h:67:19 */ + +type In_port_t = Uint16_t /* in.h:72:19 */ + +type Sa_family_t = X__sa_family_t /* in.h:77:24 */ + +// Internet address (a structure for historical reasons). +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:83:1 */ + +type Socklen_t = X__socklen_t /* in.h:90:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 +// $FreeBSD$ + +// RFC 2553: protocol-independent placeholder for socket addresses + +type Sockaddr_storage = struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 +} /* _sockaddr_storage.h:48:1 */ + +// Socket address, internet style. +type Sockaddr_in = struct { + Fsin_len Uint8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]uint8 +} /* in.h:97:1 */ + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// Protocols (RFC 1700) +// 101-254: Partly Unassigned +// 255: Reserved +// BSD Private, local use, namespace incursion, no longer used + +// last return value of *_input(), meaning "all job for this pkt is done". + +// Only used internally, so can be outside the range of valid IP protocols. + +// Defined to avoid confusion. The master value is defined by +// PROTO_SPACER in sys/protosw.h. + +// Local port number conventions: +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// The default range is IPPORT_HIFIRSTAUTO through +// IPPORT_HILASTAUTO, although that is settable by sysctl. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH changes the range of candidate port numbers +// into the "high" range. These are reserved for client outbound connections +// which do not want to be filtered by any firewalls. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. This +// convention is based on "vouchsafe" principles only. It is only secure +// if you trust the remote host to restrict these ports. +// +// The default range of ports and the high range can be changed by +// sysctl(3). (net.inet.ip.portrange.{hi,low,}{first,last}) +// +// Changing those values has bad security implications if you are +// using a stateless firewall that is allowing packets outside of that +// range in order to allow transparent outgoing connections. +// +// Such a firewall configuration will generally depend on the use of these +// default values. If you change them, you may find your Security +// Administrator looking for you with a heavy object. +// +// For a slightly more orthodox text view on this: +// +// ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers +// +// port numbers are divided into three ranges: +// +// 0 - 1023 Well Known Ports +// 1024 - 49151 Registered Ports +// 49152 - 65535 Dynamic and/or Private Ports +// + +// Ports < IPPORT_RESERVED are reserved for +// privileged processes (e.g. root). (IP_PORTRANGE_LOW) + +// Default local port range, used by IP_PORTRANGE_DEFAULT + +// Dynamic port range, used by IP_PORTRANGE_HIGH. + +// Scanning for a free reserved port return a value below IPPORT_RESERVED, +// but higher than IPPORT_RESERVEDSTART. Traditionally the start value was +// 512, but that conflicts with some well-known-services that firewalls may +// have a fit if we use. + +// Historical definitions of bits in internet address integers +// (pre-CIDR). Class A/B/C are long obsolete, and now deprecated. +// Hide these definitions from the kernel unless IN_HISTORICAL_NETS +// is defined. Provide the historical definitions to user level for now. + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// for IPSEC +// unused; was IP_FAITH + +// Options for controlling the firewall and dummynet. +// Historical options (from 40 to 64) will eventually be +// replaced by only two options, IP_FW3 and IP_DUMMYNET3. + +// IPv4 Source Filter Multicast API [RFC3678] + +// The following option is private; do not use it from user applications. + +// The following option deals with the 802.1Q Ethernet Priority Code Point +// -1 use interface default + +// Protocol Independent Multicast API [RFC3678] + +// Flow and RSS definitions + +// Defaults and limits for options + +// Limit for IPv4 multicast memberships + +// Default resource limits for IPv4 multicast source filtering. +// These may be modified by sysctl. + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:539:1 */ + +// Modified argument structure for IP_MULTICAST_IF, obtained from Linux. +// This is used to specify an interface index for multicast sends, as +// the IPv4 legacy APIs do not support this (unless IP_SENDIF is available). +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:549:1 */ + +// Argument structure for IPv4 Multicast Source Filter APIs. [RFC3678] +type Ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_sourceaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:558:1 */ + +// Argument structures for Protocol-Independent Multicast Source +// Filter APIs. [RFC3678] +type Group_req = struct { + Fgr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 + } +} /* in.h:568:1 */ + +type Group_source_req = struct { + Fgsr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 + } + Fgsr_source struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 + } +} /* in.h:573:1 */ + +// The following structure is private; do not use it from user applications. +// It is used to communicate IP_MSFILTER/IPV6_MSFILTER information between +// the RFC 3678 libc functions and the kernel. +type X__msfilterreq = struct { + Fmsfr_ifindex Uint32_t + Fmsfr_fmode Uint32_t + Fmsfr_nsrcs Uint32_t + F__ccgo_pad1 [4]byte + Fmsfr_group struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 + } + Fmsfr_srcs uintptr + F__ccgo_pad2 [4]byte +} /* in.h:586:1 */ + +// Filter modes; also used to represent per-socket filter mode internally. + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Identifiers for IP sysctl nodes +// IPCTL_RTEXPIRE 5 deprecated +// IPCTL_RTMINEXPIRE 6 deprecated +// IPCTL_RTMAXCACHE 7 deprecated +// 15, unused, was: IPCTL_KEEPFAITH + +// INET6 stuff +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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. +// +// $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ + +// - +// Copyright (c) 1982, 1986, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 +// $FreeBSD$ + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// IPv6 port allocation rules should mirror the IPv4 rules and are controlled +// by the net.inet.ip.portrange sysctl tree. The following defines exist +// for compatibility with userland applications that need them. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } +} /* in6.h:97:1 */ + +// XXX missing POSIX.1-2001 macro IPPROTO_IPV6. + +// Socket address for IPv6 + +type Sockaddr_in6 = struct { + Fsin6_len Uint8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t +} /* in6.h:125:1 */ + +type Route_in6 = struct { + Fro_nh uintptr + Fro_lle uintptr + Fro_prepend uintptr + Fro_plen Uint16_t + Fro_flags Uint16_t + Fro_mtu Uint16_t + Fspare Uint16_t + Fro_dst struct { + Fsin6_len Uint8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t + } +} /* in6.h:379:1 */ + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. +// no hdrincl +// RFC2292 options + +// 29; unused; was IPV6_FAITH + +// new socket options introduced in RFC3542 + +// more new socket options introduced in RFC3542 + +// The following option is private; do not use it from user applications. +// It is deliberately defined to the same value as IP_MSFILTER. + +// The following option deals with the 802.1Q Ethernet Priority Code Point +// -1 use interface default + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Limit for IPv6 multicast memberships + +// Default resource limits for IPv6 multicast source filtering. +// These may be modified by sysctl. + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:545:1 */ + +// IPV6_PKTINFO: Packet information(RFC2292 sec 5) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:553:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len Uint8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t + } + Fip6m_mtu Uint32_t +} /* in6.h:561:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/in_freebsd_arm64.go b/vendor/modernc.org/libc/netinet/in/in_freebsd_arm64.go new file mode 100644 index 00000000..fd794f3b --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/in_freebsd_arm64.go @@ -0,0 +1,1529 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_amd64.go -pkgname in', DO NOT EDIT. + +package in + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + ICMP6_FILTER = 18 // in6.h:420:1: + ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47 // in6.h:638:1: + INET6_ADDRSTRLEN = 46 // in6.h:112:1: + INET_ADDRSTRLEN = 16 // in.h:130:1: + IN_CLASSA_HOST = 0x00ffffff // in.h:357:1: + IN_CLASSA_MAX = 128 // in.h:358:1: + IN_CLASSA_NET = 0xff000000 // in.h:355:1: + IN_CLASSA_NSHIFT = 24 // in.h:356:1: + IN_CLASSB_HOST = 0x0000ffff // in.h:363:1: + IN_CLASSB_MAX = 65536 // in.h:364:1: + IN_CLASSB_NET = 0xffff0000 // in.h:361:1: + IN_CLASSB_NSHIFT = 16 // in.h:362:1: + IN_CLASSC_HOST = 0x000000ff // in.h:369:1: + IN_CLASSC_NET = 0xffffff00 // in.h:367:1: + IN_CLASSC_NSHIFT = 8 // in.h:368:1: + IN_CLASSD_HOST = 0x0fffffff // in.h:379:1: + IN_CLASSD_NET = 0xf0000000 // in.h:377:1: + IN_CLASSD_NSHIFT = 28 // in.h:378:1: + IN_HISTORICAL_NETS = 0 // in.h:351:1: + IN_LOOPBACKNET = 127 // in.h:412:1: + IN_NETMASK_DEFAULT = 0xffffff00 // in.h:372:1: + IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:646:1: + IPCTL_DEFTTL = 3 // in.h:634:1: + IPCTL_DIRECTEDBROADCAST = 9 // in.h:642:1: + IPCTL_FASTFORWARDING = 14 // in.h:647:1: + IPCTL_FORWARDING = 1 // in.h:632:1: + IPCTL_GIF_TTL = 16 // in.h:649:1: + IPCTL_INTRDQDROPS = 18 // in.h:651:1: + IPCTL_INTRDQMAXLEN = 17 // in.h:650:1: + IPCTL_INTRQDROPS = 11 // in.h:644:1: + IPCTL_INTRQMAXLEN = 10 // in.h:643:1: + IPCTL_SENDREDIRECTS = 2 // in.h:633:1: + IPCTL_SOURCEROUTE = 8 // in.h:641:1: + IPCTL_STATS = 12 // in.h:645:1: + IPPORT_EPHEMERALFIRST = 10000 // in.h:325:1: + IPPORT_EPHEMERALLAST = 65535 // in.h:326:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:331:1: + IPPORT_HILASTAUTO = 65535 // in.h:332:1: + IPPORT_MAX = 65535 // in.h:342:1: + IPPORT_RESERVED = 1024 // in.h:320:1: + IPPORT_RESERVEDSTART = 600 // in.h:340:1: + IPPROTO_3PC = 34 // in.h:173:1: + IPPROTO_ADFS = 68 // in.h:206:1: + IPPROTO_AH = 51 // in.h:189:1: + IPPROTO_AHIP = 61 // in.h:199:1: + IPPROTO_APES = 99 // in.h:237:1: + IPPROTO_ARGUS = 13 // in.h:153:1: + IPPROTO_AX25 = 93 // in.h:231:1: + IPPROTO_BHA = 49 // in.h:187:1: + IPPROTO_BLT = 30 // in.h:169:1: + IPPROTO_BRSATMON = 76 // in.h:214:1: + IPPROTO_CARP = 112 // in.h:247:1: + IPPROTO_CFTP = 62 // in.h:200:1: + IPPROTO_CHAOS = 16 // in.h:156:1: + IPPROTO_CMTP = 38 // in.h:177:1: + IPPROTO_CPHB = 73 // in.h:211:1: + IPPROTO_CPNX = 72 // in.h:210:1: + IPPROTO_DCCP = 33 // in.h:172:1: + IPPROTO_DDP = 37 // in.h:176:1: + IPPROTO_DGP = 86 // in.h:224:1: + IPPROTO_DIVERT = 258 // in.h:262:1: + IPPROTO_DONE = 257 // in.h:259:1: + IPPROTO_DSTOPTS = 60 // in.h:198:1: + IPPROTO_EGP = 8 // in.h:148:1: + IPPROTO_EMCON = 14 // in.h:154:1: + IPPROTO_ENCAP = 98 // in.h:236:1: + IPPROTO_EON = 80 // in.h:218:1: + IPPROTO_ESP = 50 // in.h:188:1: + IPPROTO_ETHERIP = 97 // in.h:235:1: + IPPROTO_FRAGMENT = 44 // in.h:182:1: + IPPROTO_GGP = 3 // in.h:144:1: + IPPROTO_GMTP = 100 // in.h:238:1: + IPPROTO_GRE = 47 // in.h:185:1: + IPPROTO_HELLO = 63 // in.h:201:1: + IPPROTO_HIP = 139 // in.h:243:1: + IPPROTO_HMP = 20 // in.h:159:1: + IPPROTO_HOPOPTS = 0 // in.h:142:1: + IPPROTO_ICMP = 1 // in.h:44:1: + IPPROTO_ICMPV6 = 58 // in.h:196:1: + IPPROTO_IDP = 22 // in.h:161:1: + IPPROTO_IDPR = 35 // in.h:174:1: + IPPROTO_IDRP = 45 // in.h:183:1: + IPPROTO_IGMP = 2 // in.h:143:1: + IPPROTO_IGP = 85 // in.h:223:1: + IPPROTO_IGRP = 88 // in.h:226:1: + IPPROTO_IL = 40 // in.h:179:1: + IPPROTO_INLSP = 52 // in.h:190:1: + IPPROTO_INP = 32 // in.h:171:1: + IPPROTO_IP = 0 // in.h:43:1: + IPPROTO_IPCOMP = 108 // in.h:239:1: + IPPROTO_IPCV = 71 // in.h:209:1: + IPPROTO_IPEIP = 94 // in.h:232:1: + IPPROTO_IPIP = 4 // in.h:146:1: + IPPROTO_IPPC = 67 // in.h:205:1: + IPPROTO_IPV4 = 4 // in.h:145:1: + IPPROTO_IPV6 = 41 // in.h:128:1: + IPPROTO_IRTP = 28 // in.h:167:1: + IPPROTO_KRYPTOLAN = 65 // in.h:203:1: + IPPROTO_LARP = 91 // in.h:229:1: + IPPROTO_LEAF1 = 25 // in.h:164:1: + IPPROTO_LEAF2 = 26 // in.h:165:1: + IPPROTO_MAX = 256 // in.h:256:1: + IPPROTO_MEAS = 19 // in.h:158:1: + IPPROTO_MH = 135 // in.h:241:1: + IPPROTO_MHRP = 48 // in.h:186:1: + IPPROTO_MICP = 95 // in.h:233:1: + IPPROTO_MOBILE = 55 // in.h:193:1: + IPPROTO_MPLS = 137 // in.h:249:1: + IPPROTO_MTP = 92 // in.h:230:1: + IPPROTO_MUX = 18 // in.h:157:1: + IPPROTO_ND = 77 // in.h:215:1: + IPPROTO_NHRP = 54 // in.h:192:1: + IPPROTO_NONE = 59 // in.h:197:1: + IPPROTO_NSP = 31 // in.h:170:1: + IPPROTO_NVPII = 11 // in.h:151:1: + IPPROTO_OLD_DIVERT = 254 // in.h:255:1: + IPPROTO_OSPFIGP = 89 // in.h:227:1: + IPPROTO_PFSYNC = 240 // in.h:250:1: + IPPROTO_PGM = 113 // in.h:248:1: + IPPROTO_PIGP = 9 // in.h:149:1: + IPPROTO_PIM = 103 // in.h:246:1: + IPPROTO_PRM = 21 // in.h:160:1: + IPPROTO_PUP = 12 // in.h:152:1: + IPPROTO_PVP = 75 // in.h:213:1: + IPPROTO_RAW = 255 // in.h:129:1: + IPPROTO_RCCMON = 10 // in.h:150:1: + IPPROTO_RDP = 27 // in.h:166:1: + IPPROTO_RESERVED_253 = 253 // in.h:251:1: + IPPROTO_RESERVED_254 = 254 // in.h:252:1: + IPPROTO_ROUTING = 43 // in.h:181:1: + IPPROTO_RSVP = 46 // in.h:184:1: + IPPROTO_RVD = 66 // in.h:204:1: + IPPROTO_SATEXPAK = 64 // in.h:202:1: + IPPROTO_SATMON = 69 // in.h:207:1: + IPPROTO_SCCSP = 96 // in.h:234:1: + IPPROTO_SCTP = 132 // in.h:240:1: + IPPROTO_SDRP = 42 // in.h:180:1: + IPPROTO_SEND = 259 // in.h:263:1: + IPPROTO_SHIM6 = 140 // in.h:244:1: + IPPROTO_SKIP = 57 // in.h:195:1: + IPPROTO_SPACER = 32767 // in.h:269:1: + IPPROTO_SRPC = 90 // in.h:228:1: + IPPROTO_ST = 7 // in.h:147:1: + IPPROTO_SVMTP = 82 // in.h:220:1: + IPPROTO_SWIPE = 53 // in.h:191:1: + IPPROTO_TCF = 87 // in.h:225:1: + IPPROTO_TCP = 6 // in.h:45:1: + IPPROTO_TLSP = 56 // in.h:194:1: + IPPROTO_TP = 29 // in.h:168:1: + IPPROTO_TPXX = 39 // in.h:178:1: + IPPROTO_TRUNK1 = 23 // in.h:162:1: + IPPROTO_TRUNK2 = 24 // in.h:163:1: + IPPROTO_TTP = 84 // in.h:222:1: + IPPROTO_UDP = 17 // in.h:46:1: + IPPROTO_UDPLITE = 136 // in.h:242:1: + IPPROTO_VINES = 83 // in.h:221:1: + IPPROTO_VISA = 70 // in.h:208:1: + IPPROTO_VMTP = 81 // in.h:219:1: + IPPROTO_WBEXPAK = 79 // in.h:217:1: + IPPROTO_WBMON = 78 // in.h:216:1: + IPPROTO_WSN = 74 // in.h:212:1: + IPPROTO_XNET = 15 // in.h:155:1: + IPPROTO_XTP = 36 // in.h:175:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:599:1: + IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:624:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:604:1: + IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:621:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:603:1: + IPV6CTL_DEFHLIM = 3 // in6.h:588:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:605:1: + IPV6CTL_FORWARDING = 1 // in6.h:586:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:592:1: + IPV6CTL_GIF_HLIM = 19 // in6.h:606:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:602:1: + IPV6CTL_INTRDQMAXLEN = 52 // in6.h:645:1: + IPV6CTL_INTRQMAXLEN = 51 // in6.h:644:1: + IPV6CTL_KAME_VERSION = 20 // in6.h:607:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:601:1: + IPV6CTL_MAXFRAGBUCKETSIZE = 54 // in6.h:648:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:596:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:627:1: + IPV6CTL_MAXFRAGSPERPACKET = 53 // in6.h:647:1: + IPV6CTL_MAXID = 55 // in6.h:649:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:632:1: + IPV6CTL_MRTPROTO = 8 // in6.h:595:1: + IPV6CTL_MRTSTATS = 7 // in6.h:594:1: + IPV6CTL_NORBIT_RAIF = 49 // in6.h:640:1: + IPV6CTL_NO_RADR = 48 // in6.h:639:1: + IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:623:1: + IPV6CTL_RFC6204W3 = 50 // in6.h:642:1: + IPV6CTL_RIP6STATS = 36 // in6.h:622:1: + IPV6CTL_RR_PRUNE = 22 // in6.h:609:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:587:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:597:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:598:1: + IPV6CTL_STATS = 6 // in6.h:593:1: + IPV6CTL_STEALTH = 45 // in6.h:636:1: + IPV6CTL_TEMPPLTIME = 33 // in6.h:619:1: + IPV6CTL_TEMPVLTIME = 34 // in6.h:620:1: + IPV6CTL_USETEMPADDR = 32 // in6.h:618:1: + IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:625:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:608:1: + IPV6CTL_V6ONLY = 24 // in6.h:613:1: + IPV6PORT_ANONMAX = 65535 // in6.h:89:1: + IPV6PORT_ANONMIN = 49152 // in6.h:88:1: + IPV6PORT_RESERVED = 1024 // in6.h:87:1: + IPV6PORT_RESERVEDMAX = 1023 // in6.h:91:1: + IPV6PORT_RESERVEDMIN = 600 // in6.h:90:1: + IPV6PROTO_MAXID = 104 // in6.h:581:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:484:1: + IPV6_BINDANY = 64 // in6.h:493:1: + IPV6_BINDMULTI = 65 // in6.h:495:1: + IPV6_BINDV6ONLY = 27 // in6.h:435:1: + IPV6_CHECKSUM = 26 // in6.h:432:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:527:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:528:1: + IPV6_DONTFRAG = 62 // in6.h:487:1: + IPV6_DSTOPTS = 50 // in6.h:475:1: + IPV6_FLOWID = 67 // in6.h:497:1: + IPV6_FLOWTYPE = 68 // in6.h:498:1: + IPV6_FW_ADD = 30 // in6.h:441:1: + IPV6_FW_DEL = 31 // in6.h:442:1: + IPV6_FW_FLUSH = 32 // in6.h:443:1: + IPV6_FW_GET = 34 // in6.h:445:1: + IPV6_FW_ZERO = 33 // in6.h:444:1: + IPV6_HOPLIMIT = 47 // in6.h:472:1: + IPV6_HOPOPTS = 49 // in6.h:474:1: + IPV6_IPSEC_POLICY = 28 // in6.h:438:1: + IPV6_JOIN_GROUP = 12 // in6.h:417:1: + IPV6_LEAVE_GROUP = 13 // in6.h:418:1: + IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:539:1: + IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:533:1: + IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:540:1: + IPV6_MSFILTER = 74 // in6.h:510:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:415:1: + IPV6_MULTICAST_IF = 9 // in6.h:414:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:416:1: + IPV6_NEXTHOP = 48 // in6.h:473:1: + IPV6_ORIGDSTADDR = 72 // in6.h:503:1: + IPV6_PATHMTU = 44 // in6.h:463:1: + IPV6_PKTINFO = 46 // in6.h:471:1: + IPV6_PORTRANGE = 14 // in6.h:419:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:570:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:571:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:572:1: + IPV6_PREFER_TEMPADDR = 63 // in6.h:489:1: + IPV6_RECVDSTOPTS = 40 // in6.h:455:1: + IPV6_RECVFLOWID = 70 // in6.h:500:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:452:1: + IPV6_RECVHOPOPTS = 39 // in6.h:454:1: + IPV6_RECVORIGDSTADDR = 72 // in6.h:504:1: + IPV6_RECVPATHMTU = 43 // in6.h:461:1: + IPV6_RECVPKTINFO = 36 // in6.h:451:1: + IPV6_RECVRSSBUCKETID = 71 // in6.h:501:1: + IPV6_RECVRTHDR = 38 // in6.h:453:1: + IPV6_RECVTCLASS = 57 // in6.h:482:1: + IPV6_RSSBUCKETID = 69 // in6.h:499:1: + IPV6_RSS_LISTEN_BUCKET = 66 // in6.h:496:1: + IPV6_RTHDR = 51 // in6.h:476:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:449:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:520:1: + IPV6_RTHDR_STRICT = 1 // in6.h:521:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:522:1: + IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:412:1: + IPV6_TCLASS = 61 // in6.h:486:1: + IPV6_UNICAST_HOPS = 4 // in6.h:413:1: + IPV6_USE_MIN_MTU = 42 // in6.h:460:1: + IPV6_V6ONLY = 27 // in6.h:433:1: + IPV6_VLAN_PCP = 75 // in6.h:515:1: + IP_ADD_MEMBERSHIP = 12 // in.h:434:1: + IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:490:1: + IP_BINDANY = 24 // in.h:447:1: + IP_BINDMULTI = 25 // in.h:448:1: + IP_BLOCK_SOURCE = 72 // in.h:492:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:521:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:520:1: + IP_DONTFRAG = 67 // in.h:486:1: + IP_DROP_MEMBERSHIP = 13 // in.h:435:1: + IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:491:1: + IP_DUMMYNET3 = 49 // in.h:465:1: + IP_DUMMYNET_CONFIGURE = 60 // in.h:479:1: + IP_DUMMYNET_DEL = 61 // in.h:480:1: + IP_DUMMYNET_FLUSH = 62 // in.h:481:1: + IP_DUMMYNET_GET = 64 // in.h:482:1: + IP_FLOWID = 90 // in.h:511:1: + IP_FLOWTYPE = 91 // in.h:512:1: + IP_FW3 = 48 // in.h:464:1: + IP_FW_ADD = 50 // in.h:467:1: + IP_FW_DEL = 51 // in.h:468:1: + IP_FW_FLUSH = 52 // in.h:469:1: + IP_FW_GET = 54 // in.h:471:1: + IP_FW_NAT_CFG = 56 // in.h:474:1: + IP_FW_NAT_DEL = 57 // in.h:475:1: + IP_FW_NAT_GET_CONFIG = 58 // in.h:476:1: + IP_FW_NAT_GET_LOG = 59 // in.h:477:1: + IP_FW_RESETLOG = 55 // in.h:472:1: + IP_FW_TABLE_ADD = 40 // in.h:458:1: + IP_FW_TABLE_DEL = 41 // in.h:459:1: + IP_FW_TABLE_FLUSH = 42 // in.h:460:1: + IP_FW_TABLE_GETSIZE = 43 // in.h:461:1: + IP_FW_TABLE_LIST = 44 // in.h:462:1: + IP_FW_ZERO = 53 // in.h:470:1: + IP_HDRINCL = 2 // in.h:422:1: + IP_IPSEC_POLICY = 21 // in.h:444:1: + IP_MAX_GROUP_SRC_FILTER = 512 // in.h:532:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:526:1: + IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:534:1: + IP_MAX_SOCK_SRC_FILTER = 128 // in.h:533:1: + IP_MINTTL = 66 // in.h:485:1: + IP_MSFILTER = 74 // in.h:496:1: + IP_MULTICAST_IF = 9 // in.h:430:1: + IP_MULTICAST_LOOP = 11 // in.h:433:1: + IP_MULTICAST_TTL = 10 // in.h:432:1: + IP_MULTICAST_VIF = 14 // in.h:436:1: + IP_ONESBCAST = 23 // in.h:446:1: + IP_OPTIONS = 1 // in.h:421:1: + IP_ORIGDSTADDR = 27 // in.h:450:1: + IP_PORTRANGE = 19 // in.h:441:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:625:1: + IP_PORTRANGE_HIGH = 1 // in.h:626:1: + IP_PORTRANGE_LOW = 2 // in.h:627:1: + IP_RECVDSTADDR = 7 // in.h:427:1: + IP_RECVFLOWID = 93 // in.h:514:1: + IP_RECVIF = 20 // in.h:442:1: + IP_RECVOPTS = 5 // in.h:425:1: + IP_RECVORIGDSTADDR = 27 // in.h:451:1: + IP_RECVRETOPTS = 6 // in.h:426:1: + IP_RECVRSSBUCKETID = 94 // in.h:515:1: + IP_RECVTOS = 68 // in.h:487:1: + IP_RECVTTL = 65 // in.h:484:1: + IP_RETOPTS = 8 // in.h:429:1: + IP_RSSBUCKETID = 92 // in.h:513:1: + IP_RSS_LISTEN_BUCKET = 26 // in.h:449:1: + IP_RSVP_OFF = 16 // in.h:438:1: + IP_RSVP_ON = 15 // in.h:437:1: + IP_RSVP_VIF_OFF = 18 // in.h:440:1: + IP_RSVP_VIF_ON = 17 // in.h:439:1: + IP_SENDSRCADDR = 7 // in.h:428:1: + IP_TOS = 3 // in.h:423:1: + IP_TTL = 4 // in.h:424:1: + IP_UNBLOCK_SOURCE = 73 // in.h:493:1: + IP_VLAN_PCP = 75 // in.h:499:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + MCAST_BLOCK_SOURCE = 84 // in.h:507:1: + MCAST_EXCLUDE = 2 // in.h:619:1: + MCAST_INCLUDE = 1 // in.h:618:1: + MCAST_JOIN_GROUP = 80 // in.h:503:1: + MCAST_JOIN_SOURCE_GROUP = 82 // in.h:505:1: + MCAST_LEAVE_GROUP = 81 // in.h:504:1: + MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:506:1: + MCAST_UNBLOCK_SOURCE = 85 // in.h:508:1: + MCAST_UNDEFINED = 0 // in.h:617:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SIN6_LEN = 0 // in6.h:122:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BYTEORDER_FUNC_DEFINED = 0 // in.h:118:1: + X_BYTEORDER_PROTOTYPED = 0 // in.h:108:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_IN_ADDR_T_DECLARED = 0 // in.h:68:1: + X_IN_PORT_T_DECLARED = 0 // in.h:73:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_NETINET6_IN6_H_ = 0 // in6.h:71:1: + X_NETINET_IN_H_ = 0 // in.h:36:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_SA_FAMILY_T_DECLARED = 0 // in.h:78:1: + X_SIZE_T_DECLARED = 0 // in6.h:701:1: + X_SOCKLEN_T_DECLARED = 0 // in.h:91:1: + X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1: + X_STRUCT_IN_ADDR_DECLARED = 0 // in.h:86:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_UINT16_T_DECLARED = 0 // in.h:58:1: + X_UINT32_T_DECLARED = 0 // in.h:63:1: + X_UINT8_T_DECLARED = 0 // in.h:53:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +// BSD Compatiblity + +// Definitions for byte order, according to byte significance from low +// address to high. + +// Define the order of 32-bit words in 64-bit words. + +// Deprecated variants that don't have enough underscores to be useful in more +// strict namespaces. + +// bswap primitives, based on compiler builtins + +// Protocols common to RFC 1700, POSIX, and X/Open. + +type Uint8_t = X__uint8_t /* in.h:52:20 */ + +type Uint16_t = X__uint16_t /* in.h:57:21 */ + +type Uint32_t = X__uint32_t /* in.h:62:21 */ + +type In_addr_t = Uint32_t /* in.h:67:19 */ + +type In_port_t = Uint16_t /* in.h:72:19 */ + +type Sa_family_t = X__sa_family_t /* in.h:77:24 */ + +// Internet address (a structure for historical reasons). +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:83:1 */ + +type Socklen_t = X__socklen_t /* in.h:90:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 +// $FreeBSD$ + +// RFC 2553: protocol-independent placeholder for socket addresses + +type Sockaddr_storage = struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]int8 + F__ss_align X__int64_t + F__ss_pad2 [112]int8 +} /* _sockaddr_storage.h:48:1 */ + +// Socket address, internet style. +type Sockaddr_in = struct { + Fsin_len Uint8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]int8 +} /* in.h:97:1 */ + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// Protocols (RFC 1700) +// 101-254: Partly Unassigned +// 255: Reserved +// BSD Private, local use, namespace incursion, no longer used + +// last return value of *_input(), meaning "all job for this pkt is done". + +// Only used internally, so can be outside the range of valid IP protocols. + +// Defined to avoid confusion. The master value is defined by +// PROTO_SPACER in sys/protosw.h. + +// Local port number conventions: +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// The default range is IPPORT_HIFIRSTAUTO through +// IPPORT_HILASTAUTO, although that is settable by sysctl. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH changes the range of candidate port numbers +// into the "high" range. These are reserved for client outbound connections +// which do not want to be filtered by any firewalls. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. This +// convention is based on "vouchsafe" principles only. It is only secure +// if you trust the remote host to restrict these ports. +// +// The default range of ports and the high range can be changed by +// sysctl(3). (net.inet.ip.portrange.{hi,low,}{first,last}) +// +// Changing those values has bad security implications if you are +// using a stateless firewall that is allowing packets outside of that +// range in order to allow transparent outgoing connections. +// +// Such a firewall configuration will generally depend on the use of these +// default values. If you change them, you may find your Security +// Administrator looking for you with a heavy object. +// +// For a slightly more orthodox text view on this: +// +// ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers +// +// port numbers are divided into three ranges: +// +// 0 - 1023 Well Known Ports +// 1024 - 49151 Registered Ports +// 49152 - 65535 Dynamic and/or Private Ports +// + +// Ports < IPPORT_RESERVED are reserved for +// privileged processes (e.g. root). (IP_PORTRANGE_LOW) + +// Default local port range, used by IP_PORTRANGE_DEFAULT + +// Dynamic port range, used by IP_PORTRANGE_HIGH. + +// Scanning for a free reserved port return a value below IPPORT_RESERVED, +// but higher than IPPORT_RESERVEDSTART. Traditionally the start value was +// 512, but that conflicts with some well-known-services that firewalls may +// have a fit if we use. + +// Historical definitions of bits in internet address integers +// (pre-CIDR). Class A/B/C are long obsolete, and now deprecated. +// Hide these definitions from the kernel unless IN_HISTORICAL_NETS +// is defined. Provide the historical definitions to user level for now. + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// for IPSEC +// unused; was IP_FAITH + +// Options for controlling the firewall and dummynet. +// Historical options (from 40 to 64) will eventually be +// replaced by only two options, IP_FW3 and IP_DUMMYNET3. + +// IPv4 Source Filter Multicast API [RFC3678] + +// The following option is private; do not use it from user applications. + +// The following option deals with the 802.1Q Ethernet Priority Code Point +// -1 use interface default + +// Protocol Independent Multicast API [RFC3678] + +// Flow and RSS definitions + +// Defaults and limits for options + +// Limit for IPv4 multicast memberships + +// Default resource limits for IPv4 multicast source filtering. +// These may be modified by sysctl. + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:539:1 */ + +// Modified argument structure for IP_MULTICAST_IF, obtained from Linux. +// This is used to specify an interface index for multicast sends, as +// the IPv4 legacy APIs do not support this (unless IP_SENDIF is available). +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:549:1 */ + +// Argument structure for IPv4 Multicast Source Filter APIs. [RFC3678] +type Ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_sourceaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:558:1 */ + +// Argument structures for Protocol-Independent Multicast Source +// Filter APIs. [RFC3678] +type Group_req = struct { + Fgr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]int8 + F__ss_align X__int64_t + F__ss_pad2 [112]int8 + } +} /* in.h:568:1 */ + +type Group_source_req = struct { + Fgsr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]int8 + F__ss_align X__int64_t + F__ss_pad2 [112]int8 + } + Fgsr_source struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]int8 + F__ss_align X__int64_t + F__ss_pad2 [112]int8 + } +} /* in.h:573:1 */ + +// The following structure is private; do not use it from user applications. +// It is used to communicate IP_MSFILTER/IPV6_MSFILTER information between +// the RFC 3678 libc functions and the kernel. +type X__msfilterreq = struct { + Fmsfr_ifindex Uint32_t + Fmsfr_fmode Uint32_t + Fmsfr_nsrcs Uint32_t + F__ccgo_pad1 [4]byte + Fmsfr_group struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]int8 + F__ss_align X__int64_t + F__ss_pad2 [112]int8 + } + Fmsfr_srcs uintptr +} /* in.h:586:1 */ + +// Filter modes; also used to represent per-socket filter mode internally. + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Identifiers for IP sysctl nodes +// IPCTL_RTEXPIRE 5 deprecated +// IPCTL_RTMINEXPIRE 6 deprecated +// IPCTL_RTMAXCACHE 7 deprecated +// 15, unused, was: IPCTL_KEEPFAITH + +// INET6 stuff +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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. +// +// $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ + +// - +// Copyright (c) 1982, 1986, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 +// $FreeBSD$ + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// IPv6 port allocation rules should mirror the IPv4 rules and are controlled +// by the net.inet.ip.portrange sysctl tree. The following defines exist +// for compatibility with userland applications that need them. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } +} /* in6.h:97:1 */ + +// XXX missing POSIX.1-2001 macro IPPROTO_IPV6. + +// Socket address for IPv6 + +type Sockaddr_in6 = struct { + Fsin6_len Uint8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t +} /* in6.h:125:1 */ + +type Route_in6 = struct { + Fro_nh uintptr + Fro_lle uintptr + Fro_prepend uintptr + Fro_plen Uint16_t + Fro_flags Uint16_t + Fro_mtu Uint16_t + Fspare Uint16_t + Fro_dst struct { + Fsin6_len Uint8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t + } + F__ccgo_pad1 [4]byte +} /* in6.h:379:1 */ + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. +// no hdrincl +// RFC2292 options + +// 29; unused; was IPV6_FAITH + +// new socket options introduced in RFC3542 + +// more new socket options introduced in RFC3542 + +// The following option is private; do not use it from user applications. +// It is deliberately defined to the same value as IP_MSFILTER. + +// The following option deals with the 802.1Q Ethernet Priority Code Point +// -1 use interface default + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Limit for IPv6 multicast memberships + +// Default resource limits for IPv6 multicast source filtering. +// These may be modified by sysctl. + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:545:1 */ + +// IPV6_PKTINFO: Packet information(RFC2292 sec 5) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:553:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len Uint8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t + } + Fip6m_mtu Uint32_t +} /* in6.h:561:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_386.go b/vendor/modernc.org/libc/netinet/in/in_linux_386.go index f1f0cdea..1e250853 100644 --- a/vendor/modernc.org/libc/netinet/in/in_linux_386.go +++ b/vendor/modernc.org/libc/netinet/in/in_linux_386.go @@ -441,7 +441,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -577,8 +578,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -590,7 +592,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1289,7 +1292,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1300,13 +1304,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ @@ -1904,7 +1910,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1951,7 +1958,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2265,18 +2273,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -2300,7 +2311,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2312,7 +2324,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 @@ -2383,7 +2396,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2520,7 +2534,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2597,8 +2612,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]int8 diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_amd64.go b/vendor/modernc.org/libc/netinet/in/in_linux_amd64.go index 765334d4..cfd5e88a 100644 --- a/vendor/modernc.org/libc/netinet/in/in_linux_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/in_linux_amd64.go @@ -510,8 +510,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -549,7 +550,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -597,7 +599,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1316,7 +1319,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1327,8 +1331,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1932,7 +1937,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1979,7 +1985,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2291,18 +2298,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -2326,7 +2336,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2338,7 +2349,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 @@ -2409,7 +2421,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2550,7 +2563,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2627,8 +2641,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]int8 diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_arm.go b/vendor/modernc.org/libc/netinet/in/in_linux_arm.go index 510f4db6..fee7ded2 100644 --- a/vendor/modernc.org/libc/netinet/in/in_linux_arm.go +++ b/vendor/modernc.org/libc/netinet/in/in_linux_arm.go @@ -437,7 +437,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -573,8 +574,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -586,7 +588,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1346,7 +1349,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1357,13 +1361,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ @@ -1962,7 +1968,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2009,7 +2016,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2374,18 +2382,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2409,7 +2420,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2421,7 +2433,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 @@ -2492,7 +2505,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2636,7 +2650,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2713,8 +2728,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_arm64.go b/vendor/modernc.org/libc/netinet/in/in_linux_arm64.go index abddfc52..704a5ea2 100644 --- a/vendor/modernc.org/libc/netinet/in/in_linux_arm64.go +++ b/vendor/modernc.org/libc/netinet/in/in_linux_arm64.go @@ -447,7 +447,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -583,8 +584,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -596,7 +598,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1383,7 +1386,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1394,8 +1398,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1998,7 +2003,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2045,7 +2051,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2390,18 +2397,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -2428,7 +2438,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2440,7 +2451,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2511,7 +2523,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2660,7 +2673,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2737,8 +2751,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_ppc64le.go b/vendor/modernc.org/libc/netinet/in/in_linux_ppc64le.go index 615f7321..678421e2 100644 --- a/vendor/modernc.org/libc/netinet/in/in_linux_ppc64le.go +++ b/vendor/modernc.org/libc/netinet/in/in_linux_ppc64le.go @@ -462,7 +462,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -598,8 +599,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -611,7 +613,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1327,7 +1330,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1338,8 +1342,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1942,7 +1947,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1989,7 +1995,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2301,18 +2308,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2336,7 +2346,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2348,7 +2359,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2419,7 +2431,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2566,7 +2579,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2643,8 +2657,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go b/vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go index 96c3ccf1..382f0ce2 100644 --- a/vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go +++ b/vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go @@ -427,8 +427,9 @@ const ( ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:103:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -556,7 +557,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -604,7 +606,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1495,7 +1498,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1506,8 +1510,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -2110,7 +2115,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2157,7 +2163,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2475,9 +2482,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -2511,18 +2519,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2546,7 +2557,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2558,7 +2570,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2629,7 +2642,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2765,7 +2779,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2842,8 +2857,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_s390x.go b/vendor/modernc.org/libc/netinet/in/in_linux_s390x.go index 3fb546c0..378fa50f 100644 --- a/vendor/modernc.org/libc/netinet/in/in_linux_s390x.go +++ b/vendor/modernc.org/libc/netinet/in/in_linux_s390x.go @@ -447,7 +447,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -583,8 +584,9 @@ const ( /* in.h:40:1: */ ) // If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel -// network headers first and we should use those ABI-identical definitions -// instead of our own, otherwise 0. +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. const ( /* in.h:99:1: */ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. IPPROTO_ROUTING = 43 // IPv6 routing header. @@ -596,7 +598,8 @@ const ( /* in.h:99:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -1314,7 +1317,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1325,8 +1329,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1929,7 +1934,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1976,7 +1982,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2287,18 +2294,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2322,7 +2332,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2334,7 +2345,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -2405,7 +2417,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -2546,7 +2559,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 @@ -2623,8 +2637,9 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ // To select the IP level. // Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. -// The `ip_dst' field is used for the first-hop gateway when using a -// source route (this gets put into the header proper). +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). type Ip_opts = struct { Fip_dst struct{ Fs_addr In_addr_t } Fip_opts [40]uint8 diff --git a/vendor/modernc.org/libc/netinet/in/in_netbsd_arm.go b/vendor/modernc.org/libc/netinet/in/in_netbsd_arm.go new file mode 100644 index 00000000..cb553fa3 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/in_netbsd_arm.go @@ -0,0 +1,2913 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_netbsd_arm.go -pkgname in', DO NOT EDIT. + +package in + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_APPLETALK = 16 // socket.h:218:1: + AF_ARP = 28 // socket.h:237:1: + AF_BLUETOOTH = 31 // socket.h:243:1: + AF_CAN = 35 // socket.h:247:1: + AF_CCITT = 10 // socket.h:212:1: + AF_CHAOS = 5 // socket.h:206:1: + AF_CNT = 21 // socket.h:225:1: + AF_COIP = 20 // socket.h:224:1: + AF_DATAKIT = 9 // socket.h:211:1: + AF_DECnet = 12 // socket.h:214:1: + AF_DLI = 13 // socket.h:215:1: + AF_E164 = 26 // socket.h:235:1: + AF_ECMA = 8 // socket.h:210:1: + AF_ETHER = 36 // socket.h:248:1: + AF_HYLINK = 15 // socket.h:217:1: + AF_IEEE80211 = 32 // socket.h:244:1: + AF_IMPLINK = 3 // socket.h:204:1: + AF_INET = 2 // socket.h:203:1: + AF_INET6 = 24 // socket.h:230:1: + AF_IPX = 23 // socket.h:229:1: + AF_ISDN = 26 // socket.h:234:1: + AF_ISO = 7 // socket.h:208:1: + AF_LAT = 14 // socket.h:216:1: + AF_LINK = 18 // socket.h:220:1: + AF_LOCAL = 1 // socket.h:201:1: + AF_MAX = 37 // socket.h:249:1: + AF_MPLS = 33 // socket.h:245:1: + AF_NATM = 27 // socket.h:236:1: + AF_NS = 6 // socket.h:207:1: + AF_OROUTE = 17 // socket.h:219:1: + AF_OSI = 7 // socket.h:209:1: + AF_PUP = 4 // socket.h:205:1: + AF_ROUTE = 34 // socket.h:246:1: + AF_SNA = 11 // socket.h:213:1: + AF_UNIX = 1 // socket.h:202:1: + AF_UNSPEC = 0 // socket.h:200:1: + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + CTL_IPPROTO_IPSEC = 258 // in.h:118:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + ICMP6_FILTER = 18 // in6.h:393:1: + INET6_ADDRSTRLEN = 46 // in6.h:138:1: + INET6_IS_ADDR_LINKLOCAL = 1 // in6.h:678:1: + INET6_IS_ADDR_MC_LINKLOCAL = 2 // in6.h:679:1: + INET6_IS_ADDR_SITELOCAL = 4 // in6.h:680:1: + INET_ADDRSTRLEN = 16 // in.h:249:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + IN_CLASSA_MAX = 128 // in.h:182:1: + IN_CLASSA_NSHIFT = 24 // in.h:180:1: + IN_CLASSB_MAX = 65536 // in.h:189:1: + IN_CLASSB_NSHIFT = 16 // in.h:187:1: + IN_CLASSC_NSHIFT = 8 // in.h:194:1: + IN_CLASSD_NSHIFT = 28 // in.h:201:1: + IN_LOOPBACKNET = 127 // in.h:236:1: + IPCTL_ALLOWSRCRT = 7 // in.h:348:1: + IPCTL_ANONPORTMAX = 11 // in.h:352:1: + IPCTL_ANONPORTMIN = 10 // in.h:351:1: + IPCTL_CHECKINTERFACE = 20 // in.h:361:1: + IPCTL_DAD_COUNT = 25 // in.h:366:1: + IPCTL_DEFTTL = 3 // in.h:344:1: + IPCTL_DIRECTEDBCAST = 6 // in.h:347:1: + IPCTL_FORWARDING = 1 // in.h:342:1: + IPCTL_FORWSRCRT = 5 // in.h:346:1: + IPCTL_GIF_TTL = 15 // in.h:356:1: + IPCTL_GRE_TTL = 19 // in.h:360:1: + IPCTL_HOSTZEROBROADCAST = 14 // in.h:355:1: + IPCTL_IFQ = 21 // in.h:362:1: + IPCTL_LOOPBACKCKSUM = 23 // in.h:364:1: + IPCTL_LOWPORTMAX = 17 // in.h:358:1: + IPCTL_LOWPORTMIN = 16 // in.h:357:1: + IPCTL_MAXFLOWS = 13 // in.h:354:1: + IPCTL_MAXFRAGPACKETS = 18 // in.h:359:1: + IPCTL_MTUDISC = 9 // in.h:350:1: + IPCTL_MTUDISCTIMEOUT = 12 // in.h:353:1: + IPCTL_RANDOMID = 22 // in.h:363:1: + IPCTL_SENDREDIRECTS = 2 // in.h:343:1: + IPCTL_STATS = 24 // in.h:365:1: + IPCTL_SUBNETSARELOCAL = 8 // in.h:349:1: + IPPORT_ANONMAX = 65535 // in.h:151:1: + IPPORT_ANONMIN = 49152 // in.h:150:1: + IPPORT_RESERVED = 1024 // in.h:149:1: + IPPORT_RESERVEDMAX = 1023 // in.h:153:1: + IPPORT_RESERVEDMIN = 600 // in.h:152:1: + IPPROTO_AH = 51 // in.h:95:1: + IPPROTO_CARP = 112 // in.h:107:1: + IPPROTO_DCCP = 33 // in.h:88:1: + IPPROTO_DONE = 257 // in.h:115:1: + IPPROTO_DSTOPTS = 60 // in.h:100:1: + IPPROTO_EGP = 8 // in.h:83:1: + IPPROTO_ENCAP = 98 // in.h:103:1: + IPPROTO_EON = 80 // in.h:101:1: + IPPROTO_ESP = 50 // in.h:94:1: + IPPROTO_ETHERIP = 97 // in.h:102:1: + IPPROTO_FRAGMENT = 44 // in.h:91:1: + IPPROTO_GGP = 3 // in.h:79:1: + IPPROTO_GRE = 47 // in.h:93:1: + IPPROTO_HOPOPTS = 0 // in.h:76:1: + IPPROTO_ICMP = 1 // in.h:77:1: + IPPROTO_ICMPV6 = 58 // in.h:98:1: + IPPROTO_IDP = 22 // in.h:86:1: + IPPROTO_IGMP = 2 // in.h:78:1: + IPPROTO_IP = 0 // in.h:75:1: + IPPROTO_IPCOMP = 108 // in.h:105:1: + IPPROTO_IPIP = 4 // in.h:81:1: + IPPROTO_IPV4 = 4 // in.h:80:1: + IPPROTO_IPV6 = 41 // in.h:89:1: + IPPROTO_IPV6_ICMP = 58 // in.h:97:1: + IPPROTO_L2TP = 115 // in.h:108:1: + IPPROTO_MAX = 256 // in.h:112:1: + IPPROTO_MOBILE = 55 // in.h:96:1: + IPPROTO_NONE = 59 // in.h:99:1: + IPPROTO_PFSYNC = 240 // in.h:110:1: + IPPROTO_PIM = 103 // in.h:104:1: + IPPROTO_PUP = 12 // in.h:84:1: + IPPROTO_RAW = 255 // in.h:111:1: + IPPROTO_ROUTING = 43 // in.h:90:1: + IPPROTO_RSVP = 46 // in.h:92:1: + IPPROTO_SCTP = 132 // in.h:109:1: + IPPROTO_TCP = 6 // in.h:82:1: + IPPROTO_TP = 29 // in.h:87:1: + IPPROTO_UDP = 17 // in.h:85:1: + IPPROTO_VRRP = 112 // in.h:106:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:509:1: + IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:530:1: + IPV6CTL_ANONPORTMAX = 29 // in6.h:524:1: + IPV6CTL_ANONPORTMIN = 28 // in6.h:523:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:514:1: + IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:528:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:513:1: + IPV6CTL_DEFHLIM = 3 // in6.h:500:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:515:1: + IPV6CTL_FORWARDING = 1 // in6.h:498:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:502:1: + IPV6CTL_GIF_HLIM = 19 // in6.h:516:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:512:1: + IPV6CTL_IFQ = 42 // in6.h:534:1: + IPV6CTL_KAME_VERSION = 20 // in6.h:517:1: + IPV6CTL_KEEPFAITH = 13 // in6.h:510:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:511:1: + IPV6CTL_LOWPORTMAX = 31 // in6.h:526:1: + IPV6CTL_LOWPORTMIN = 30 // in6.h:525:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:506:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:533:1: + IPV6CTL_MRTPROTO = 8 // in6.h:505:1: + IPV6CTL_MRTSTATS = 7 // in6.h:504:1: + IPV6CTL_RR_PRUNE = 22 // in6.h:519:1: + IPV6CTL_RTADV_MAXROUTES = 43 // in6.h:535:1: + IPV6CTL_RTADV_NUMROUTES = 44 // in6.h:537:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:499:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:507:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:508:1: + IPV6CTL_STATS = 6 // in6.h:503:1: + IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:531:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:518:1: + IPV6CTL_V6ONLY = 24 // in6.h:521:1: + IPV6PORT_ANONMAX = 65535 // in6.h:115:1: + IPV6PORT_ANONMIN = 49152 // in6.h:114:1: + IPV6PORT_RESERVED = 1024 // in6.h:113:1: + IPV6PORT_RESERVEDMAX = 1023 // in6.h:117:1: + IPV6PORT_RESERVEDMIN = 600 // in6.h:116:1: + IPV6_CHECKSUM = 26 // in6.h:405:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:453:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:454:1: + IPV6_DONTFRAG = 62 // in6.h:441:1: + IPV6_DSTOPTS = 50 // in6.h:432:1: + IPV6_FAITH = 29 // in6.h:409:1: + IPV6_HOPLIMIT = 47 // in6.h:429:1: + IPV6_HOPOPTS = 49 // in6.h:431:1: + IPV6_IPSEC_POLICY = 28 // in6.h:408:1: + IPV6_JOIN_GROUP = 12 // in6.h:388:1: + IPV6_LEAVE_GROUP = 13 // in6.h:389:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:385:1: + IPV6_MULTICAST_IF = 9 // in6.h:384:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:386:1: + IPV6_NEXTHOP = 48 // in6.h:430:1: + IPV6_PATHMTU = 44 // in6.h:424:1: + IPV6_PKTINFO = 46 // in6.h:428:1: + IPV6_PORTALGO = 17 // in6.h:392:1: + IPV6_PORTRANGE = 14 // in6.h:390:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:484:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:485:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:486:1: + IPV6_PREFER_TEMPADDR = 63 // in6.h:442:1: + IPV6_RECVDSTOPTS = 40 // in6.h:418:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:415:1: + IPV6_RECVHOPOPTS = 39 // in6.h:417:1: + IPV6_RECVPATHMTU = 43 // in6.h:423:1: + IPV6_RECVPKTINFO = 36 // in6.h:414:1: + IPV6_RECVRTHDR = 38 // in6.h:416:1: + IPV6_RECVTCLASS = 57 // in6.h:435:1: + IPV6_RTHDR = 51 // in6.h:433:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:412:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:446:1: + IPV6_RTHDR_STRICT = 1 // in6.h:447:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:448:1: + IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:382:1: + IPV6_TCLASS = 61 // in6.h:440:1: + IPV6_UNICAST_HOPS = 4 // in6.h:383:1: + IPV6_USE_MIN_MTU = 42 // in6.h:422:1: + IPV6_V6ONLY = 27 // in6.h:406:1: + IP_ADD_MEMBERSHIP = 12 // in.h:283:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:312:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:311:1: + IP_DROP_MEMBERSHIP = 13 // in.h:284:1: + IP_ERRORMTU = 21 // in.h:288:1: + IP_HDRINCL = 2 // in.h:272:1: + IP_IPSEC_POLICY = 22 // in.h:289:1: + IP_MAX_MEMBERSHIPS = 20 // in.h:313:1: + IP_MINTTL = 24 // in.h:291:1: + IP_MULTICAST_IF = 9 // in.h:279:1: + IP_MULTICAST_LOOP = 11 // in.h:281:1: + IP_MULTICAST_TTL = 10 // in.h:280:1: + IP_OPTIONS = 1 // in.h:271:1: + IP_PKTINFO = 25 // in.h:292:1: + IP_PORTALGO = 18 // in.h:285:1: + IP_PORTRANGE = 19 // in.h:286:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:327:1: + IP_PORTRANGE_HIGH = 1 // in.h:328:1: + IP_PORTRANGE_LOW = 2 // in.h:329:1: + IP_RECVDSTADDR = 7 // in.h:277:1: + IP_RECVIF = 20 // in.h:287:1: + IP_RECVOPTS = 5 // in.h:275:1: + IP_RECVPKTINFO = 26 // in.h:293:1: + IP_RECVRETOPTS = 6 // in.h:276:1: + IP_RECVTTL = 23 // in.h:290:1: + IP_RETOPTS = 8 // in.h:278:1: + IP_SENDSRCADDR = 7 // in.h:295:1: + IP_TOS = 3 // in.h:273:1: + IP_TTL = 4 // in.h:274:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + MSG_BCAST = 0x0100 // socket.h:497:1: + MSG_CMSG_CLOEXEC = 0x0800 // socket.h:501:1: + MSG_CONTROLMBUF = 0x2000000 // socket.h:515:1: + MSG_CTRUNC = 0x0020 // socket.h:494:1: + MSG_DONTROUTE = 0x0004 // socket.h:491:1: + MSG_DONTWAIT = 0x0080 // socket.h:496:1: + MSG_EOR = 0x0008 // socket.h:492:1: + MSG_IOVUSRSPACE = 0x4000000 // socket.h:516:1: + MSG_LENUSRSPACE = 0x8000000 // socket.h:517:1: + MSG_MCAST = 0x0200 // socket.h:498:1: + MSG_NAMEMBUF = 0x1000000 // socket.h:514:1: + MSG_NBIO = 0x1000 // socket.h:502:1: + MSG_NOSIGNAL = 0x0400 // socket.h:499:1: + MSG_NOTIFICATION = 0x4000 // socket.h:504:1: + MSG_OOB = 0x0001 // socket.h:489:1: + MSG_PEEK = 0x0002 // socket.h:490:1: + MSG_TRUNC = 0x0010 // socket.h:493:1: + MSG_USERFLAGS = 0x0ffffff // socket.h:513:1: + MSG_WAITALL = 0x0040 // socket.h:495:1: + MSG_WAITFORONE = 0x2000 // socket.h:503:1: + NBBY = 8 // types.h:316:1: + NET_RT_DUMP = 1 // socket.h:457:1: + NET_RT_FLAGS = 2 // socket.h:458:1: + NET_RT_IFLIST = 6 // socket.h:462:1: + NET_RT_OIFLIST = 5 // socket.h:461:1: + NET_RT_OOIFLIST = 4 // socket.h:460:1: + NET_RT_OOOIFLIST = 3 // socket.h:459:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PCB_ALL = 0 // socket.h:444:1: + PCB_SLOP = 20 // socket.h:443:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PF_APPLETALK = 16 // socket.h:334:1: + PF_ARP = 28 // socket.h:351:1: + PF_BLUETOOTH = 31 // socket.h:355:1: + PF_CAN = 35 // socket.h:358:1: + PF_CCITT = 10 // socket.h:328:1: + PF_CHAOS = 5 // socket.h:322:1: + PF_CNT = 21 // socket.h:341:1: + PF_COIP = 20 // socket.h:340:1: + PF_DATAKIT = 9 // socket.h:327:1: + PF_DECnet = 12 // socket.h:330:1: + PF_DLI = 13 // socket.h:331:1: + PF_E164 = 26 // socket.h:349:1: + PF_ECMA = 8 // socket.h:326:1: + PF_ETHER = 36 // socket.h:359:1: + PF_HYLINK = 15 // socket.h:333:1: + PF_IMPLINK = 3 // socket.h:320:1: + PF_INET = 2 // socket.h:319:1: + PF_INET6 = 24 // socket.h:342:1: + PF_IPX = 23 // socket.h:343:1: + PF_ISDN = 26 // socket.h:348:1: + PF_ISO = 7 // socket.h:324:1: + PF_KEY = 29 // socket.h:353:1: + PF_LAT = 14 // socket.h:332:1: + PF_LINK = 18 // socket.h:336:1: + PF_LOCAL = 1 // socket.h:317:1: + PF_MAX = 37 // socket.h:361:1: + PF_MPLS = 33 // socket.h:356:1: + PF_NATM = 27 // socket.h:350:1: + PF_NS = 6 // socket.h:323:1: + PF_OROUTE = 17 // socket.h:335:1: + PF_OSI = 7 // socket.h:325:1: + PF_PIP = 25 // socket.h:346:1: + PF_PUP = 4 // socket.h:321:1: + PF_ROUTE = 34 // socket.h:357:1: + PF_RTIP = 22 // socket.h:345:1: + PF_SNA = 11 // socket.h:329:1: + PF_UNIX = 1 // socket.h:318:1: + PF_UNSPEC = 0 // socket.h:316:1: + PF_XTP = 19 // socket.h:338:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SCM_CREDS = 0x10 // socket.h:581:1: + SCM_RIGHTS = 0x01 // socket.h:576:1: + SCM_TIMESTAMP = 0x08 // socket.h:580:1: + SHUT_RD = 0 // socket.h:587:1: + SHUT_RDWR = 2 // socket.h:589:1: + SHUT_WR = 1 // socket.h:588:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIN6_LEN = 0 // in6.h:144:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + SOCK_CLOEXEC = 0x10000000 // socket.h:113:1: + SOCK_CONN_DGRAM = 6 // socket.h:110:1: + SOCK_DCCP = 6 // socket.h:111:1: + SOCK_DGRAM = 2 // socket.h:106:1: + SOCK_FLAGS_MASK = 0xf0000000 // socket.h:116:1: + SOCK_NONBLOCK = 0x20000000 // socket.h:114:1: + SOCK_NOSIGPIPE = 0x40000000 // socket.h:115:1: + SOCK_RAW = 3 // socket.h:107:1: + SOCK_RDM = 4 // socket.h:108:1: + SOCK_SEQPACKET = 5 // socket.h:109:1: + SOCK_STREAM = 1 // socket.h:105:1: + SOL_SOCKET = 0xffff // socket.h:195:1: + SOMAXCONN = 128 // socket.h:470:1: + SO_ACCEPTCONN = 0x0002 // socket.h:122:1: + SO_ACCEPTFILTER = 0x1000 // socket.h:133:1: + SO_BROADCAST = 0x0020 // socket.h:126:1: + SO_DEBUG = 0x0001 // socket.h:121:1: + SO_DEFOPTS = 27645 // socket.h:138:1: + SO_DONTROUTE = 0x0010 // socket.h:125:1: + SO_ERROR = 0x1007 // socket.h:169:1: + SO_KEEPALIVE = 0x0008 // socket.h:124:1: + SO_LINGER = 0x0080 // socket.h:128:1: + SO_NOHEADER = 0x100a // socket.h:173:1: + SO_NOSIGPIPE = 0x0800 // socket.h:132:1: + SO_OOBINLINE = 0x0100 // socket.h:129:1: + SO_OVERFLOWED = 0x1009 // socket.h:171:1: + SO_RCVBUF = 0x1002 // socket.h:164:1: + SO_RCVLOWAT = 0x1004 // socket.h:166:1: + SO_RCVTIMEO = 0x100c // socket.h:178:1: + SO_RERROR = 0x4000 // socket.h:135:1: + SO_REUSEADDR = 0x0004 // socket.h:123:1: + SO_REUSEPORT = 0x0200 // socket.h:130:1: + SO_SNDBUF = 0x1001 // socket.h:163:1: + SO_SNDLOWAT = 0x1003 // socket.h:165:1: + SO_SNDTIMEO = 0x100b // socket.h:177:1: + SO_TIMESTAMP = 0x2000 // socket.h:134:1: + SO_TYPE = 0x1008 // socket.h:170:1: + SO_USELOOPBACK = 0x0040 // socket.h:127:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + UIO_MAXIOV = 1024 // uio.h:97:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // in.h:52:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // in.h:47:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_NETINET6_IN6_H_ = 0 // in6.h:65:1: + X_NETINET_IN_H_ = 0 // in.h:40:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SS_MAXSIZE = 128 // socket.h:294:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: + X_SYS_SOCKET_H_ = 0 // socket.h:64:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_SYS_UIO_H_ = 0 // uio.h:35:1: + Pseudo_AF_HDRCMPLT = 30 // socket.h:240:1: + Pseudo_AF_KEY = 29 // socket.h:239:1: + Pseudo_AF_PIP = 25 // socket.h:232:1: + Pseudo_AF_RTIP = 22 // socket.h:227:1: + Pseudo_AF_XTP = 19 // socket.h:222:1: +) + +// file offset + +const ( /* uio.h:69:1: */ + UIO_READ = 0 + UIO_WRITE = 1 +) + +// Segment flag values. +const ( /* uio.h:72:1: */ + UIO_USERSPACE = 0 // from user data space + UIO_SYSSPACE = 1 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $NetBSD: in.h,v 1.108 2018/11/09 11:46:28 maya Exp $ + +// Copyright (c) 1982, 1986, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +type Uint8_t = X__uint8_t /* in.h:46:19 */ + +type Uint32_t = X__uint32_t /* in.h:51:20 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type In_addr_t = X__in_addr_t /* in.h:58:21 */ + +type In_port_t = X__in_port_t /* in.h:63:21 */ + +type Sa_family_t = X__sa_family_t /* in.h:68:23 */ + +// Protocols + +// last return value of *_input(), meaning "all job for this pkt is done". + +// sysctl placeholder for (FAST_)IPSEC + +// Local port number conventions: +// +// Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root), +// unless a kernel is compiled with IPNOPRIVPORTS defined. +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// +// The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although +// that is settable by sysctl(3); net.inet.ip.anonportmin and +// net.inet.ip.anonportmax respectively. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT, +// and exists only for FreeBSD compatibility purposes. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. +// This convention is based on "vouchsafe" principles only. +// It is only secure if you trust the remote host to restrict these ports. +// The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX. + +// Internet address (a structure for historical reasons) +type In_addr = struct{ Fs_addr X__in_addr_t } /* in.h:158:1 */ + +// Definitions of bits in internet address integers. +// On subnets, the decomposition of addresses to host and net parts +// is done according to subnet mask, not the masks here. +// +// By byte-swapping the constants, we avoid ever having to byte-swap IP +// addresses inside the kernel. Unfortunately, user-level programs rely +// on these macros not doing byte-swapping. + +// These ones aren't really net and host fields, but routing needn't know. + +// Socket address, internet style. +type Sockaddr_in = struct { + Fsin_len Uint8_t + Fsin_family X__sa_family_t + Fsin_port X__in_port_t + Fsin_addr struct{ Fs_addr X__in_addr_t } + Fsin_zero [8]X__int8_t +} /* in.h:241:1 */ + +// Structure used to describe IP options. +// Used to store options internally, to pass them to a process, +// or to restore options retrieved earlier. +// The ip_dst is used for the first-hop gateway when using a source route +// (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr X__in_addr_t } + Fip_opts [40]X__int8_t +} /* in.h:258:1 */ + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// The add and drop membership option numbers need to match with the v6 ones + +// Information sent in the control message of a datagram socket for +// IP_PKTINFO and IP_RECVPKTINFO. +type In_pktinfo = struct { + Fipi_addr struct{ Fs_addr X__in_addr_t } + Fipi_ifindex uint32 +} /* in.h:301:1 */ + +// Defaults and limits for options + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr X__in_addr_t } + Fimr_interface struct{ Fs_addr X__in_addr_t } +} /* in.h:318:1 */ + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Definitions for inet sysctl operations. +// +// Third level is protocol number. +// Fourth level is desired variable within that protocol. + +// Names for IP sysctl objects +// IPCTL_DEFMTU=4, never implemented + +// INET6 stuff +// $NetBSD: in6.h,v 1.95.2.1 2019/09/06 19:43:00 martin Exp $ +// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ + +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: socket.h,v 1.129 2018/11/04 16:30:29 christos Exp $ + +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.6 (Berkeley) 5/3/95 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions related to sockets: types, address families, options. + +// Data types. +// $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. + +type Socklen_t = X__socklen_t /* socket.h:83:21 */ + +type Ssize_t = int32 /* socket.h:95:23 */ + +// $NetBSD: uio.h,v 1.36 2011/07/27 13:20:07 uebayasi Exp $ + +// Copyright (c) 1982, 1986, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)uio.h 8.5 (Berkeley) 2/22/94 + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* uio.h:56:1 */ + +// $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. + +type Off_t = X__off_t /* uio.h:65:18 */ + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ + +// Socket types. + +// Option flags per-socket. +// SO_OTIMESTAMP 0x0400 + +// Allowed default option flags + +// Additional options, not kept in so_options. +// SO_OSNDTIMEO 0x1005 +// SO_ORCVTIMEO 0x1006 + +// Structure used for manipulating linger option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:182:1 */ + +type Accept_filter_arg = struct { + Faf_name [16]uint8 + Faf_arg [240]uint8 +} /* socket.h:187:1 */ + +// Level number for (get/set)sockopt() to apply to socket itself. + +// Address families. + +// Structure used by kernel to store most +// addresses. +type Sockaddr = struct { + Fsa_len X__uint8_t + Fsa_family X__sa_family_t + Fsa_data [14]uint8 +} /* socket.h:255:1 */ + +// RFC 2553: protocol-independent placeholder for socket addresses + +type Sockaddr_storage = struct { + Fss_len X__uint8_t + Fss_family X__sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 +} /* socket.h:301:1 */ + +// Protocol families, same as address families for now. + +type Pid_t = X__pid_t /* socket.h:366:18 */ // process id + +type Gid_t = X__gid_t /* socket.h:371:18 */ // group id + +type Uid_t = X__uid_t /* socket.h:376:18 */ // user id + +// Socket credentials. +type Sockcred = struct { + Fsc_pid X__pid_t + Fsc_uid X__uid_t + Fsc_euid X__uid_t + Fsc_gid X__gid_t + Fsc_egid X__gid_t + Fsc_ngroups int32 + Fsc_groups [1]X__gid_t +} /* socket.h:383:1 */ + +// Compute size of a sockcred structure with groups. + +// Definition for CTL_NET PCB fetching sysctls +type Kinfo_pcb = struct { + Fki_pcbaddr X__uint64_t + Fki_ppcbaddr X__uint64_t + Fki_sockaddr X__uint64_t + Fki_family X__uint32_t + Fki_type X__uint32_t + Fki_protocol X__uint32_t + Fki_pflags X__uint32_t + Fki_sostate X__uint32_t + Fki_prstate X__uint32_t + Fki_tstate X__int32_t + Fki_tflags X__uint32_t + Fki_rcvq X__uint64_t + Fki_sndq X__uint64_t + Fki_s struct { + F_kis_src struct { + Fsa_len X__uint8_t + Fsa_family X__sa_family_t + Fsa_data [14]uint8 + } + F__ccgo_pad1 [248]byte + } + Fki_d struct { + F_kid_dst struct { + Fsa_len X__uint8_t + Fsa_family X__sa_family_t + Fsa_data [14]uint8 + } + F__ccgo_pad1 [248]byte + } + Fki_inode X__uint64_t + Fki_vnode X__uint64_t + Fki_conn X__uint64_t + Fki_refs X__uint64_t + Fki_nextref X__uint64_t +} /* socket.h:404:1 */ + +// PF_ROUTE - Routing table +// +// Three additional levels are defined: +// Fourth: address family, 0 is wildcard +// Fifth: type of info, defined below +// Sixth: flag(s) to mask with for NET_RT_FLAGS + +// Maximum queue length specifiable by listen(2). + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// Message header for recvmsg and sendmsg calls. +// Used value-result for recvmsg, value only for sendmsg. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen X__socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen X__socklen_t + Fmsg_flags int32 +} /* socket.h:479:1 */ + +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen X__socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen X__socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 +} /* socket.h:506:1 */ + +// Extra flags used internally only + +// Header for ancillary data objects in msg_control buffer. +// Used for additional information with/about a datagram +// not expressible by flags. The format is a sequence +// of message elements headed by cmsghdr structures. +type Cmsghdr = struct { + Fcmsg_len X__socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:525:1 */ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// Local port number conventions: +// +// Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root), +// unless a kernel is compiled with IPNOPRIVPORTS defined. +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// +// The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although +// that is settable by sysctl(3); net.inet.ip.anonportmin and +// net.inet.ip.anonportmax respectively. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT, +// and exists only for FreeBSD compatibility purposes. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. +// This convention is based on "vouchsafe" principles only. +// It is only secure if you trust the remote host to restrict these ports. +// The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]X__uint8_t + } +} /* in6.h:123:1 */ + +// Socket address for IPv6 +type Sockaddr_in6 = struct { + Fsin6_len Uint8_t + Fsin6_family X__sa_family_t + Fsin6_port X__in_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]X__uint8_t + } + } + Fsin6_scope_id Uint32_t +} /* in6.h:146:1 */ + +// Unspecified + +// Loopback + +// IPv4 compatible + +// Mapped + +// KAME Scope Values + +// Unicast Scope +// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). + +// Multicast + +// Multicast Scope + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. +// no hdrincl +// The join and leave membership option numbers need to match with the v4 ones +// RFC2292 options + +// new socket options introduced in RFC3542 + +// more new socket options introduced in RFC3542 + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]X__uint8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:459:1 */ + +// IPV6_PKTINFO: Packet information(RFC2292 sec 5) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]X__uint8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:467:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len Uint8_t + Fsin6_family X__sa_family_t + Fsin6_port X__in_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]X__uint8_t + } + } + Fsin6_scope_id Uint32_t + } + Fip6m_mtu Uint32_t +} /* in6.h:475:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/in_openbsd_386.go b/vendor/modernc.org/libc/netinet/in/in_openbsd_386.go new file mode 100644 index 00000000..08eeb70a --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/in_openbsd_386.go @@ -0,0 +1,1240 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_386.go -pkgname in', DO NOT EDIT. + +package in + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + ICMP6_FILTER = 18 // in6.h:304:1: + INET6_ADDRSTRLEN = 46 // in6.h:97:1: + INET_ADDRSTRLEN = 16 // in.h:382:1: + IN_CLASSA_MAX = 128 // in.h:195:1: + IN_CLASSA_NSHIFT = 24 // in.h:193:1: + IN_CLASSB_MAX = 65536 // in.h:202:1: + IN_CLASSB_NSHIFT = 16 // in.h:200:1: + IN_CLASSC_NSHIFT = 8 // in.h:207:1: + IN_CLASSD_NSHIFT = 28 // in.h:214:1: + IN_LOOPBACKNET = 127 // in.h:253:1: + IN_RFC3021_NSHIFT = 31 // in.h:219:1: + IPCTL_ARPDOWN = 40 // in.h:698:1: + IPCTL_ARPQUEUE = 41 // in.h:699:1: + IPCTL_ARPQUEUED = 36 // in.h:694:1: + IPCTL_ARPTIMEOUT = 39 // in.h:697:1: + IPCTL_DEFTTL = 3 // in.h:662:1: + IPCTL_DIRECTEDBCAST = 6 // in.h:664:1: + IPCTL_ENCDEBUG = 12 // in.h:670:1: + IPCTL_FORWARDING = 1 // in.h:660:1: + IPCTL_IFQUEUE = 30 // in.h:688:1: + IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1: + IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1: + IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1: + IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1: + IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1: + IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1: + IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1: + IPCTL_IPSEC_BYTES = 20 // in.h:678:1: + IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1: + IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1: + IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1: + IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1: + IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1: + IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1: + IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1: + IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1: + IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1: + IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1: + IPCTL_IPSEC_STATS = 13 // in.h:671:1: + IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1: + IPCTL_MAXID = 42 // in.h:700:1: + IPCTL_MFORWARDING = 31 // in.h:689:1: + IPCTL_MRTMFC = 37 // in.h:695:1: + IPCTL_MRTPROTO = 34 // in.h:692:1: + IPCTL_MRTSTATS = 35 // in.h:693:1: + IPCTL_MRTVIF = 38 // in.h:696:1: + IPCTL_MTUDISC = 27 // in.h:685:1: + IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1: + IPCTL_MULTIPATH = 32 // in.h:690:1: + IPCTL_SENDREDIRECTS = 2 // in.h:661:1: + IPCTL_SOURCEROUTE = 5 // in.h:663:1: + IPCTL_STATS = 33 // in.h:691:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1: + IPPORT_HILASTAUTO = 65535 // in.h:160:1: + IPPORT_RESERVED = 1024 // in.h:153:1: + IPPORT_USERRESERVED = 49151 // in.h:154:1: + IPPROTO_AH = 51 // in.h:89:1: + IPPROTO_CARP = 112 // in.h:99:1: + IPPROTO_DIVERT = 258 // in.h:109:1: + IPPROTO_DONE = 257 // in.h:173:1: + IPPROTO_DSTOPTS = 60 // in.h:93:1: + IPPROTO_EGP = 8 // in.h:78:1: + IPPROTO_ENCAP = 98 // in.h:96:1: + IPPROTO_EON = 80 // in.h:94:1: + IPPROTO_ESP = 50 // in.h:88:1: + IPPROTO_ETHERIP = 97 // in.h:95:1: + IPPROTO_FRAGMENT = 44 // in.h:85:1: + IPPROTO_GGP = 3 // in.h:74:1: + IPPROTO_GRE = 47 // in.h:87:1: + IPPROTO_HOPOPTS = 0 // in.h:71:1: + IPPROTO_ICMP = 1 // in.h:72:1: + IPPROTO_ICMPV6 = 58 // in.h:91:1: + IPPROTO_IDP = 22 // in.h:81:1: + IPPROTO_IGMP = 2 // in.h:73:1: + IPPROTO_IP = 0 // in.h:70:1: + IPPROTO_IPCOMP = 108 // in.h:98:1: + IPPROTO_IPIP = 4 // in.h:75:1: + IPPROTO_IPV4 = 4 // in.h:76:1: + IPPROTO_IPV6 = 41 // in.h:83:1: + IPPROTO_MAX = 256 // in.h:106:1: + IPPROTO_MAXID = 259 // in.h:393:1: + IPPROTO_MOBILE = 55 // in.h:90:1: + IPPROTO_MPLS = 137 // in.h:102:1: + IPPROTO_NONE = 59 // in.h:92:1: + IPPROTO_PFSYNC = 240 // in.h:103:1: + IPPROTO_PIM = 103 // in.h:97:1: + IPPROTO_PUP = 12 // in.h:79:1: + IPPROTO_RAW = 255 // in.h:104:1: + IPPROTO_ROUTING = 43 // in.h:84:1: + IPPROTO_RSVP = 46 // in.h:86:1: + IPPROTO_SCTP = 132 // in.h:100:1: + IPPROTO_TCP = 6 // in.h:77:1: + IPPROTO_TP = 29 // in.h:82:1: + IPPROTO_UDP = 17 // in.h:80:1: + IPPROTO_UDPLITE = 136 // in.h:101:1: + IPSEC6_OUTSA = 56 // in6.h:337:1: + IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1: + IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1: + IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1: + IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1: + IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1: + IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1: + IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1: + IPSEC_LEVEL_NONE = 0x00 // in.h:329:1: + IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1: + IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1: + IPSEC_LEVEL_USE = 0x02 // in.h:331:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:578:1: + IPV6CTL_DAD_PENDING = 49 // in6.h:589:1: + IPV6CTL_DEFHLIM = 3 // in6.h:567:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1: + IPV6CTL_FORWARDING = 1 // in6.h:565:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:568:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1: + IPV6CTL_IFQUEUE = 51 // in6.h:591:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1: + IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:583:1: + IPV6CTL_MAXID = 55 // in6.h:595:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1: + IPV6CTL_MFORWARDING = 42 // in6.h:584:1: + IPV6CTL_MRTMFC = 53 // in6.h:593:1: + IPV6CTL_MRTMIF = 52 // in6.h:592:1: + IPV6CTL_MRTPROTO = 8 // in6.h:571:1: + IPV6CTL_MRTSTATS = 7 // in6.h:570:1: + IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1: + IPV6CTL_MULTIPATH = 43 // in6.h:585:1: + IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1: + IPV6CTL_SOIIKEY = 54 // in6.h:594:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:573:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1: + IPV6CTL_STATS = 6 // in6.h:569:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1: + IPV6PROTO_MAXID = 259 // in6.h:470:1: + IPV6_AUTH_LEVEL = 53 // in6.h:333:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1: + IPV6_CHECKSUM = 26 // in6.h:307:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1: + IPV6_DONTFRAG = 62 // in6.h:345:1: + IPV6_DSTOPTS = 50 // in6.h:330:1: + IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1: + IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1: + IPV6_HOPLIMIT = 47 // in6.h:327:1: + IPV6_HOPOPTS = 49 // in6.h:329:1: + IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1: + IPV6_JOIN_GROUP = 12 // in6.h:300:1: + IPV6_LEAVE_GROUP = 13 // in6.h:301:1: + IPV6_MINHOPCOUNT = 65 // in6.h:349:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:298:1: + IPV6_MULTICAST_IF = 9 // in6.h:297:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:299:1: + IPV6_NEXTHOP = 48 // in6.h:328:1: + IPV6_PATHMTU = 44 // in6.h:322:1: + IPV6_PIPEX = 63 // in6.h:346:1: + IPV6_PKTINFO = 46 // in6.h:326:1: + IPV6_PORTRANGE = 14 // in6.h:302:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:395:1: + IPV6_RECVDSTOPTS = 40 // in6.h:317:1: + IPV6_RECVDSTPORT = 64 // in6.h:348:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:314:1: + IPV6_RECVHOPOPTS = 39 // in6.h:316:1: + IPV6_RECVPATHMTU = 43 // in6.h:320:1: + IPV6_RECVPKTINFO = 36 // in6.h:313:1: + IPV6_RECVRTHDR = 38 // in6.h:315:1: + IPV6_RECVTCLASS = 57 // in6.h:339:1: + IPV6_RTABLE = 0x1021 // in6.h:351:1: + IPV6_RTHDR = 51 // in6.h:331:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:354:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1: + IPV6_TCLASS = 61 // in6.h:344:1: + IPV6_UNICAST_HOPS = 4 // in6.h:296:1: + IPV6_USE_MIN_MTU = 42 // in6.h:319:1: + IPV6_V6ONLY = 27 // in6.h:308:1: + IP_ADD_MEMBERSHIP = 12 // in.h:297:1: + IP_AUTH_LEVEL = 20 // in.h:300:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1: + IP_DROP_MEMBERSHIP = 13 // in.h:298:1: + IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1: + IP_ESP_TRANS_LEVEL = 21 // in.h:301:1: + IP_HDRINCL = 2 // in.h:287:1: + IP_IPCOMP_LEVEL = 29 // in.h:309:1: + IP_IPDEFTTL = 37 // in.h:317:1: + IP_IPSECFLOWINFO = 36 // in.h:316:1: + IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1: + IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1: + IP_IPSEC_LOCAL_ID = 23 // in.h:303:1: + IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1: + IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1: + IP_IPSEC_REMOTE_ID = 24 // in.h:304:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1: + IP_MINTTL = 32 // in.h:312:1: + IP_MIN_MEMBERSHIPS = 15 // in.h:353:1: + IP_MULTICAST_IF = 9 // in.h:294:1: + IP_MULTICAST_LOOP = 11 // in.h:296:1: + IP_MULTICAST_TTL = 10 // in.h:295:1: + IP_OPTIONS = 1 // in.h:286:1: + IP_PIPEX = 34 // in.h:314:1: + IP_PORTRANGE = 19 // in.h:299:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:374:1: + IP_PORTRANGE_HIGH = 1 // in.h:375:1: + IP_PORTRANGE_LOW = 2 // in.h:376:1: + IP_RECVDSTADDR = 7 // in.h:292:1: + IP_RECVDSTPORT = 33 // in.h:313:1: + IP_RECVIF = 30 // in.h:310:1: + IP_RECVOPTS = 5 // in.h:290:1: + IP_RECVRETOPTS = 6 // in.h:291:1: + IP_RECVRTABLE = 35 // in.h:315:1: + IP_RECVTTL = 31 // in.h:311:1: + IP_RETOPTS = 8 // in.h:293:1: + IP_RTABLE = 0x1021 // in.h:321:1: + IP_SENDSRCADDR = 7 // in.h:318:1: + IP_TOS = 3 // in.h:288:1: + IP_TTL = 4 // in.h:289:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SIN6_LEN = 0 // in6.h:104:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IN_ADDR_DECLARED = 0 // in.h:163:1: + X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NETINET6_IN6_H_ = 0 // in6.h:69:1: + X_NETINET_IN_H_ = 0 // in.h:39:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $ +// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ + +// Copyright (c) 1982, 1986, 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. + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// <sys/_endian.h> is pulled in by <sys/types.h> + +type Sa_family_t = X__sa_family_t /* in.h:58:23 */ // sockaddr address family type + +type In_addr_t = X__in_addr_t /* in.h:63:21 */ // base type for internet address +type In_port_t = X__in_port_t /* in.h:64:21 */ // IP port type + +// Protocols + +// Only used internally, so it can be outside the range of valid IP protocols + +// From FreeBSD: +// +// Local port number conventions: +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// The default range is IPPORT_RESERVED through +// IPPORT_USERRESERVED, although that is settable by sysctl. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH changes the range of candidate port numbers +// into the "high" range. These are reserved for client outbound connections +// which do not want to be filtered by any firewalls. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. This +// convention is based on "vouchsafe" principles only. It is only secure +// if you trust the remote host to restrict these ports. +// +// The default range of ports and the high range can be changed by +// sysctl(3). (net.inet.ip.port{hi}{first,last}) +// +// Changing those values has bad security implications if you are +// using a a stateless firewall that is allowing packets outside of that +// range in order to allow transparent outgoing connections. +// +// Such a firewall configuration will generally depend on the use of these +// default values. If you change them, you may find your Security +// Administrator looking for you with a heavy object. + +// Ports < IPPORT_RESERVED are reserved for +// privileged processes (e.g. root). +// Ports > IPPORT_USERRESERVED are reserved +// for servers, not necessarily privileged. + +// Default local port range to use by setting IP_PORTRANGE_HIGH + +// IP Version 4 Internet address (a structure for historical reasons) +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:167:1 */ + +// last return value of *_input(), meaning "all job for this pkt is done". + +// Definitions of bits in internet address integers. +// On subnets, the decomposition of addresses to host and net parts +// is done according to subnet mask, not the masks here. +// +// By byte-swapping the constants, we avoid ever having to byte-swap IP +// addresses inside the kernel. Unfortunately, user-level programs rely +// on these macros not doing byte-swapping. + +// These ones aren't really net and host fields, but routing needn't know. + +// IP Version 4 socket address. +type Sockaddr_in = struct { + Fsin_len U_int8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]Int8_t +} /* in.h:258:1 */ + +// Structure used to describe IP options. +// Used to store options internally, to pass them to a process, +// or to restore options retrieved earlier. +// The ip_dst is used for the first-hop gateway when using a source route +// (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]Int8_t +} /* in.h:273:1 */ + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// source address to use + +// Security levels - IPsec, not IPSO + +// Defaults and limits for options +// The imo_membership vector for each socket starts at IP_MIN_MEMBERSHIPS +// and is dynamically allocated at run-time, bounded by IP_MAX_MEMBERSHIPS, +// and is reallocated when needed, sized according to a power-of-two increment. + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:359:1 */ + +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:364:1 */ + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Buffer lengths for strings containing printable IP addresses + +// Definitions for inet sysctl operations. +// +// Third level is protocol number. +// Fourth level is desired variable within that protocol. + +// Names for IP sysctl objects + +// INET6 stuff +// $OpenBSD: in6.h,v 1.109 2021/06/02 00:20:50 dlg Exp $ +// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ + +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb2.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } +} /* in6.h:81:1 */ + +// Socket address for IPv6 +type Sockaddr_in6 = struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t +} /* in6.h:106:1 */ + +// IPv6 route structure +type Route_in6 = struct { + Fro_rt uintptr + Fro_tableid U_long + Fro_dst struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } +} /* in6.h:150:1 */ + +// Definition of some useful macros to handle IP6 addresses + +// Macros started with IPV6_ADDR is KAME local + +// Unspecified + +// Loopback + +// IPv4 compatible + +// Mapped + +// Unicast Scope +// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). + +// Multicast + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. + +// new socket options introduced in RFC3542 + +// More new socket options introduced in RFC3542 + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:366:1 */ + +// IPV6_PKTINFO: Packet information(RFC3542 sec 6) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:374:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +// XXX Not allowed here by POSIX, but required by RFC 3542, so go +// XXX with the code on the pavement. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } + Fip6m_mtu U_int32_t +} /* in6.h:384:1 */ + +// Argument for IPV6_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +type Socklen_t = X__socklen_t /* in6.h:401:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go b/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go index 85bba3d7..2775e0b7 100644 --- a/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go +++ b/vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go @@ -244,8 +244,8 @@ const ( SIN6_LEN = 0 // in6.h:104:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -261,29 +261,29 @@ const ( X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: X_NETINET6_IN6_H_ = 0 // in6.h:69:1: X_NETINET_IN_H_ = 0 // in.h:39:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -499,7 +499,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Default values. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -669,7 +669,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -829,18 +829,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -922,27 +921,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go b/vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go new file mode 100644 index 00000000..75631e43 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go @@ -0,0 +1,1248 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_arm64.go -pkgname in', DO NOT EDIT. + +package in + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + ICMP6_FILTER = 18 // in6.h:304:1: + INET6_ADDRSTRLEN = 46 // in6.h:97:1: + INET_ADDRSTRLEN = 16 // in.h:382:1: + IN_CLASSA_MAX = 128 // in.h:195:1: + IN_CLASSA_NSHIFT = 24 // in.h:193:1: + IN_CLASSB_MAX = 65536 // in.h:202:1: + IN_CLASSB_NSHIFT = 16 // in.h:200:1: + IN_CLASSC_NSHIFT = 8 // in.h:207:1: + IN_CLASSD_NSHIFT = 28 // in.h:214:1: + IN_LOOPBACKNET = 127 // in.h:253:1: + IN_RFC3021_NSHIFT = 31 // in.h:219:1: + IPCTL_ARPDOWN = 40 // in.h:698:1: + IPCTL_ARPQUEUE = 41 // in.h:699:1: + IPCTL_ARPQUEUED = 36 // in.h:694:1: + IPCTL_ARPTIMEOUT = 39 // in.h:697:1: + IPCTL_DEFTTL = 3 // in.h:662:1: + IPCTL_DIRECTEDBCAST = 6 // in.h:664:1: + IPCTL_ENCDEBUG = 12 // in.h:670:1: + IPCTL_FORWARDING = 1 // in.h:660:1: + IPCTL_IFQUEUE = 30 // in.h:688:1: + IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1: + IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1: + IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1: + IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1: + IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1: + IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1: + IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1: + IPCTL_IPSEC_BYTES = 20 // in.h:678:1: + IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1: + IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1: + IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1: + IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1: + IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1: + IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1: + IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1: + IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1: + IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1: + IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1: + IPCTL_IPSEC_STATS = 13 // in.h:671:1: + IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1: + IPCTL_MAXID = 42 // in.h:700:1: + IPCTL_MFORWARDING = 31 // in.h:689:1: + IPCTL_MRTMFC = 37 // in.h:695:1: + IPCTL_MRTPROTO = 34 // in.h:692:1: + IPCTL_MRTSTATS = 35 // in.h:693:1: + IPCTL_MRTVIF = 38 // in.h:696:1: + IPCTL_MTUDISC = 27 // in.h:685:1: + IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1: + IPCTL_MULTIPATH = 32 // in.h:690:1: + IPCTL_SENDREDIRECTS = 2 // in.h:661:1: + IPCTL_SOURCEROUTE = 5 // in.h:663:1: + IPCTL_STATS = 33 // in.h:691:1: + IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1: + IPPORT_HILASTAUTO = 65535 // in.h:160:1: + IPPORT_RESERVED = 1024 // in.h:153:1: + IPPORT_USERRESERVED = 49151 // in.h:154:1: + IPPROTO_AH = 51 // in.h:89:1: + IPPROTO_CARP = 112 // in.h:99:1: + IPPROTO_DIVERT = 258 // in.h:109:1: + IPPROTO_DONE = 257 // in.h:173:1: + IPPROTO_DSTOPTS = 60 // in.h:93:1: + IPPROTO_EGP = 8 // in.h:78:1: + IPPROTO_ENCAP = 98 // in.h:96:1: + IPPROTO_EON = 80 // in.h:94:1: + IPPROTO_ESP = 50 // in.h:88:1: + IPPROTO_ETHERIP = 97 // in.h:95:1: + IPPROTO_FRAGMENT = 44 // in.h:85:1: + IPPROTO_GGP = 3 // in.h:74:1: + IPPROTO_GRE = 47 // in.h:87:1: + IPPROTO_HOPOPTS = 0 // in.h:71:1: + IPPROTO_ICMP = 1 // in.h:72:1: + IPPROTO_ICMPV6 = 58 // in.h:91:1: + IPPROTO_IDP = 22 // in.h:81:1: + IPPROTO_IGMP = 2 // in.h:73:1: + IPPROTO_IP = 0 // in.h:70:1: + IPPROTO_IPCOMP = 108 // in.h:98:1: + IPPROTO_IPIP = 4 // in.h:75:1: + IPPROTO_IPV4 = 4 // in.h:76:1: + IPPROTO_IPV6 = 41 // in.h:83:1: + IPPROTO_MAX = 256 // in.h:106:1: + IPPROTO_MAXID = 259 // in.h:393:1: + IPPROTO_MOBILE = 55 // in.h:90:1: + IPPROTO_MPLS = 137 // in.h:102:1: + IPPROTO_NONE = 59 // in.h:92:1: + IPPROTO_PFSYNC = 240 // in.h:103:1: + IPPROTO_PIM = 103 // in.h:97:1: + IPPROTO_PUP = 12 // in.h:79:1: + IPPROTO_RAW = 255 // in.h:104:1: + IPPROTO_ROUTING = 43 // in.h:84:1: + IPPROTO_RSVP = 46 // in.h:86:1: + IPPROTO_SCTP = 132 // in.h:100:1: + IPPROTO_TCP = 6 // in.h:77:1: + IPPROTO_TP = 29 // in.h:82:1: + IPPROTO_UDP = 17 // in.h:80:1: + IPPROTO_UDPLITE = 136 // in.h:101:1: + IPSEC6_OUTSA = 56 // in6.h:337:1: + IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1: + IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1: + IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1: + IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1: + IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1: + IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1: + IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1: + IPSEC_LEVEL_NONE = 0x00 // in.h:329:1: + IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1: + IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1: + IPSEC_LEVEL_USE = 0x02 // in.h:331:1: + IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1: + IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1: + IPV6CTL_DAD_COUNT = 16 // in6.h:578:1: + IPV6CTL_DAD_PENDING = 49 // in6.h:589:1: + IPV6CTL_DEFHLIM = 3 // in6.h:567:1: + IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1: + IPV6CTL_FORWARDING = 1 // in6.h:565:1: + IPV6CTL_FORWSRCRT = 5 // in6.h:568:1: + IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1: + IPV6CTL_IFQUEUE = 51 // in6.h:591:1: + IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1: + IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1: + IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1: + IPV6CTL_MAXFRAGS = 41 // in6.h:583:1: + IPV6CTL_MAXID = 55 // in6.h:595:1: + IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1: + IPV6CTL_MFORWARDING = 42 // in6.h:584:1: + IPV6CTL_MRTMFC = 53 // in6.h:593:1: + IPV6CTL_MRTMIF = 52 // in6.h:592:1: + IPV6CTL_MRTPROTO = 8 // in6.h:571:1: + IPV6CTL_MRTSTATS = 7 // in6.h:570:1: + IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1: + IPV6CTL_MULTIPATH = 43 // in6.h:585:1: + IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1: + IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1: + IPV6CTL_SOIIKEY = 54 // in6.h:594:1: + IPV6CTL_SOURCECHECK = 10 // in6.h:573:1: + IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1: + IPV6CTL_STATS = 6 // in6.h:569:1: + IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1: + IPV6PROTO_MAXID = 259 // in6.h:470:1: + IPV6_AUTH_LEVEL = 53 // in6.h:333:1: + IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1: + IPV6_CHECKSUM = 26 // in6.h:307:1: + IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1: + IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1: + IPV6_DONTFRAG = 62 // in6.h:345:1: + IPV6_DSTOPTS = 50 // in6.h:330:1: + IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1: + IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1: + IPV6_HOPLIMIT = 47 // in6.h:327:1: + IPV6_HOPOPTS = 49 // in6.h:329:1: + IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1: + IPV6_JOIN_GROUP = 12 // in6.h:300:1: + IPV6_LEAVE_GROUP = 13 // in6.h:301:1: + IPV6_MINHOPCOUNT = 65 // in6.h:349:1: + IPV6_MULTICAST_HOPS = 10 // in6.h:298:1: + IPV6_MULTICAST_IF = 9 // in6.h:297:1: + IPV6_MULTICAST_LOOP = 11 // in6.h:299:1: + IPV6_NEXTHOP = 48 // in6.h:328:1: + IPV6_PATHMTU = 44 // in6.h:322:1: + IPV6_PIPEX = 63 // in6.h:346:1: + IPV6_PKTINFO = 46 // in6.h:326:1: + IPV6_PORTRANGE = 14 // in6.h:302:1: + IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1: + IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1: + IPV6_PORTRANGE_LOW = 2 // in6.h:395:1: + IPV6_RECVDSTOPTS = 40 // in6.h:317:1: + IPV6_RECVDSTPORT = 64 // in6.h:348:1: + IPV6_RECVHOPLIMIT = 37 // in6.h:314:1: + IPV6_RECVHOPOPTS = 39 // in6.h:316:1: + IPV6_RECVPATHMTU = 43 // in6.h:320:1: + IPV6_RECVPKTINFO = 36 // in6.h:313:1: + IPV6_RECVRTHDR = 38 // in6.h:315:1: + IPV6_RECVTCLASS = 57 // in6.h:339:1: + IPV6_RTABLE = 0x1021 // in6.h:351:1: + IPV6_RTHDR = 51 // in6.h:331:1: + IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1: + IPV6_RTHDR_LOOSE = 0 // in6.h:354:1: + IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1: + IPV6_TCLASS = 61 // in6.h:344:1: + IPV6_UNICAST_HOPS = 4 // in6.h:296:1: + IPV6_USE_MIN_MTU = 42 // in6.h:319:1: + IPV6_V6ONLY = 27 // in6.h:308:1: + IP_ADD_MEMBERSHIP = 12 // in.h:297:1: + IP_AUTH_LEVEL = 20 // in.h:300:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1: + IP_DROP_MEMBERSHIP = 13 // in.h:298:1: + IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1: + IP_ESP_TRANS_LEVEL = 21 // in.h:301:1: + IP_HDRINCL = 2 // in.h:287:1: + IP_IPCOMP_LEVEL = 29 // in.h:309:1: + IP_IPDEFTTL = 37 // in.h:317:1: + IP_IPSECFLOWINFO = 36 // in.h:316:1: + IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1: + IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1: + IP_IPSEC_LOCAL_ID = 23 // in.h:303:1: + IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1: + IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1: + IP_IPSEC_REMOTE_ID = 24 // in.h:304:1: + IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1: + IP_MINTTL = 32 // in.h:312:1: + IP_MIN_MEMBERSHIPS = 15 // in.h:353:1: + IP_MULTICAST_IF = 9 // in.h:294:1: + IP_MULTICAST_LOOP = 11 // in.h:296:1: + IP_MULTICAST_TTL = 10 // in.h:295:1: + IP_OPTIONS = 1 // in.h:286:1: + IP_PIPEX = 34 // in.h:314:1: + IP_PORTRANGE = 19 // in.h:299:1: + IP_PORTRANGE_DEFAULT = 0 // in.h:374:1: + IP_PORTRANGE_HIGH = 1 // in.h:375:1: + IP_PORTRANGE_LOW = 2 // in.h:376:1: + IP_RECVDSTADDR = 7 // in.h:292:1: + IP_RECVDSTPORT = 33 // in.h:313:1: + IP_RECVIF = 30 // in.h:310:1: + IP_RECVOPTS = 5 // in.h:290:1: + IP_RECVRETOPTS = 6 // in.h:291:1: + IP_RECVRTABLE = 35 // in.h:315:1: + IP_RECVTTL = 31 // in.h:311:1: + IP_RETOPTS = 8 // in.h:293:1: + IP_RTABLE = 0x1021 // in.h:321:1: + IP_SENDSRCADDR = 7 // in.h:318:1: + IP_TOS = 3 // in.h:288:1: + IP_TTL = 4 // in.h:289:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SIN6_LEN = 0 // in6.h:104:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IN_ADDR_DECLARED = 0 // in.h:163:1: + X_IN_TYPES_DEFINED_ = 0 // in.h:62:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_NETINET6_IN6_H_ = 0 // in6.h:69:1: + X_NETINET_IN_H_ = 0 // in.h:39:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $ +// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ + +// Copyright (c) 1982, 1986, 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. + +// Constants and structures defined by the internet system, +// Per RFC 790, September 1981, and numerous additions. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// <sys/_endian.h> is pulled in by <sys/types.h> + +type Sa_family_t = X__sa_family_t /* in.h:58:23 */ // sockaddr address family type + +type In_addr_t = X__in_addr_t /* in.h:63:21 */ // base type for internet address +type In_port_t = X__in_port_t /* in.h:64:21 */ // IP port type + +// Protocols + +// Only used internally, so it can be outside the range of valid IP protocols + +// From FreeBSD: +// +// Local port number conventions: +// +// When a user does a bind(2) or connect(2) with a port number of zero, +// a non-conflicting local port address is chosen. +// The default range is IPPORT_RESERVED through +// IPPORT_USERRESERVED, although that is settable by sysctl. +// +// A user may set the IPPROTO_IP option IP_PORTRANGE to change this +// default assignment range. +// +// The value IP_PORTRANGE_DEFAULT causes the default behavior. +// +// The value IP_PORTRANGE_HIGH changes the range of candidate port numbers +// into the "high" range. These are reserved for client outbound connections +// which do not want to be filtered by any firewalls. +// +// The value IP_PORTRANGE_LOW changes the range to the "low" are +// that is (by convention) restricted to privileged processes. This +// convention is based on "vouchsafe" principles only. It is only secure +// if you trust the remote host to restrict these ports. +// +// The default range of ports and the high range can be changed by +// sysctl(3). (net.inet.ip.port{hi}{first,last}) +// +// Changing those values has bad security implications if you are +// using a a stateless firewall that is allowing packets outside of that +// range in order to allow transparent outgoing connections. +// +// Such a firewall configuration will generally depend on the use of these +// default values. If you change them, you may find your Security +// Administrator looking for you with a heavy object. + +// Ports < IPPORT_RESERVED are reserved for +// privileged processes (e.g. root). +// Ports > IPPORT_USERRESERVED are reserved +// for servers, not necessarily privileged. + +// Default local port range to use by setting IP_PORTRANGE_HIGH + +// IP Version 4 Internet address (a structure for historical reasons) +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:167:1 */ + +// last return value of *_input(), meaning "all job for this pkt is done". + +// Definitions of bits in internet address integers. +// On subnets, the decomposition of addresses to host and net parts +// is done according to subnet mask, not the masks here. +// +// By byte-swapping the constants, we avoid ever having to byte-swap IP +// addresses inside the kernel. Unfortunately, user-level programs rely +// on these macros not doing byte-swapping. + +// These ones aren't really net and host fields, but routing needn't know. + +// IP Version 4 socket address. +type Sockaddr_in = struct { + Fsin_len U_int8_t + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]Int8_t +} /* in.h:258:1 */ + +// Structure used to describe IP options. +// Used to store options internally, to pass them to a process, +// or to restore options retrieved earlier. +// The ip_dst is used for the first-hop gateway when using a source route +// (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]Int8_t +} /* in.h:273:1 */ + +// Options for use with [gs]etsockopt at the IP level. +// First word of comment is data type; bool is stored in int. +// source address to use + +// Security levels - IPsec, not IPSO + +// Defaults and limits for options +// The imo_membership vector for each socket starts at IP_MIN_MEMBERSHIPS +// and is dynamically allocated at run-time, bounded by IP_MAX_MEMBERSHIPS, +// and is reallocated when needed, sized according to a power-of-two increment. + +// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:359:1 */ + +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:364:1 */ + +// Argument for IP_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +// Buffer lengths for strings containing printable IP addresses + +// Definitions for inet sysctl operations. +// +// Third level is protocol number. +// Fourth level is desired variable within that protocol. + +// Names for IP sysctl objects + +// INET6 stuff +// $OpenBSD: in6.h,v 1.109 2021/06/02 00:20:50 dlg Exp $ +// $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ + +// Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +// 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 project 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 PROJECT 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 PROJECT 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, 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. +// +// @(#)in.h 8.3 (Berkeley) 1/3/94 + +// Identification of the network protocol stack +// for *BSD-current/release: http://www.kame.net/dev/cvsweb2.cgi/kame/COVERAGE +// has the table of implementation/integration differences. + +// IPv6 address +type In6_addr = struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } +} /* in6.h:81:1 */ + +// Socket address for IPv6 +type Sockaddr_in6 = struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t +} /* in6.h:106:1 */ + +// IPv6 route structure +type Route_in6 = struct { + Fro_rt uintptr + Fro_tableid U_long + Fro_dst struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } + F__ccgo_pad1 [4]byte +} /* in6.h:150:1 */ + +// Definition of some useful macros to handle IP6 addresses + +// Macros started with IPV6_ADDR is KAME local + +// Unspecified + +// Loopback + +// IPv4 compatible + +// Mapped + +// Unicast Scope +// Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). + +// Multicast + +// Options for use with [gs]etsockopt at the IPV6 level. +// First word of comment is data type; bool is stored in int. + +// new socket options introduced in RFC3542 + +// More new socket options introduced in RFC3542 + +// to define items, should talk with KAME guys first, for *BSD compatibility + +// Defaults and limits for options + +// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipv6mr_interface uint32 +} /* in6.h:366:1 */ + +// IPV6_PKTINFO: Packet information(RFC3542 sec 6) +type In6_pktinfo = struct { + Fipi6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fipi6_ifindex uint32 +} /* in6.h:374:1 */ + +// Control structure for IPV6_RECVPATHMTU socket option. +// XXX Not allowed here by POSIX, but required by RFC 3542, so go +// XXX with the code on the pavement. +type Ip6_mtuinfo = struct { + Fip6m_addr struct { + Fsin6_len U_int8_t + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo U_int32_t + Fsin6_addr struct { + F__u6_addr struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]U_int8_t + } + } + Fsin6_scope_id U_int32_t + } + Fip6m_mtu U_int32_t +} /* in6.h:384:1 */ + +// Argument for IPV6_PORTRANGE: +// - which range to search when port is unspecified at bind() or connect() + +type Socklen_t = X__socklen_t /* in6.h:401:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/capi_darwin_amd64.go b/vendor/modernc.org/libc/poll/capi_darwin_amd64.go index d2930fc0..b7cb991d 100644 --- a/vendor/modernc.org/libc/poll/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/poll/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o poll/poll_darwin_amd64.go -pkgname poll', DO NOT EDIT. +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_darwin_amd64.go -pkgname poll', DO NOT EDIT. package poll diff --git a/vendor/modernc.org/libc/poll/capi_freebsd_arm.go b/vendor/modernc.org/libc/poll/capi_freebsd_arm.go new file mode 100644 index 00000000..75eda417 --- /dev/null +++ b/vendor/modernc.org/libc/poll/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_freebsd_arm.go -pkgname poll', DO NOT EDIT. + +package poll + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/poll/capi_freebsd_arm64.go b/vendor/modernc.org/libc/poll/capi_freebsd_arm64.go new file mode 100644 index 00000000..ecb32a86 --- /dev/null +++ b/vendor/modernc.org/libc/poll/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_freebsd_amd64.go -pkgname poll', DO NOT EDIT. + +package poll + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/poll/capi_netbsd_arm.go b/vendor/modernc.org/libc/poll/capi_netbsd_arm.go new file mode 100644 index 00000000..b1e5f6ba --- /dev/null +++ b/vendor/modernc.org/libc/poll/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_netbsd_arm.go -pkgname poll', DO NOT EDIT. + +package poll + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/poll/capi_openbsd_386.go b/vendor/modernc.org/libc/poll/capi_openbsd_386.go new file mode 100644 index 00000000..1262c8a5 --- /dev/null +++ b/vendor/modernc.org/libc/poll/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_openbsd_386.go -pkgname poll', DO NOT EDIT. + +package poll + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/poll/capi_openbsd_arm64.go b/vendor/modernc.org/libc/poll/capi_openbsd_arm64.go new file mode 100644 index 00000000..38c55e4a --- /dev/null +++ b/vendor/modernc.org/libc/poll/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_openbsd_arm64.go -pkgname poll', DO NOT EDIT. + +package poll + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/poll/poll_darwin_amd64.go b/vendor/modernc.org/libc/poll/poll_darwin_amd64.go index c05a90c2..6800d819 100644 --- a/vendor/modernc.org/libc/poll/poll_darwin_amd64.go +++ b/vendor/modernc.org/libc/poll/poll_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o poll/poll_darwin_amd64.go -pkgname poll', DO NOT EDIT. +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_darwin_amd64.go -pkgname poll', DO NOT EDIT. package poll @@ -15,31 +15,31 @@ var _ atomic.Value var _ unsafe.Pointer const ( - POLLATTRIB = 0x0400 - POLLERR = 0x0008 - POLLEXTEND = 0x0200 - POLLHUP = 0x0010 - POLLIN = 0x0001 - POLLNLINK = 0x0800 - POLLNVAL = 0x0020 - POLLOUT = 0x0004 - POLLPRI = 0x0002 - POLLRDBAND = 0x0080 - POLLRDNORM = 0x0040 - POLLSTANDARD = 511 - POLLWRBAND = 0x0100 - POLLWRITE = 0x1000 - POLLWRNORM = 4 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS_POLL_H_ = 0 + POLLATTRIB = 0x0400 // poll.h:81:1: + POLLERR = 0x0008 // poll.h:89:1: + POLLEXTEND = 0x0200 // poll.h:80:1: + POLLHUP = 0x0010 // poll.h:90:1: + POLLIN = 0x0001 // poll.h:68:1: + POLLNLINK = 0x0800 // poll.h:82:1: + POLLNVAL = 0x0020 // poll.h:91:1: + POLLOUT = 0x0004 // poll.h:70:1: + POLLPRI = 0x0002 // poll.h:69:1: + POLLRDBAND = 0x0080 // poll.h:73:1: + POLLRDNORM = 0x0040 // poll.h:71:1: + POLLSTANDARD = 511 // poll.h:93:1: + POLLWRBAND = 0x0100 // poll.h:74:1: + POLLWRITE = 0x1000 // poll.h:83:1: + POLLWRNORM = 4 // poll.h:72:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS_POLL_H_ = 0 // poll.h:58:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/poll/poll_freebsd_386.go b/vendor/modernc.org/libc/poll/poll_freebsd_386.go index cca46d8a..57b8c0ff 100644 --- a/vendor/modernc.org/libc/poll/poll_freebsd_386.go +++ b/vendor/modernc.org/libc/poll/poll_freebsd_386.go @@ -585,8 +585,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/poll/poll_freebsd_amd64.go b/vendor/modernc.org/libc/poll/poll_freebsd_amd64.go index 682d9338..d369ce5a 100644 --- a/vendor/modernc.org/libc/poll/poll_freebsd_amd64.go +++ b/vendor/modernc.org/libc/poll/poll_freebsd_amd64.go @@ -32,9 +32,9 @@ const ( X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_SIGSET_T_DECLARED = 0 // poll.h:107:1: X_SIG_MAXSIG = 128 // _sigset.h:47:1: X_SIG_WORDS = 4 // _sigset.h:46:1: @@ -45,7 +45,7 @@ const ( X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_TIME_T_DECLARED = 0 // _timespec.h:43:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -313,12 +313,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // This file is intended to be compatible with the traditional poll.h. type Nfds_t = uint32 /* poll.h:42:22 */ @@ -590,8 +593,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/poll/poll_freebsd_arm.go b/vendor/modernc.org/libc/poll/poll_freebsd_arm.go new file mode 100644 index 00000000..5dd747d6 --- /dev/null +++ b/vendor/modernc.org/libc/poll/poll_freebsd_arm.go @@ -0,0 +1,834 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_freebsd_arm.go -pkgname poll', DO NOT EDIT. + +package poll + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + INFTIM = -1 // poll.h:94:1: + POLLERR = 0x0008 // poll.h:80:1: + POLLHUP = 0x0010 // poll.h:81:1: + POLLIN = 0x0001 // poll.h:63:1: + POLLINIGNEOF = 0x2000 // poll.h:73:1: + POLLNVAL = 0x0020 // poll.h:82:1: + POLLOUT = 0x0004 // poll.h:65:1: + POLLPRI = 0x0002 // poll.h:64:1: + POLLRDBAND = 0x0080 // poll.h:68:1: + POLLRDNORM = 0x0040 // poll.h:66:1: + POLLSTANDARD = 511 // poll.h:86:1: + POLLWRBAND = 0x0100 // poll.h:69:1: + POLLWRNORM = 4 // poll.h:67:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SIGSET_T_DECLARED = 0 // poll.h:107:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_POLL_H_ = 0 // poll.h:34:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIME_T_DECLARED = 0 // _timespec.h:43:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1997 Peter Wemm <peter@freebsd.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// 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$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// This file is intended to be compatible with the traditional poll.h. + +type Nfds_t = uint32 /* poll.h:42:22 */ + +// This structure is passed as an array to poll(2). +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:47:1 */ + +// Requestable events. If poll(2) finds any of these set, they are +// copied to revents on return. +// XXX Note that FreeBSD doesn't make much distinction between POLLPRI +// and POLLRDBAND since none of the file types have distinct priority +// bands - and only some have an urgent "mode". +// XXX Note POLLIN isn't really supported in true SVSV terms. Under SYSV +// POLLIN includes all of normal, band and urgent data. Most poll handlers +// on FreeBSD only treat it as "normal" data. + +// General FreeBSD extension (currently only supported for sockets): + +// These events are set if they occur regardless of whether they were +// requested. + +// Request that poll() wait forever. +// XXX in SYSV, this is defined in stropts.h, which is not included +// by poll.h. + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Time_t = X__time_t /* _timespec.h:42:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type Sigset_t = X__sigset_t /* poll.h:108:20 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/poll_freebsd_arm64.go b/vendor/modernc.org/libc/poll/poll_freebsd_arm64.go new file mode 100644 index 00000000..d369ce5a --- /dev/null +++ b/vendor/modernc.org/libc/poll/poll_freebsd_arm64.go @@ -0,0 +1,890 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_freebsd_amd64.go -pkgname poll', DO NOT EDIT. + +package poll + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + INFTIM = -1 // poll.h:94:1: + POLLERR = 0x0008 // poll.h:80:1: + POLLHUP = 0x0010 // poll.h:81:1: + POLLIN = 0x0001 // poll.h:63:1: + POLLINIGNEOF = 0x2000 // poll.h:73:1: + POLLNVAL = 0x0020 // poll.h:82:1: + POLLOUT = 0x0004 // poll.h:65:1: + POLLPRI = 0x0002 // poll.h:64:1: + POLLRDBAND = 0x0080 // poll.h:68:1: + POLLRDNORM = 0x0040 // poll.h:66:1: + POLLSTANDARD = 511 // poll.h:86:1: + POLLWRBAND = 0x0100 // poll.h:69:1: + POLLWRNORM = 4 // poll.h:67:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SIGSET_T_DECLARED = 0 // poll.h:107:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_POLL_H_ = 0 // poll.h:34:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIME_T_DECLARED = 0 // _timespec.h:43:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1997 Peter Wemm <peter@freebsd.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// 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$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// This file is intended to be compatible with the traditional poll.h. + +type Nfds_t = uint32 /* poll.h:42:22 */ + +// This structure is passed as an array to poll(2). +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:47:1 */ + +// Requestable events. If poll(2) finds any of these set, they are +// copied to revents on return. +// XXX Note that FreeBSD doesn't make much distinction between POLLPRI +// and POLLRDBAND since none of the file types have distinct priority +// bands - and only some have an urgent "mode". +// XXX Note POLLIN isn't really supported in true SVSV terms. Under SYSV +// POLLIN includes all of normal, band and urgent data. Most poll handlers +// on FreeBSD only treat it as "normal" data. + +// General FreeBSD extension (currently only supported for sockets): + +// These events are set if they occur regardless of whether they were +// requested. + +// Request that poll() wait forever. +// XXX in SYSV, this is defined in stropts.h, which is not included +// by poll.h. + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Time_t = X__time_t /* _timespec.h:42:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type Sigset_t = X__sigset_t /* poll.h:108:20 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/poll_netbsd_arm.go b/vendor/modernc.org/libc/poll/poll_netbsd_arm.go new file mode 100644 index 00000000..f3ccc754 --- /dev/null +++ b/vendor/modernc.org/libc/poll/poll_netbsd_arm.go @@ -0,0 +1,345 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_netbsd_arm.go -pkgname poll', DO NOT EDIT. + +package poll + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + INFTIM = -1 // poll.h:67:1: + POLLERR = 0x0008 // poll.h:59:1: + POLLHUP = 0x0010 // poll.h:60:1: + POLLIN = 0x0001 // poll.h:48:1: + POLLNVAL = 0x0020 // poll.h:61:1: + POLLOUT = 0x0004 // poll.h:50:1: + POLLPRI = 0x0002 // poll.h:49:1: + POLLRDBAND = 0x0080 // poll.h:53:1: + POLLRDNORM = 0x0040 // poll.h:51:1: + POLLWRBAND = 0x0100 // poll.h:54:1: + POLLWRNORM = 4 // poll.h:52:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_POLL_H_ = 0 // poll.h:33:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $NetBSD: poll.h,v 1.15 2009/11/11 09:48:51 rmind Exp $ + +// - +// Copyright (c) 1998 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. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +type Nfds_t = uint32 /* poll.h:37:22 */ + +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:39:1 */ + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/poll_openbsd_386.go b/vendor/modernc.org/libc/poll/poll_openbsd_386.go new file mode 100644 index 00000000..3bc6aa06 --- /dev/null +++ b/vendor/modernc.org/libc/poll/poll_openbsd_386.go @@ -0,0 +1,470 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_openbsd_386.go -pkgname poll', DO NOT EDIT. + +package poll + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + INFTIM = -1 // poll.h:54:1: + POLLERR = 0x0008 // poll.h:42:1: + POLLHUP = 0x0010 // poll.h:43:1: + POLLIN = 0x0001 // poll.h:39:1: + POLLNORM = 64 // poll.h:46:1: + POLLNVAL = 0x0020 // poll.h:44:1: + POLLOUT = 0x0004 // poll.h:41:1: + POLLPRI = 0x0002 // poll.h:40:1: + POLLRDBAND = 0x0080 // poll.h:48:1: + POLLRDNORM = 0x0040 // poll.h:45:1: + POLLWRBAND = 0x0100 // poll.h:49:1: + POLLWRNORM = 4 // poll.h:47:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_SIGSET_T_DEFINED_ = 0 // poll.h:63:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_POLL_H_ = 0 // poll.h:29:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMESPEC_DECLARED = 0 // poll.h:73:1: + X_TIME_T_DEFINED_ = 0 // poll.h:68:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ + +// Written by Theo de Raadt, Public Domain +// +// Typical poll() implementations expect poll.h to be in /usr/include. +// However this is not a convenient place for the real definitions. +// $OpenBSD: poll.h,v 1.15 2016/06/07 06:12:37 deraadt Exp $ + +// Copyright (c) 1996 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:31:9 */ + +// $OpenBSD: poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ + +// Written by Theo de Raadt, Public Domain +// +// Typical poll() implementations expect poll.h to be in /usr/include. +// However this is not a convenient place for the real definitions. +// $OpenBSD: poll.h,v 1.15 2016/06/07 06:12:37 deraadt Exp $ + +// Copyright (c) 1996 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +type Pollfd_t = Pollfd /* poll.h:35:3 */ + +type Nfds_t = uint32 /* poll.h:37:22 */ + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Sigset_t = uint32 /* poll.h:64:22 */ + +type Time_t = X__time_t /* poll.h:69:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* poll.h:74:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go b/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go index eac426f0..08792553 100644 --- a/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go +++ b/vendor/modernc.org/libc/poll/poll_openbsd_amd64.go @@ -40,7 +40,7 @@ const ( X_SYS__TYPES_H_ = 0 // _types.h:35:1: X_TIMESPEC_DECLARED = 0 // poll.h:73:1: X_TIME_T_DEFINED_ = 0 // poll.h:68:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -295,7 +295,7 @@ type Nfds_t = uint32 /* poll.h:37:22 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -455,18 +455,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Sigset_t = uint32 /* poll.h:64:22 */ diff --git a/vendor/modernc.org/libc/poll/poll_openbsd_arm64.go b/vendor/modernc.org/libc/poll/poll_openbsd_arm64.go new file mode 100644 index 00000000..53ba770a --- /dev/null +++ b/vendor/modernc.org/libc/poll/poll_openbsd_arm64.go @@ -0,0 +1,477 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_openbsd_arm64.go -pkgname poll', DO NOT EDIT. + +package poll + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + INFTIM = -1 // poll.h:54:1: + POLLERR = 0x0008 // poll.h:42:1: + POLLHUP = 0x0010 // poll.h:43:1: + POLLIN = 0x0001 // poll.h:39:1: + POLLNORM = 64 // poll.h:46:1: + POLLNVAL = 0x0020 // poll.h:44:1: + POLLOUT = 0x0004 // poll.h:41:1: + POLLPRI = 0x0002 // poll.h:40:1: + POLLRDBAND = 0x0080 // poll.h:48:1: + POLLRDNORM = 0x0040 // poll.h:45:1: + POLLWRBAND = 0x0100 // poll.h:49:1: + POLLWRNORM = 4 // poll.h:47:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIGSET_T_DEFINED_ = 0 // poll.h:63:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_POLL_H_ = 0 // poll.h:29:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMESPEC_DECLARED = 0 // poll.h:73:1: + X_TIME_T_DEFINED_ = 0 // poll.h:68:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ + +// Written by Theo de Raadt, Public Domain +// +// Typical poll() implementations expect poll.h to be in /usr/include. +// However this is not a convenient place for the real definitions. +// $OpenBSD: poll.h,v 1.15 2016/06/07 06:12:37 deraadt Exp $ + +// Copyright (c) 1996 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:31:9 */ + +// $OpenBSD: poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ + +// Written by Theo de Raadt, Public Domain +// +// Typical poll() implementations expect poll.h to be in /usr/include. +// However this is not a convenient place for the real definitions. +// $OpenBSD: poll.h,v 1.15 2016/06/07 06:12:37 deraadt Exp $ + +// Copyright (c) 1996 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +type Pollfd_t = Pollfd /* poll.h:35:3 */ + +type Nfds_t = uint32 /* poll.h:37:22 */ + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Sigset_t = uint32 /* poll.h:64:22 */ + +type Time_t = X__time_t /* poll.h:69:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* poll.h:74:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/printf.go b/vendor/modernc.org/libc/printf.go index b8200add..a26ad40e 100644 --- a/vendor/modernc.org/libc/printf.go +++ b/vendor/modernc.org/libc/printf.go @@ -7,6 +7,7 @@ package libc // import "modernc.org/libc" import ( "bytes" "fmt" + "runtime" "strconv" "strings" "unsafe" @@ -136,14 +137,17 @@ more: // the output is empty. format++ var arg int64 + if isWindows && mod == modL { + mod = modNone + } switch mod { - case modNone, modL, modLL, mod64: + case modL, modLL, mod64: arg = VaInt64(args) case modH: arg = int64(int16(VaInt32(args))) case modHH: arg = int64(int8(VaInt32(args))) - case mod32: + case mod32, modNone: arg = int64(VaInt32(args)) default: panic(todo("", mod)) @@ -167,6 +171,9 @@ more: // precision 0, the output is empty. format++ var arg uint64 + if isWindows && mod == modL { + mod = modNone + } switch mod { case modNone: arg = uint64(VaUint32(args)) @@ -200,6 +207,9 @@ more: // precision 0, the output is empty. format++ var arg uint64 + if isWindows && mod == modL { + mod = modNone + } switch mod { case modNone: arg = uint64(VaUint32(args)) @@ -284,6 +294,9 @@ more: // printed with an explicit precision 0, the output is empty. format++ var arg uint64 + if isWindows && mod == modL { + mod = modNone + } switch mod { case modNone: arg = uint64(VaUint32(args)) @@ -406,9 +419,17 @@ more: // The void * pointer argument is printed in hexadecimal (as if by %#x or // %#lx). format++ - arg := VaUintptr(args) - buf.WriteString("0x") - buf.WriteString(strconv.FormatInt(int64(arg), 16)) + switch runtime.GOOS { + case "windows": + switch runtime.GOARCH { + case "386", "arm": + fmt.Fprintf(buf, "%08X", VaUintptr(args)) + default: + fmt.Fprintf(buf, "%016X", VaUintptr(args)) + } + default: + fmt.Fprintf(buf, "%#0x", VaUintptr(args)) + } case 'c': // If no l modifier is present, the int argument is converted to an unsigned // char, and the resulting character is written. If an l modifier is present, diff --git a/vendor/modernc.org/libc/pthread.go b/vendor/modernc.org/libc/pthread.go index 565086ec..06792905 100644 --- a/vendor/modernc.org/libc/pthread.go +++ b/vendor/modernc.org/libc/pthread.go @@ -87,6 +87,14 @@ func (d *pthreadData) init(t *TLS, detached bool) { threads[t.ID] = t } +func (d *pthreadData) close(t *TLS) { + threadsMu.Lock() + + defer threadsMu.Unlock() + + delete(threads, t.ID) +} + // int pthread_attr_destroy(pthread_attr_t *attr); func Xpthread_attr_destroy(t *TLS, pAttr uintptr) int32 { return 0 diff --git a/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go b/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go index ac443ae5..ca2b6e01 100644 --- a/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/pthread/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pthread/pthread_darwin_amd64.go -pkgname pthread', DO NOT EDIT. +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_darwin_amd64.go -pkgname pthread', DO NOT EDIT. package pthread diff --git a/vendor/modernc.org/libc/pthread/capi_freebsd_arm.go b/vendor/modernc.org/libc/pthread/capi_freebsd_arm.go new file mode 100644 index 00000000..745e4170 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_freebsd_arm.go -pkgname pthread', DO NOT EDIT. + +package pthread + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pthread/capi_freebsd_arm64.go b/vendor/modernc.org/libc/pthread/capi_freebsd_arm64.go new file mode 100644 index 00000000..1aafa8cf --- /dev/null +++ b/vendor/modernc.org/libc/pthread/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_freebsd_amd64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pthread/capi_netbsd_arm.go b/vendor/modernc.org/libc/pthread/capi_netbsd_arm.go new file mode 100644 index 00000000..a436b329 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_netbsd_arm.go -pkgname pthread', DO NOT EDIT. + +package pthread + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pthread/capi_openbsd_386.go b/vendor/modernc.org/libc/pthread/capi_openbsd_386.go new file mode 100644 index 00000000..f7e08f03 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_openbsd_386.go -pkgname pthread', DO NOT EDIT. + +package pthread + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pthread/capi_openbsd_arm64.go b/vendor/modernc.org/libc/pthread/capi_openbsd_arm64.go new file mode 100644 index 00000000..3e10d42f --- /dev/null +++ b/vendor/modernc.org/libc/pthread/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_openbsd_arm64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pthread/capi_windows_386.go b/vendor/modernc.org/libc/pthread/capi_windows_386.go index eb0511cc..282502d0 100644 --- a/vendor/modernc.org/libc/pthread/capi_windows_386.go +++ b/vendor/modernc.org/libc/pthread/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo pthread\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pthread\pthread_windows_386.go -pkgname pthread', DO NOT EDIT. +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_windows_386.go -pkgname pthread', DO NOT EDIT. package pthread diff --git a/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go b/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go index ad34564f..526039e3 100644 --- a/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pthread/pthread_darwin_amd64.go -pkgname pthread', DO NOT EDIT. +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_darwin_amd64.go -pkgname pthread', DO NOT EDIT. package pthread @@ -15,87 +15,87 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLOCKS_PER_SEC = 1000000 - PTHREAD_CANCEL_ASYNCHRONOUS = 0x00 - PTHREAD_CANCEL_DEFERRED = 0x02 - PTHREAD_CANCEL_DISABLE = 0x00 - PTHREAD_CANCEL_ENABLE = 0x01 - PTHREAD_CREATE_DETACHED = 2 - PTHREAD_CREATE_JOINABLE = 1 - PTHREAD_EXPLICIT_SCHED = 2 - PTHREAD_INHERIT_SCHED = 1 - PTHREAD_MUTEX_DEFAULT = 0 - PTHREAD_MUTEX_ERRORCHECK = 1 - PTHREAD_MUTEX_NORMAL = 0 - PTHREAD_MUTEX_POLICY_FAIRSHARE_NP = 1 - PTHREAD_MUTEX_POLICY_FIRSTFIT_NP = 3 - PTHREAD_MUTEX_RECURSIVE = 2 - PTHREAD_PRIO_INHERIT = 1 - PTHREAD_PRIO_NONE = 0 - PTHREAD_PRIO_PROTECT = 2 - PTHREAD_PROCESS_PRIVATE = 2 - PTHREAD_PROCESS_SHARED = 1 - PTHREAD_SCOPE_PROCESS = 2 - PTHREAD_SCOPE_SYSTEM = 1 - QOS_MIN_RELATIVE_PRIORITY = -15 - SCHED_FIFO = 4 - SCHED_OTHER = 1 - SCHED_RR = 2 - TIME_UTC = 1 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MACH_PORT_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_SIG_init = 0x3CB0B1BB - X_PTHREAD_COND_T = 0 - X_PTHREAD_ERRORCHECK_MUTEX_SIG_init = 0x32AAABA1 - X_PTHREAD_FIRSTFIT_MUTEX_SIG_init = 0x32AAABA3 - X_PTHREAD_H = 0 - X_PTHREAD_IMPL_H_ = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_SIG_init = 0x32AAABA7 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_SIG_init = 0x30B1BCBA - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_QOS_H = 0 - X_PTHREAD_RECURSIVE_MUTEX_SIG_init = 0x32AAABA2 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_SIG_init = 0x2DA8B3B4 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_SCHED_H_ = 0 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_SYS_QOS_H = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_H_ = 0 - X_TIME_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + CLOCKS_PER_SEC = 1000000 // time.h:90:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 0x00 // pthread.h:147:1: + PTHREAD_CANCEL_DEFERRED = 0x02 // pthread.h:146:1: + PTHREAD_CANCEL_DISABLE = 0x00 // pthread.h:145:1: + PTHREAD_CANCEL_ENABLE = 0x01 // pthread.h:144:1: + PTHREAD_CREATE_DETACHED = 2 // pthread.h:139:1: + PTHREAD_CREATE_JOINABLE = 1 // pthread.h:138:1: + PTHREAD_EXPLICIT_SCHED = 2 // pthread.h:142:1: + PTHREAD_INHERIT_SCHED = 1 // pthread.h:141:1: + PTHREAD_MUTEX_DEFAULT = 0 // pthread.h:172:1: + PTHREAD_MUTEX_ERRORCHECK = 1 // pthread.h:170:1: + PTHREAD_MUTEX_NORMAL = 0 // pthread.h:169:1: + PTHREAD_MUTEX_POLICY_FAIRSHARE_NP = 1 // pthread.h:177:1: + PTHREAD_MUTEX_POLICY_FIRSTFIT_NP = 3 // pthread.h:178:1: + PTHREAD_MUTEX_RECURSIVE = 2 // pthread.h:171:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:163:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:162:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:164:1: + PTHREAD_PROCESS_PRIVATE = 2 // pthread.h:157:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:156:1: + PTHREAD_SCOPE_PROCESS = 2 // pthread.h:154:1: + PTHREAD_SCOPE_SYSTEM = 1 // pthread.h:153:1: + QOS_MIN_RELATIVE_PRIORITY = -15 // qos.h:153:1: + SCHED_FIFO = 4 // pthread_impl.h:55:1: + SCHED_OTHER = 1 // pthread_impl.h:54:1: + SCHED_RR = 2 // pthread_impl.h:56:1: + TIME_UTC = 1 // time.h:197:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MACH_PORT_T = 0 // _mach_port_t.h:48:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_SIG_init = 0x3CB0B1BB // pthread_impl.h:47:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_ERRORCHECK_MUTEX_SIG_init = 0x32AAABA1 // pthread_impl.h:43:1: + X_PTHREAD_FIRSTFIT_MUTEX_SIG_init = 0x32AAABA3 // pthread_impl.h:45:1: + X_PTHREAD_H = 0 // pthread.h:53:1: + X_PTHREAD_IMPL_H_ = 0 // pthread_impl.h:25:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_SIG_init = 0x32AAABA7 // pthread_impl.h:41:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_SIG_init = 0x30B1BCBA // pthread_impl.h:48:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_QOS_H = 0 // qos.h:25:1: + X_PTHREAD_RECURSIVE_MUTEX_SIG_init = 0x32AAABA2 // pthread_impl.h:44:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_SIG_init = 0x2DA8B3B4 // pthread_impl.h:49:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_SCHED_H_ = 0 // sched.h:25:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS_QOS_H = 0 // qos.h:25:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_H_ = 0 // time.h:64:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) // Copyright (c) 2013-2014 Apple Inc. All rights reserved. diff --git a/vendor/modernc.org/libc/pthread/pthread_freebsd_386.go b/vendor/modernc.org/libc/pthread/pthread_freebsd_386.go index 09a1c150..201be137 100644 --- a/vendor/modernc.org/libc/pthread/pthread_freebsd_386.go +++ b/vendor/modernc.org/libc/pthread/pthread_freebsd_386.go @@ -15,6 +15,8 @@ var _ atomic.Value var _ unsafe.Pointer const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: CLK_TCK = 128 // time.h:56:1: CLOCKS_PER_SEC = 128 // time.h:60:1: CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: @@ -34,6 +36,24 @@ const ( CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUSET_DEFAULT = 0 // cpuset.h:119:1: + CPUSET_INVALID = -1 // cpuset.h:118:1: + CPU_LEVEL_CPUSET = 2 // cpuset.h:100:1: + CPU_LEVEL_ROOT = 1 // cpuset.h:99:1: + CPU_LEVEL_WHICH = 3 // cpuset.h:101:1: + CPU_MAXSIZE = 256 // _cpuset.h:43:1: + CPU_SETSIZE = 256 // _cpuset.h:46:1: + CPU_WHICH_CPUSET = 3 // cpuset.h:108:1: + CPU_WHICH_DOMAIN = 6 // cpuset.h:111:1: + CPU_WHICH_INTRHANDLER = 7 // cpuset.h:112:1: + CPU_WHICH_IRQ = 4 // cpuset.h:109:1: + CPU_WHICH_ITHREAD = 8 // cpuset.h:113:1: + CPU_WHICH_JAIL = 5 // cpuset.h:110:1: + CPU_WHICH_PID = 2 // cpuset.h:107:1: + CPU_WHICH_TID = 1 // cpuset.h:106:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:58:1: PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:85:1: PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:84:1: @@ -60,40 +80,99 @@ const ( PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:64:1: PTHREAD_STACK_MIN = 2048 // pthread.h:56:1: PTHREAD_THREADS_MAX = 4294967295 // pthread.h:57:1: - SCHED_FIFO = 1 // sched.h:236:1: - SCHED_OTHER = 2 // sched.h:237:1: - SCHED_RR = 3 // sched.h:238:1: + SCHED_FIFO = 1 // sched.h:241:1: + SCHED_OTHER = 2 // sched.h:242:1: + SCHED_RR = 3 // sched.h:243:1: TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: TIMER_RELTIME = 0x0 // _clock_id.h:98:1: TIME_UTC = 1 // time.h:188:1: - X_CLOCKID_T_DECLARED = 0 // time.h:83:1: - X_CLOCK_T_DECLARED = 0 // time.h:64:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: X_ILP32 = 1 // <predefined>:1:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: X_Nonnull = 0 // cdefs.h:790:1: X_Null_unspecified = 0 // cdefs.h:792:1: X_Nullable = 0 // cdefs.h:791:1: - X_PID_T_DECLARED = 0 // sched.h:254:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: X_PTHREAD_H_ = 0 // pthread.h:38:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: X_SCHED_H_ = 0 // sched.h:65:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: X_SIG_MAXSIG = 128 // _sigset.h:47:1: X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // time.h:74:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_BITSET_H_ = 0 // bitset.h:35:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_CPUSET_H_ = 0 // cpuset.h:35:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__BITSET_H_ = 0 // _bitset.h:35:1: + X_SYS__CPUSET_H_ = 0 // _cpuset.h:35:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // time.h:88:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: X_TIME_H_ = 0 // time.h:44:1: - X_TIME_T_DECLARED = 0 // _timespec.h:43:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: I386 = 1 // <predefined>:335:1: Unix = 1 // <predefined>:336:1: ) @@ -433,10 +512,10 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // - -// SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD) +// Copyright (c) 2021 The FreeBSD Foundation // -// Copyright (c) 1996, 1997 -// HD Associates, Inc. All rights reserved. +// This software were developed by Konstantin Belousov <kib@FreeBSD.org> +// under sponsorship from the FreeBSD Foundation. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -446,18 +525,44 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // 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 HD Associates, Inc -// and Jukka Antero Ukkonen. -// 4. Neither the name of the author nor the names of any co-contributors +// +// 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. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND +// 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 HD ASSOCIATES OR CONTRIBUTORS BE LIABLE +// 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) @@ -465,41 +570,48 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ // - -// Copyright (c) 2002-2008, Jeffrey Roberson <jeff@freebsd.org> -// All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright -// notice unmodified, this list of conditions, and the following -// disclaimer. +// 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 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. +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. // +// @(#)types.h 8.6 (Berkeley) 2/19/95 // $FreeBSD$ -// POSIX 1003.1b Process Scheduling - -// POSIX scheduling policies - -type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ - -// POSIX scheduling declarations for userland. // - // SPDX-License-Identifier: BSD-3-Clause // @@ -536,11 +648,16 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 // $FreeBSD$ +// Machine type dependent parameters. +// - +// This file is in the public domain. +// $FreeBSD$ + // - // SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 1982, 1986, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -566,9 +683,8 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -713,8 +829,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -762,12 +878,47 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // Programs can use this to avoid including <sys/param.h>, with its associated // namespace pollution. -type Time_t = X__time_t /* _timespec.h:42:18 */ +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int32 -} /* _timespec.h:46:1 */ +// BSD Compatiblity + +// Definitions for byte order, according to byte significance from low +// address to high. + +// Define the order of 32-bit words in 64-bit words. + +// Deprecated variants that don't have enough underscores to be useful in more +// strict namespaces. + +// bswap primitives, based on compiler builtins // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -798,18 +949,12 @@ type Timespec = struct { // // $FreeBSD$ -type Pid_t = X__pid_t /* sched.h:253:25 */ - // - // SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 1989, 1993 -// The Regents of the University of California. All rights reserved. -// (c) UNIX System Laboratories, Inc. -// All or some portions of this file are derived from material licensed -// to the University of California by American Telephone and Telegraph -// Co. or Unix System Laboratories, Inc. and are reproduced herein with -// the permission of UNIX System Laboratories, Inc. +// Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu +// Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> +// All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -819,14 +964,55 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by Chris Provenzano. +// 4. The name of Chris Provenzano may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. // -// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint32 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -835,19 +1021,140 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 - // $FreeBSD$ +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint32 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + // - // SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 1991, 1993 +// Copyright (c) 1992, 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: @@ -872,36 +1179,42 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 // $FreeBSD$ // - -// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 2003 Marcel Moolenaar -// All rights reserved. +// 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 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. +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. // +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 // $FreeBSD$ // - @@ -936,7 +1249,7 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // - // SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 1989, 1993 +// 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 @@ -968,36 +1281,72 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 - -// These macros are shared between time.h and sys/time.h. +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ -// Note: The values shown below as a comment for the __POSIX_VISIBLE values are -// the ones FreeBSD traditionally used based on our reading of the POSIX -// standards. However, glibc uses 199309 for all of them, even those many were -// not defined there. To remain bug compatible with glibc means more software -// that relied on the glibc behavior will compile easily on FreeBSD. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD // -// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl -// port until it can be updated properly. It incorrectly assumes that this was a -// standard value. It will be moved back to the __BSD_VISIBLE section once the -// issue is corrected. - -// FreeBSD-specific clocks. - -// Linux compatible names. - -// Frequency of the clock ticks reported by times(). Deprecated - use -// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) - -// Frequency of the clock ticks reported by clock(). - -type Clock_t = X__clock_t /* time.h:63:19 */ +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ -// New in POSIX 1003.1b-1993. -type Clockid_t = X__clockid_t /* time.h:82:21 */ +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ -type Timer_t = X__timer_t /* time.h:87:19 */ +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ // - // SPDX-License-Identifier: BSD-3-Clause @@ -1103,6 +1452,40 @@ type Timer_t = X__timer_t /* time.h:87:19 */ // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp // $FreeBSD$ +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* _timespec.h:46:1 */ + // Structure defined by POSIX.1b to be like a itimerval, but with // timespecs. Used in the timer_*() system calls. type Itimerspec = struct { @@ -1116,6 +1499,432 @@ type Itimerspec = struct { } } /* timespec.h:60:1 */ +type X__fd_mask = uint32 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD) +// +// Copyright (c) 1996, 1997 +// HD Associates, 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by HD Associates, Inc +// and Jukka Antero Ukkonen. +// 4. Neither the name of the author nor the names of any co-contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES 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 HD ASSOCIATES 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) 2002-2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// POSIX 1003.1b Process Scheduling + +// POSIX scheduling policies + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:245:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// Macros addressing word and bit within it, tuned to make compiler +// optimize cases when SETSIZE fits into single machine word. + +// Helper to declare a bitset without it's size being a constant. +// +// Sadly we cannot declare a bitset struct with 'bits[]', because it's +// the only member of the struct and the compiler complains. + +// Define a default type that can be used while manually specifying size +// to every call. + +type X_cpuset = struct{ F__bits [8]int32 } /* _cpuset.h:49:1 */ + +type Cpuset_t = X_cpuset /* _cpuset.h:50:24 */ +type Cpu_set_t = X_cpuset /* sched.h:38:24 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + type Tm = struct { Ftm_sec int32 Ftm_min int32 @@ -1134,7 +1943,6 @@ type Tm = struct { // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -1162,7 +1970,7 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ type X_pthread_cleanup_info = struct{ Fpthread_cleanup_pad [8]X__uintptr_t } /* pthread.h:143:1 */ diff --git a/vendor/modernc.org/libc/pthread/pthread_freebsd_amd64.go b/vendor/modernc.org/libc/pthread/pthread_freebsd_amd64.go index 718f4a15..3669feb7 100644 --- a/vendor/modernc.org/libc/pthread/pthread_freebsd_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_freebsd_amd64.go @@ -15,22 +15,45 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLK_TCK = 128 // time.h:55:1: - CLOCKS_PER_SEC = 128 // time.h:59:1: - CLOCK_MONOTONIC = 4 // time.h:109:1: - CLOCK_MONOTONIC_FAST = 12 // time.h:116:1: - CLOCK_MONOTONIC_PRECISE = 11 // time.h:115:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // time.h:119:1: - CLOCK_PROF = 2 // time.h:106:1: - CLOCK_REALTIME = 0 // time.h:102:1: - CLOCK_REALTIME_FAST = 10 // time.h:114:1: - CLOCK_REALTIME_PRECISE = 9 // time.h:113:1: - CLOCK_SECOND = 13 // time.h:117:1: - CLOCK_THREAD_CPUTIME_ID = 14 // time.h:118:1: - CLOCK_UPTIME = 5 // time.h:110:1: - CLOCK_UPTIME_FAST = 8 // time.h:112:1: - CLOCK_UPTIME_PRECISE = 7 // time.h:111:1: - CLOCK_VIRTUAL = 1 // time.h:105:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUSET_DEFAULT = 0 // cpuset.h:119:1: + CPUSET_INVALID = -1 // cpuset.h:118:1: + CPU_LEVEL_CPUSET = 2 // cpuset.h:100:1: + CPU_LEVEL_ROOT = 1 // cpuset.h:99:1: + CPU_LEVEL_WHICH = 3 // cpuset.h:101:1: + CPU_MAXSIZE = 256 // _cpuset.h:43:1: + CPU_SETSIZE = 256 // _cpuset.h:46:1: + CPU_WHICH_CPUSET = 3 // cpuset.h:108:1: + CPU_WHICH_DOMAIN = 6 // cpuset.h:111:1: + CPU_WHICH_INTRHANDLER = 7 // cpuset.h:112:1: + CPU_WHICH_IRQ = 4 // cpuset.h:109:1: + CPU_WHICH_ITHREAD = 8 // cpuset.h:113:1: + CPU_WHICH_JAIL = 5 // cpuset.h:110:1: + CPU_WHICH_PID = 2 // cpuset.h:107:1: + CPU_WHICH_TID = 1 // cpuset.h:106:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:58:1: PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:85:1: PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:84:1: @@ -57,40 +80,100 @@ const ( PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:64:1: PTHREAD_STACK_MIN = 2048 // pthread.h:56:1: PTHREAD_THREADS_MAX = 18446744073709551615 // pthread.h:57:1: - SCHED_FIFO = 1 // sched.h:236:1: - SCHED_OTHER = 2 // sched.h:237:1: - SCHED_RR = 3 // sched.h:238:1: - TIMER_ABSTIME = 0x1 // time.h:126:1: - TIMER_RELTIME = 0x0 // time.h:123:1: - TIME_UTC = 1 // time.h:216:1: - X_CLOCKID_T_DECLARED = 0 // time.h:82:1: - X_CLOCK_T_DECLARED = 0 // time.h:63:1: + SCHED_FIFO = 1 // sched.h:241:1: + SCHED_OTHER = 2 // sched.h:242:1: + SCHED_RR = 3 // sched.h:243:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: - X_PID_T_DECLARED = 0 // sched.h:254:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: X_PTHREAD_H_ = 0 // pthread.h:38:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: X_SCHED_H_ = 0 // sched.h:65:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: X_SIG_MAXSIG = 128 // _sigset.h:47:1: X_SIG_WORDS = 4 // _sigset.h:46:1: - X_SIZE_T_DECLARED = 0 // time.h:73:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_BITSET_H_ = 0 // bitset.h:35:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_CPUSET_H_ = 0 // cpuset.h:35:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__BITSET_H_ = 0 // _bitset.h:35:1: + X_SYS__CPUSET_H_ = 0 // _cpuset.h:35:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // time.h:87:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: X_TIME_H_ = 0 // time.h:44:1: - X_TIME_T_DECLARED = 0 // _timespec.h:43:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - Unix = 1 // <predefined>:337:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: ) // Run-time invariant values: @@ -438,10 +521,10 @@ type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // - -// SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD) +// Copyright (c) 2021 The FreeBSD Foundation // -// Copyright (c) 1996, 1997 -// HD Associates, Inc. All rights reserved. +// This software were developed by Konstantin Belousov <kib@FreeBSD.org> +// under sponsorship from the FreeBSD Foundation. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -451,18 +534,44 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // 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 HD Associates, Inc -// and Jukka Antero Ukkonen. -// 4. Neither the name of the author nor the names of any co-contributors +// +// 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. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND +// 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 HD ASSOCIATES OR CONTRIBUTORS BE LIABLE +// 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) @@ -470,41 +579,48 @@ type X__sigset_t = X__sigset /* _sigset.h:55:3 */ // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ // - -// Copyright (c) 2002-2008, Jeffrey Roberson <jeff@freebsd.org> -// All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright -// notice unmodified, this list of conditions, and the following -// disclaimer. +// 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 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. +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. // +// @(#)types.h 8.6 (Berkeley) 2/19/95 // $FreeBSD$ -// POSIX 1003.1b Process Scheduling - -// POSIX scheduling policies - -type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ - -// POSIX scheduling declarations for userland. // - // SPDX-License-Identifier: BSD-3-Clause // @@ -541,11 +657,16 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // @(#)cdefs.h 8.8 (Berkeley) 1/9/95 // $FreeBSD$ +// Machine type dependent parameters. +// - +// This file is in the public domain. +// $FreeBSD$ + // - // SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 1982, 1986, 1993 -// The Regents of the University of California. All rights reserved. +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -571,9 +692,8 @@ type Sched_param = struct{ Fsched_priority int32 } /* sched.h:240:1 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.5 (Berkeley) 5/4/95 -// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp -// $FreeBSD$ +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -718,8 +838,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -767,12 +887,47 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // Programs can use this to avoid including <sys/param.h>, with its associated // namespace pollution. -type Time_t = X__time_t /* _timespec.h:42:18 */ +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +// BSD Compatiblity -type Timespec = struct { - Ftv_sec Time_t - Ftv_nsec int64 -} /* _timespec.h:46:1 */ +// Definitions for byte order, according to byte significance from low +// address to high. + +// Define the order of 32-bit words in 64-bit words. + +// Deprecated variants that don't have enough underscores to be useful in more +// strict namespaces. + +// bswap primitives, based on compiler builtins // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -803,18 +958,211 @@ type Timespec = struct { // // $FreeBSD$ -type Pid_t = X__pid_t /* sched.h:253:25 */ +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu +// Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by Chris Provenzano. +// 4. The name of Chris Provenzano may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint64 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint64 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ // - // SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 1989, 1993 +// 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 @@ -840,8 +1188,6 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)time.h 8.3 (Berkeley) 1/21/94 - // $FreeBSD$ // - @@ -883,30 +1229,68 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // -// Copyright (c) 2003 Marcel Moolenaar +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. // +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY THE 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. +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. // +// @(#)signal.h 8.4 (Berkeley) 5/4/95 // $FreeBSD$ // - @@ -938,17 +1322,40 @@ type Pid_t = X__pid_t /* sched.h:253:25 */ // // $FreeBSD$ -// Frequency of the clock ticks reported by times(). Deprecated - use -// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) - -// Frequency of the clock ticks reported by clock(). - -type Clock_t = X__clock_t /* time.h:62:19 */ - -// New in POSIX 1003.1b-1993. -type Clockid_t = X__clockid_t /* time.h:81:21 */ +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ -type Timer_t = X__timer_t /* time.h:86:19 */ +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ // - // SPDX-License-Identifier: BSD-3-Clause @@ -1054,6 +1461,40 @@ type Timer_t = X__timer_t /* time.h:86:19 */ // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp // $FreeBSD$ +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + // Structure defined by POSIX.1b to be like a itimerval, but with // timespecs. Used in the timer_*() system calls. type Itimerspec = struct { @@ -1067,7 +1508,431 @@ type Itimerspec = struct { } } /* timespec.h:60:1 */ -// These macros are also in sys/time.h. +type X__fd_mask = uint64 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [16]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD) +// +// Copyright (c) 1996, 1997 +// HD Associates, 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by HD Associates, Inc +// and Jukka Antero Ukkonen. +// 4. Neither the name of the author nor the names of any co-contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES 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 HD ASSOCIATES 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) 2002-2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// POSIX 1003.1b Process Scheduling + +// POSIX scheduling policies + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:245:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// Macros addressing word and bit within it, tuned to make compiler +// optimize cases when SETSIZE fits into single machine word. + +// Helper to declare a bitset without it's size being a constant. +// +// Sadly we cannot declare a bitset struct with 'bits[]', because it's +// the only member of the struct and the compiler complains. + +// Define a default type that can be used while manually specifying size +// to every call. + +type X_cpuset = struct{ F__bits [4]int64 } /* _cpuset.h:49:1 */ + +type Cpuset_t = X_cpuset /* _cpuset.h:50:24 */ +type Cpu_set_t = X_cpuset /* sched.h:38:24 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ type Tm = struct { Ftm_sec int32 @@ -1082,13 +1947,12 @@ type Tm = struct { F__ccgo_pad1 [4]byte Ftm_gmtoff int64 Ftm_zone uintptr -} /* time.h:129:1 */ +} /* time.h:101:1 */ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -1116,7 +1980,7 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ type X_pthread_cleanup_info = struct{ Fpthread_cleanup_pad [8]X__uintptr_t } /* pthread.h:143:1 */ diff --git a/vendor/modernc.org/libc/pthread/pthread_freebsd_arm.go b/vendor/modernc.org/libc/pthread/pthread_freebsd_arm.go new file mode 100644 index 00000000..68cc11d6 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/pthread_freebsd_arm.go @@ -0,0 +1,1932 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_freebsd_arm.go -pkgname pthread', DO NOT EDIT. + +package pthread + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUSET_DEFAULT = 0 // cpuset.h:119:1: + CPUSET_INVALID = -1 // cpuset.h:118:1: + CPU_LEVEL_CPUSET = 2 // cpuset.h:100:1: + CPU_LEVEL_ROOT = 1 // cpuset.h:99:1: + CPU_LEVEL_WHICH = 3 // cpuset.h:101:1: + CPU_MAXSIZE = 256 // _cpuset.h:43:1: + CPU_SETSIZE = 256 // _cpuset.h:46:1: + CPU_WHICH_CPUSET = 3 // cpuset.h:108:1: + CPU_WHICH_DOMAIN = 6 // cpuset.h:111:1: + CPU_WHICH_INTRHANDLER = 7 // cpuset.h:112:1: + CPU_WHICH_IRQ = 4 // cpuset.h:109:1: + CPU_WHICH_ITHREAD = 8 // cpuset.h:113:1: + CPU_WHICH_JAIL = 5 // cpuset.h:110:1: + CPU_WHICH_PID = 2 // cpuset.h:107:1: + CPU_WHICH_TID = 1 // cpuset.h:106:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:58:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:85:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:84:1: + PTHREAD_CANCEL_DISABLE = 1 // pthread.h:83:1: + PTHREAD_CANCEL_ENABLE = 0 // pthread.h:82:1: + PTHREAD_CREATE_DETACHED = 1 // pthread.h:68:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:69:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 4 // pthread.h:54:1: + PTHREAD_DETACHED = 0x1 // pthread.h:63:1: + PTHREAD_DONE_INIT = 1 // pthread.h:92:1: + PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:71:1: + PTHREAD_INHERIT_SCHED = 0x4 // pthread.h:65:1: + PTHREAD_KEYS_MAX = 256 // pthread.h:55:1: + PTHREAD_MUTEX_ROBUST = 1 // pthread.h:141:1: + PTHREAD_MUTEX_STALLED = 0 // pthread.h:140:1: + PTHREAD_NEEDS_INIT = 0 // pthread.h:91:1: + PTHREAD_NOFLOAT = 0x8 // pthread.h:66:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:117:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:116:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:118:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:76:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:77:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:70:1: + PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:64:1: + PTHREAD_STACK_MIN = 4096 // pthread.h:56:1: + PTHREAD_THREADS_MAX = 4294967295 // pthread.h:57:1: + SCHED_FIFO = 1 // sched.h:241:1: + SCHED_OTHER = 2 // sched.h:242:1: + SCHED_RR = 3 // sched.h:243:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_H_ = 0 // pthread.h:38:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SCHED_H_ = 0 // sched.h:65:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_BITSET_H_ = 0 // bitset.h:35:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_CPUSET_H_ = 0 // cpuset.h:35:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__BITSET_H_ = 0 // _bitset.h:35:1: + X_SYS__CPUSET_H_ = 0 // _cpuset.h:35:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:367:1: +) + +// Run-time invariant values: + +// Flags for threads and thread attributes. + +// Values for process shared/private attributes. + +// Flags for cancelling threads + +// Flags for once initialization. + +// Static once initialization values. + +// Static initialization values. + +// Default attribute arguments (draft 4, deprecated). + +// Mutex types (Single UNIX Specification, Version 2, 1997). +// +// Note that a mutex attribute with one of the following types: +// +// PTHREAD_MUTEX_NORMAL +// PTHREAD_MUTEX_RECURSIVE +// +// will deviate from POSIX specified semantics. +const ( /* pthread.h:130:1: */ + PTHREAD_MUTEX_ERRORCHECK = 1 // Default POSIX mutex + PTHREAD_MUTEX_RECURSIVE = 2 // Recursive mutex + PTHREAD_MUTEX_NORMAL = 3 // No error checking + PTHREAD_MUTEX_ADAPTIVE_NP = 4 // Adaptive mutex, spins briefly before blocking on lock + PTHREAD_MUTEX_TYPE_MAX = 5 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and long longs are the same size. Ensure they stay in sync. + +// Minimum signal stack size. + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// Copyright (c) 2021 The FreeBSD Foundation +// +// This software were developed by Konstantin Belousov <kib@FreeBSD.org> +// under sponsorship from the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Machine type dependent parameters. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2001 David E. O'Brien +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 8.1 (Berkeley) 6/10/93 +// $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +// BSD Compatiblity + +// Definitions for byte order, according to byte significance from low +// address to high. + +// Define the order of 32-bit words in 64-bit words. + +// Deprecated variants that don't have enough underscores to be useful in more +// strict namespaces. + +// bswap primitives, based on compiler builtins + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu +// Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by Chris Provenzano. +// 4. The name of Chris Provenzano may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint32 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint32 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint32 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD) +// +// Copyright (c) 1996, 1997 +// HD Associates, 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by HD Associates, Inc +// and Jukka Antero Ukkonen. +// 4. Neither the name of the author nor the names of any co-contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES 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 HD ASSOCIATES 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) 2002-2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// POSIX 1003.1b Process Scheduling + +// POSIX scheduling policies + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:245:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// Macros addressing word and bit within it, tuned to make compiler +// optimize cases when SETSIZE fits into single machine word. + +// Helper to declare a bitset without it's size being a constant. +// +// Sadly we cannot declare a bitset struct with 'bits[]', because it's +// the only member of the struct and the compiler complains. + +// Define a default type that can be used while manually specifying size +// to every call. + +type X_cpuset = struct{ F__bits [8]int32 } /* _cpuset.h:49:1 */ + +type Cpuset_t = X_cpuset /* _cpuset.h:50:24 */ +type Cpu_set_t = X_cpuset /* sched.h:38:24 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +type X_pthread_cleanup_info = struct{ Fpthread_cleanup_pad [8]X__uintptr_t } /* pthread.h:143:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/pthread_freebsd_arm64.go b/vendor/modernc.org/libc/pthread/pthread_freebsd_arm64.go new file mode 100644 index 00000000..3669feb7 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/pthread_freebsd_arm64.go @@ -0,0 +1,1987 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_freebsd_amd64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUSET_DEFAULT = 0 // cpuset.h:119:1: + CPUSET_INVALID = -1 // cpuset.h:118:1: + CPU_LEVEL_CPUSET = 2 // cpuset.h:100:1: + CPU_LEVEL_ROOT = 1 // cpuset.h:99:1: + CPU_LEVEL_WHICH = 3 // cpuset.h:101:1: + CPU_MAXSIZE = 256 // _cpuset.h:43:1: + CPU_SETSIZE = 256 // _cpuset.h:46:1: + CPU_WHICH_CPUSET = 3 // cpuset.h:108:1: + CPU_WHICH_DOMAIN = 6 // cpuset.h:111:1: + CPU_WHICH_INTRHANDLER = 7 // cpuset.h:112:1: + CPU_WHICH_IRQ = 4 // cpuset.h:109:1: + CPU_WHICH_ITHREAD = 8 // cpuset.h:113:1: + CPU_WHICH_JAIL = 5 // cpuset.h:110:1: + CPU_WHICH_PID = 2 // cpuset.h:107:1: + CPU_WHICH_TID = 1 // cpuset.h:106:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:58:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:85:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:84:1: + PTHREAD_CANCEL_DISABLE = 1 // pthread.h:83:1: + PTHREAD_CANCEL_ENABLE = 0 // pthread.h:82:1: + PTHREAD_CREATE_DETACHED = 1 // pthread.h:68:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:69:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 4 // pthread.h:54:1: + PTHREAD_DETACHED = 0x1 // pthread.h:63:1: + PTHREAD_DONE_INIT = 1 // pthread.h:92:1: + PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:71:1: + PTHREAD_INHERIT_SCHED = 0x4 // pthread.h:65:1: + PTHREAD_KEYS_MAX = 256 // pthread.h:55:1: + PTHREAD_MUTEX_ROBUST = 1 // pthread.h:141:1: + PTHREAD_MUTEX_STALLED = 0 // pthread.h:140:1: + PTHREAD_NEEDS_INIT = 0 // pthread.h:91:1: + PTHREAD_NOFLOAT = 0x8 // pthread.h:66:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:117:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:116:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:118:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:76:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:77:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:70:1: + PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:64:1: + PTHREAD_STACK_MIN = 2048 // pthread.h:56:1: + PTHREAD_THREADS_MAX = 18446744073709551615 // pthread.h:57:1: + SCHED_FIFO = 1 // sched.h:241:1: + SCHED_OTHER = 2 // sched.h:242:1: + SCHED_RR = 3 // sched.h:243:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_H_ = 0 // pthread.h:38:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SCHED_H_ = 0 // sched.h:65:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_BITSET_H_ = 0 // bitset.h:35:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_CPUSET_H_ = 0 // cpuset.h:35:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__BITSET_H_ = 0 // _bitset.h:35:1: + X_SYS__CPUSET_H_ = 0 // _cpuset.h:35:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: +) + +// Run-time invariant values: + +// Flags for threads and thread attributes. + +// Values for process shared/private attributes. + +// Flags for cancelling threads + +// Flags for once initialization. + +// Static once initialization values. + +// Static initialization values. + +// Default attribute arguments (draft 4, deprecated). + +// Mutex types (Single UNIX Specification, Version 2, 1997). +// +// Note that a mutex attribute with one of the following types: +// +// PTHREAD_MUTEX_NORMAL +// PTHREAD_MUTEX_RECURSIVE +// +// will deviate from POSIX specified semantics. +const ( /* pthread.h:130:1: */ + PTHREAD_MUTEX_ERRORCHECK = 1 // Default POSIX mutex + PTHREAD_MUTEX_RECURSIVE = 2 // Recursive mutex + PTHREAD_MUTEX_NORMAL = 3 // No error checking + PTHREAD_MUTEX_ADAPTIVE_NP = 4 // Adaptive mutex, spins briefly before blocking on lock + PTHREAD_MUTEX_TYPE_MAX = 5 +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// Copyright (c) 2021 The FreeBSD Foundation +// +// This software were developed by Konstantin Belousov <kib@FreeBSD.org> +// under sponsorship from the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Machine type dependent parameters. +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +// BSD Compatiblity + +// Definitions for byte order, according to byte significance from low +// address to high. + +// Define the order of 32-bit words in 64-bit words. + +// Deprecated variants that don't have enough underscores to be useful in more +// strict namespaces. + +// bswap primitives, based on compiler builtins + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu +// Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by Chris Provenzano. +// 4. The name of Chris Provenzano may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint64 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint64 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint64 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [16]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: (BSD-4-Clause AND BSD-2-Clause-FreeBSD) +// +// Copyright (c) 1996, 1997 +// HD Associates, 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by HD Associates, Inc +// and Jukka Antero Ukkonen. +// 4. Neither the name of the author nor the names of any co-contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES 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 HD ASSOCIATES 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) 2002-2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// POSIX 1003.1b Process Scheduling + +// POSIX scheduling policies + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:245:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org> +// All rights reserved. +// +// Copyright (c) 2008 Nokia Corporation +// 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 unmodified, this list of conditions, and the following +// disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// Macros addressing word and bit within it, tuned to make compiler +// optimize cases when SETSIZE fits into single machine word. + +// Helper to declare a bitset without it's size being a constant. +// +// Sadly we cannot declare a bitset struct with 'bits[]', because it's +// the only member of the struct and the compiler complains. + +// Define a default type that can be used while manually specifying size +// to every call. + +type X_cpuset = struct{ F__bits [4]int64 } /* _cpuset.h:49:1 */ + +type Cpuset_t = X_cpuset /* _cpuset.h:50:24 */ +type Cpu_set_t = X_cpuset /* sched.h:38:24 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +type X_pthread_cleanup_info = struct{ Fpthread_cleanup_pad [8]X__uintptr_t } /* pthread.h:143:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_386.go b/vendor/modernc.org/libc/pthread/pthread_linux_386.go index 0558924b..3dd1a972 100644 --- a/vendor/modernc.org/libc/pthread/pthread_linux_386.go +++ b/vendor/modernc.org/libc/pthread/pthread_linux_386.go @@ -865,7 +865,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -876,13 +877,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Wide character type. @@ -974,7 +977,8 @@ type Time_t = X__time_t /* time_t.h:7:18 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1733,18 +1737,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1768,7 +1775,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1780,7 +1788,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_amd64.go b/vendor/modernc.org/libc/pthread/pthread_linux_amd64.go index 0e3f14a9..c7762fdd 100644 --- a/vendor/modernc.org/libc/pthread/pthread_linux_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_linux_amd64.go @@ -885,7 +885,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -896,8 +897,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -989,7 +991,8 @@ type Time_t = X__time_t /* time_t.h:7:18 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1747,18 +1750,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1782,7 +1788,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1794,7 +1801,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_arm.go b/vendor/modernc.org/libc/pthread/pthread_linux_arm.go index 006f92eb..2473e677 100644 --- a/vendor/modernc.org/libc/pthread/pthread_linux_arm.go +++ b/vendor/modernc.org/libc/pthread/pthread_linux_arm.go @@ -938,7 +938,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -949,13 +950,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Wide character type. @@ -1047,7 +1050,8 @@ type Time_t = X__time_t /* time_t.h:7:18 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1857,18 +1861,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1892,7 +1899,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1904,7 +1912,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 @@ -1935,10 +1944,11 @@ type Pthread_barrierattr_t = struct { // Define the machine-dependent type `jmp_buf'. ARM EABI version. // The exact set of registers saved may depend on the particular core -// in use, as some coprocessor registers may need to be saved. The C -// Library ABI requires that the buffer be 8-byte aligned, and -// recommends that the buffer contain 64 words. The first 26 words -// are occupied by sp, lr, v1-v6, sl, fp, and d8-d15. +// +// in use, as some coprocessor registers may need to be saved. The C +// Library ABI requires that the buffer be 8-byte aligned, and +// recommends that the buffer contain 64 words. The first 26 words +// are occupied by sp, lr, v1-v6, sl, fp, and d8-d15. type X__jmp_buf = [64]int32 /* setjmp.h:33:13 */ // Conditional variable handling. diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_arm64.go b/vendor/modernc.org/libc/pthread/pthread_linux_arm64.go index 58441cdd..61cfbc31 100644 --- a/vendor/modernc.org/libc/pthread/pthread_linux_arm64.go +++ b/vendor/modernc.org/libc/pthread/pthread_linux_arm64.go @@ -969,7 +969,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -980,8 +981,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -1073,7 +1075,8 @@ type Time_t = X__time_t /* time_t.h:7:18 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1864,18 +1867,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -1902,7 +1908,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1914,7 +1921,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1944,8 +1952,9 @@ type Pthread_barrierattr_t = struct { // <https://www.gnu.org/licenses/>. // Jump buffer contains: -// x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not -// saved. +// +// x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not +// saved. type X__jmp_buf = [22]uint64 /* setjmp.h:30:42 */ // Conditional variable handling. diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_ppc64le.go b/vendor/modernc.org/libc/pthread/pthread_linux_ppc64le.go index 64380338..0a09f1aa 100644 --- a/vendor/modernc.org/libc/pthread/pthread_linux_ppc64le.go +++ b/vendor/modernc.org/libc/pthread/pthread_linux_ppc64le.go @@ -894,7 +894,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -905,8 +906,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -998,7 +1000,8 @@ type Time_t = X__time_t /* time_t.h:7:18 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1756,18 +1759,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1791,7 +1797,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1803,7 +1810,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1841,12 +1849,13 @@ type Pthread_barrierattr_t = struct { // Determine the wordsize from the preprocessor defines. // The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI -// the vrsave must be at byte 248 & v20 at byte 256. So we must pad this -// correctly on 32 bit. It also insists that vecregs are only gauranteed -// 4 byte alignment so we need to use vperm in the setjmp/longjmp routines. -// We have to version the code because members like int __mask_was_saved -// in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We -// cannot keep the altivec jmp_buf backward compatible with the jmp_buf. +// +// the vrsave must be at byte 248 & v20 at byte 256. So we must pad this +// correctly on 32 bit. It also insists that vecregs are only gauranteed +// 4 byte alignment so we need to use vperm in the setjmp/longjmp routines. +// We have to version the code because members like int __mask_was_saved +// in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We +// cannot keep the altivec jmp_buf backward compatible with the jmp_buf. type X__jmp_buf = [64]int64 /* setjmp.h:42:18 */ // Conditional variable handling. diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go b/vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go index 82d95faa..a531fb52 100644 --- a/vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go +++ b/vendor/modernc.org/libc/pthread/pthread_linux_riscv64.go @@ -1091,7 +1091,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1102,8 +1103,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Wide character type. @@ -1195,7 +1197,8 @@ type Time_t = X__time_t /* time_t.h:10:18 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1959,9 +1962,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -1995,18 +1999,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2030,7 +2037,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2042,7 +2050,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_s390x.go b/vendor/modernc.org/libc/pthread/pthread_linux_s390x.go index b7b3049c..3e22a41f 100644 --- a/vendor/modernc.org/libc/pthread/pthread_linux_s390x.go +++ b/vendor/modernc.org/libc/pthread/pthread_linux_s390x.go @@ -882,7 +882,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -893,8 +894,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -986,7 +988,8 @@ type Time_t = X__time_t /* time_t.h:7:18 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1743,18 +1746,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1778,7 +1784,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1790,7 +1797,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go b/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go index 7d6db7bb..23eb0955 100644 --- a/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_netbsd_amd64.go @@ -2036,6 +2036,7 @@ type Timezone = struct { // 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 type Bintime = struct { Fsec Time_t @@ -2449,7 +2450,7 @@ type Locale_t = uintptr /* time.h:188:25 */ type Timezone_t = uintptr /* time.h:198:24 */ -// $NetBSD: sched.h,v 1.12 2009/01/11 03:04:12 christos Exp $ +// $NetBSD: sched.h,v 1.12.52.1 2022/08/03 10:42:02 martin Exp $ // - // Copyright (c) 2001 The NetBSD Foundation, Inc. diff --git a/vendor/modernc.org/libc/pthread/pthread_netbsd_arm.go b/vendor/modernc.org/libc/pthread/pthread_netbsd_arm.go new file mode 100644 index 00000000..067d66f8 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/pthread_netbsd_arm.go @@ -0,0 +1,2714 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_netbsd_arm.go -pkgname pthread', DO NOT EDIT. + +package pthread + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + CLOCKS_PER_SEC = 100 // time.h:73:1: + CLOCK_MONOTONIC = 3 // time.h:297:1: + CLOCK_PROCESS_CPUTIME_ID = 0x40000000 // time.h:299:1: + CLOCK_PROF = 2 // time.h:296:1: + CLOCK_REALTIME = 0 // time.h:294:1: + CLOCK_THREAD_CPUTIME_ID = 0x20000000 // time.h:298:1: + CLOCK_VIRTUAL = 1 // time.h:295:1: + CLONE_CSIGNAL = 0x000000ff // sched.h:189:1: + CLONE_FILES = 0x00000400 // sched.h:192:1: + CLONE_FS = 0x00000200 // sched.h:191:1: + CLONE_PID = 0x00001000 // sched.h:194:1: + CLONE_PTRACE = 0x00002000 // sched.h:195:1: + CLONE_SIGHAND = 0x00000800 // sched.h:193:1: + CLONE_VFORK = 0x00004000 // sched.h:197:1: + CLONE_VM = 0x00000100 // sched.h:190:1: + CPUSTATES = 5 // sched.h:140:1: + CP_IDLE = 4 // sched.h:139:1: + CP_INTR = 3 // sched.h:138:1: + CP_NICE = 1 // sched.h:136:1: + CP_SYS = 2 // sched.h:137:1: + CP_USER = 0 // sched.h:135:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + ITIMER_MONOTONIC = 3 // time.h:278:1: + ITIMER_PROF = 2 // time.h:277:1: + ITIMER_REAL = 0 // time.h:275:1: + ITIMER_VIRTUAL = 1 // time.h:276:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTHREAD_BARRIER_SERIAL_THREAD = 1234567 // pthread.h:266:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 1 // pthread.h:261:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:260:1: + PTHREAD_CANCEL_DISABLE = 1 // pthread.h:264:1: + PTHREAD_CANCEL_ENABLE = 0 // pthread.h:263:1: + PTHREAD_CREATE_DETACHED = 1 // pthread.h:249:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:248:1: + PTHREAD_EXPLICIT_SCHED = 1 // pthread.h:252:1: + PTHREAD_INHERIT_SCHED = 0 // pthread.h:251:1: + PTHREAD_MAX_NAMELEN_NP = 32 // pthread.h:279:1: + PTHREAD_MUTEX_DEFAULT = 0 // pthread.h:287:1: + PTHREAD_MUTEX_ERRORCHECK = 1 // pthread.h:285:1: + PTHREAD_MUTEX_NORMAL = 0 // pthread.h:284:1: + PTHREAD_MUTEX_RECURSIVE = 2 // pthread.h:286:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:290:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:289:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:291:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:257:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:258:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:254:1: + PTHREAD_SCOPE_SYSTEM = 1 // pthread.h:255:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SCHED_FIFO = 1 // sched.h:89:1: + SCHED_NONE = -1 // sched.h:87:1: + SCHED_OTHER = 0 // sched.h:88:1: + SCHED_RR = 2 // sched.h:90:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + TIMER_ABSTIME = 0x1 // time.h:304:1: + TIMER_RELTIME = 0x0 // time.h:302:1: + TIME_UTC = 1 // time.h:238:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_H = 0 // pthread.h:33:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SCHED_H_ = 0 // sched.h:33:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_IDTYPE_H_ = 0 // idtype.h:32:1: + X_SYS_NULL_H_ = 0 // null.h:9:1: + X_SYS_SCHED_H_ = 0 // sched.h:70:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:38:1: + X_SYS_TIME_H_ = 0 // time.h:35:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_TIME_H_ = 0 // time.h:40:1: +) + +// $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. + +// 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. +const ( /* idtype.h:41:1: */ + P_MYID = -1 // Me/my process group + P_ALL = 0 // All processes. + P_PID = 1 // A process identifier. + P_LWPID = 2 // An LWP identifier. + P_PPID = 3 // A parent process identifier. + P_PGID = 4 // A process group identifier. + P_SID = 5 // A session identifier. + P_CID = 6 // A scheduling class identifier. + P_UID = 7 // A user identifier. + P_GID = 8 // A group identifier. + P_TASKID = 9 // A task identifier. + P_PROJID = 10 // A project identifier. + P_POOLID = 11 // A pool identifier. + P_ZONEID = 12 // A zone identifier. + P_CTID = 13 // A (process) contract identifier. + P_CPUID = 14 // CPU identifier. + P_PSETID = 15 // Processor set identifier. + X_P_MAXIDTYPE = 2147483647 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +// $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. +// Public domain. + +type Clock_t = uint32 /* time.h:49:23 */ + +type Time_t = X__int64_t /* time.h:54:22 */ + +type Clockid_t = int32 /* time.h:64:25 */ + +type Timer_t = int32 /* time.h:69:23 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:75:1 */ + +// ISO/IEC 9899:201x 7.27.1/3 Components of time +// $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 + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* timespec.h:47:1 */ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// Structure returned by gettimeofday(2) system call, +// and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* time.h:44:1 */ + +// $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 + +// Note: timezone is obsolete. All timezone handling is now in +// userland. Its just here for back compatibility. +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:65:1 */ + +// Operations on timevals. + +// 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 +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:102:1 */ + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. +// NB: Must match the CLOCK_ constants below. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } +} /* time.h:280:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* time.h:289:1 */ + +// $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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ +// $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. + +// 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. +type Idtype_t = int32 /* idtype.h:60:3 */ + +type Locale_t = uintptr /* time.h:188:25 */ + +type Timezone_t = uintptr /* time.h:198:24 */ + +// $NetBSD: sched.h,v 1.12.52.1 2022/08/03 10:42:02 martin Exp $ + +// - +// Copyright (c) 2001 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:80:1 */ + +type Pthread_cleanup_store = struct{ Fpad [4]uintptr } /* pthread.h:170:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/pthread_openbsd_386.go b/vendor/modernc.org/libc/pthread/pthread_openbsd_386.go new file mode 100644 index 00000000..f9b8c6ec --- /dev/null +++ b/vendor/modernc.org/libc/pthread/pthread_openbsd_386.go @@ -0,0 +1,1986 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_openbsd_386.go -pkgname pthread', DO NOT EDIT. + +package pthread + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ARG_MAX = 524288 // syslimits.h:38:1: + BC_BASE_MAX = 2147483647 // syslimits.h:51:1: + BC_DIM_MAX = 65535 // syslimits.h:52:1: + BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: + BC_STRING_MAX = 2147483647 // syslimits.h:54:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BUS_ADRALN = 1 // siginfo.h:83:1: + BUS_ADRERR = 2 // siginfo.h:84:1: + BUS_OBJERR = 3 // siginfo.h:85:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CHAR_BIT = 8 // limits.h:36:1: + CHAR_MAX = 0x7f // limits.h:46:1: + CHAR_MIN = -128 // limits.h:47:1: + CHILD_MAX = 80 // syslimits.h:39:1: + CLD_CONTINUED = 6 // siginfo.h:105:1: + CLD_DUMPED = 3 // siginfo.h:102:1: + CLD_EXITED = 1 // siginfo.h:100:1: + CLD_KILLED = 2 // siginfo.h:101:1: + CLD_STOPPED = 5 // siginfo.h:104:1: + CLD_TRAPPED = 4 // siginfo.h:103:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + EMT_TAGOVF = 1 // siginfo.h:66:1: + EXPR_NEST_MAX = 32 // syslimits.h:56:1: + FD_SETSIZE = 1024 // select.h:62:1: + FPE_FLTDIV = 3 // siginfo.h:71:1: + FPE_FLTINV = 7 // siginfo.h:75:1: + FPE_FLTOVF = 4 // siginfo.h:72:1: + FPE_FLTRES = 6 // siginfo.h:74:1: + FPE_FLTSUB = 8 // siginfo.h:76:1: + FPE_FLTUND = 5 // siginfo.h:73:1: + FPE_INTDIV = 1 // siginfo.h:69:1: + FPE_INTOVF = 2 // siginfo.h:70:1: + GID_MAX = 4294967295 // limits.h:84:1: + HOST_NAME_MAX = 255 // syslimits.h:76:1: + ILL_BADSTK = 8 // siginfo.h:63:1: + ILL_COPROC = 7 // siginfo.h:62:1: + ILL_ILLADR = 3 // siginfo.h:58:1: + ILL_ILLOPC = 1 // siginfo.h:56:1: + ILL_ILLOPN = 2 // siginfo.h:57:1: + ILL_ILLTRP = 4 // siginfo.h:59:1: + ILL_PRVOPC = 5 // siginfo.h:60:1: + ILL_PRVREG = 6 // siginfo.h:61:1: + INT_MAX = 0x7fffffff // limits.h:57:1: + INT_MIN = -2147483648 // limits.h:58:1: + IOV_MAX = 1024 // syslimits.h:64:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LINE_MAX = 2048 // syslimits.h:57:1: + LINK_MAX = 32767 // syslimits.h:40:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + LLONG_MAX = 0x7fffffffffffffff // limits.h:76:1: + LLONG_MIN = -9223372036854775808 // limits.h:78:1: + LOGIN_NAME_MAX = 32 // syslimits.h:72:1: + LONG_BIT = 32 // limits.h:91:1: + LONG_MAX = 0x7fffffff // limits.h:69:1: + LONG_MIN = -2147483648 // limits.h:70:1: + MAX_CANON = 255 // syslimits.h:41:1: + MAX_INPUT = 255 // syslimits.h:42:1: + MB_LEN_MAX = 4 // limits.h:50:1: + MINSIGSTKSZ = 12288 // signal.h:183:1: + NAME_MAX = 255 // syslimits.h:43:1: + NBBY = 8 // select.h:111:1: + NGROUPS_MAX = 16 // syslimits.h:44:1: + NL_ARGMAX = 9 // limits.h:89:1: + NL_LANGMAX = 14 // limits.h:90:1: + NL_MSGMAX = 32767 // limits.h:91:1: + NL_SETMAX = 255 // limits.h:92:1: + NL_TEXTMAX = 255 // limits.h:93:1: + NSIG = 33 // signal.h:48:1: + NSIGBUS = 3 // siginfo.h:86:1: + NSIGCLD = 6 // siginfo.h:106:1: + NSIGEMT = 1 // siginfo.h:67:1: + NSIGFPE = 8 // siginfo.h:77:1: + NSIGILL = 8 // siginfo.h:64:1: + NSIGSEGV = 2 // siginfo.h:81:1: + NSIGTRAP = 2 // siginfo.h:95:1: + NZERO = 20 // syslimits.h:65:1: + OPEN_MAX = 64 // syslimits.h:45:1: + PATH_MAX = 1024 // syslimits.h:46:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + PIPE_BUF = 512 // syslimits.h:47:1: + PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:88:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:82:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:81:1: + PTHREAD_CANCEL_DISABLE = 1 // pthread.h:80:1: + PTHREAD_CANCEL_ENABLE = 0 // pthread.h:79:1: + PTHREAD_CREATE_DETACHED = 1 // pthread.h:65:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:66:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 4 // pthread.h:52:1: + PTHREAD_DETACHED = 0x1 // pthread.h:60:1: + PTHREAD_DONE_INIT = 1 // pthread.h:147:1: + PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:68:1: + PTHREAD_INHERIT_SCHED = 0x4 // pthread.h:62:1: + PTHREAD_KEYS_MAX = 256 // pthread.h:53:1: + PTHREAD_NEEDS_INIT = 0 // pthread.h:146:1: + PTHREAD_NOFLOAT = 0x8 // pthread.h:63:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:162:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:161:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:163:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:73:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:74:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:67:1: + PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:61:1: + PTHREAD_STACK_MIN = 4096 // pthread.h:54:1: + PTHREAD_THREADS_MAX = 4294967295 // pthread.h:55:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:48:1: + QUAD_MIN = -9223372036854775808 // limits.h:49:1: + RE_DUP_MAX = 255 // syslimits.h:59:1: + SA_NOCLDSTOP = 0x0008 // signal.h:132:1: + SA_NOCLDWAIT = 0x0020 // signal.h:130:1: + SA_NODEFER = 0x0010 // signal.h:129:1: + SA_ONSTACK = 0x0001 // signal.h:126:1: + SA_RESETHAND = 0x0004 // signal.h:128:1: + SA_RESTART = 0x0002 // signal.h:127:1: + SA_SIGINFO = 0x0040 // signal.h:134:1: + SCHAR_MAX = 0x7f // limits.h:38:1: + SCHAR_MIN = -128 // limits.h:39:1: + SCHED_FIFO = 1 // sched.h:47:1: + SCHED_OTHER = 2 // sched.h:48:1: + SCHED_RR = 3 // sched.h:49:1: + SEGV_ACCERR = 2 // siginfo.h:80:1: + SEGV_MAPERR = 1 // siginfo.h:79:1: + SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: + SHRT_MAX = 0x7fff // limits.h:53:1: + SHRT_MIN = -32768 // limits.h:54:1: + SIGABRT = 6 // signal.h:56:1: + SIGALRM = 14 // signal.h:67:1: + SIGBUS = 10 // signal.h:63:1: + SIGCHLD = 20 // signal.h:73:1: + SIGCONT = 19 // signal.h:72:1: + SIGEMT = 7 // signal.h:59:1: + SIGFPE = 8 // signal.h:61:1: + SIGHUP = 1 // signal.h:51:1: + SIGILL = 4 // signal.h:54:1: + SIGINFO = 29 // signal.h:85:1: + SIGINT = 2 // signal.h:52:1: + SIGIO = 23 // signal.h:77:1: + SIGIOT = 6 // signal.h:58:1: + SIGKILL = 9 // signal.h:62:1: + SIGPIPE = 13 // signal.h:66:1: + SIGPROF = 27 // signal.h:82:1: + SIGQUIT = 3 // signal.h:53:1: + SIGSEGV = 11 // signal.h:64:1: + SIGSTKSZ = 28672 // signal.h:185:1: + SIGSTOP = 17 // signal.h:70:1: + SIGSYS = 12 // signal.h:65:1: + SIGTERM = 15 // signal.h:68:1: + SIGTHR = 32 // signal.h:90:1: + SIGTRAP = 5 // signal.h:55:1: + SIGTSTP = 18 // signal.h:71:1: + SIGTTIN = 21 // signal.h:74:1: + SIGTTOU = 22 // signal.h:75:1: + SIGURG = 16 // signal.h:69:1: + SIGUSR1 = 30 // signal.h:87:1: + SIGUSR2 = 31 // signal.h:88:1: + SIGVTALRM = 26 // signal.h:81:1: + SIGWINCH = 28 // signal.h:84:1: + SIGXCPU = 24 // signal.h:79:1: + SIGXFSZ = 25 // signal.h:80:1: + SIG_BLOCK = 1 // signal.h:140:1: + SIG_SETMASK = 3 // signal.h:142:1: + SIG_UNBLOCK = 2 // signal.h:141:1: + SIZE_T_MAX = 4294967295 // limits.h:45:1: + SI_LWP = -1 // siginfo.h:47:1: + SI_MAXSZ = 128 // siginfo.h:127:1: + SI_NOINFO = 32767 // siginfo.h:45:1: + SI_QUEUE = -2 // siginfo.h:48:1: + SI_TIMER = -3 // siginfo.h:49:1: + SI_USER = 0 // siginfo.h:46:1: + SSIZE_MAX = 2147483647 // limits.h:41:1: + SS_DISABLE = 0x0004 // signal.h:182:1: + SS_ONSTACK = 0x0001 // signal.h:181:1: + SV_INTERRUPT = 2 // signal.h:158:1: + SV_ONSTACK = 1 // signal.h:157:1: + SV_RESETHAND = 4 // signal.h:159:1: + SYMLINK_MAX = 1024 // syslimits.h:48:1: + SYMLOOP_MAX = 32 // syslimits.h:49:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + TRAP_BRKPT = 1 // siginfo.h:93:1: + TRAP_TRACE = 2 // siginfo.h:94:1: + TTY_NAME_MAX = 260 // syslimits.h:71:1: + UCHAR_MAX = 0xff // limits.h:41:1: + UID_MAX = 4294967295 // limits.h:83:1: + UINT_MAX = 0xffffffff // limits.h:56:1: + ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: + ULONG_MAX = 0xffffffff // limits.h:68:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:47:1: + USHRT_MAX = 0xffff // limits.h:52:1: + WORD_BIT = 32 // limits.h:93:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LIMITS_H_ = 0 // limits.h:36:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NSIG = 33 // signal.h:45:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:74:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:75:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:76:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:77:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:78:1: + X_POSIX_ARG_MAX = 4096 // limits.h:41:1: + X_POSIX_CHILD_MAX = 25 // limits.h:42:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:61:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:82:1: + X_POSIX_LINK_MAX = 8 // limits.h:43:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:83:1: + X_POSIX_MAX_CANON = 255 // limits.h:44:1: + X_POSIX_MAX_INPUT = 255 // limits.h:45:1: + X_POSIX_NAME_MAX = 14 // limits.h:46:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:62:1: + X_POSIX_OPEN_MAX = 20 // limits.h:63:1: + X_POSIX_PATH_MAX = 256 // limits.h:47:1: + X_POSIX_PIPE_BUF = 512 // limits.h:48:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:49:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:50:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:51:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:52:1: + X_POSIX_STREAM_MAX = 8 // limits.h:53:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:54:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:55:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:56:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:57:1: + X_POSIX_THREAD_THREADS_MAX = 4 // limits.h:58:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:84:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:64:1: + X_PTHREAD_H_ = 0 // pthread.h:38:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SCHED_H_ = 0 // sched.h:40:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_LIMITS_H_ = 0 // limits.h:27:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGINFO_H = 0 // siginfo.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_XOPEN_IOV_MAX = 16 // limits.h:106:1: + X_XOPEN_NAME_MAX = 255 // limits.h:107:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +// Flags for once initialization. + +// Static once initialization values. + +// Static initialization values. + +// Mutex types. +const ( /* pthread.h:168:1: */ + PTHREAD_MUTEX_ERRORCHECK = 1 // Error checking mutex + PTHREAD_MUTEX_RECURSIVE = 2 // Recursive mutex + PTHREAD_MUTEX_NORMAL = 3 // No error checking + PTHREAD_MUTEX_STRICT_NP = 4 // Strict error checking + PTHREAD_MUTEX_TYPE_MAX = 5 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: pthread.h,v 1.4 2018/03/05 01:15:26 deraadt Exp $ + +// Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu +// Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by Chris Provenzano. +// 4. The name of Chris Provenzano may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD: pthread.h,v 1.13 1999/07/31 08:36:07 rse Exp $ + +// Header files. +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:111:1 */ + +// $OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $ +// $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 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.2 (Berkeley) 1/21/94 + +// $OpenBSD: signal.h,v 1.11 2016/05/10 18:39:45 deraadt Exp $ +// $NetBSD: signal.h,v 1.6 1996/01/08 13:51:43 mycroft 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +type Sig_atomic_t = int32 /* signal.h:40:13 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. +type Sigcontext = struct { + Fsc_gs int32 + Fsc_fs int32 + Fsc_es int32 + Fsc_ds int32 + Fsc_edi int32 + Fsc_esi int32 + Fsc_ebp int32 + Fsc_ebx int32 + Fsc_edx int32 + Fsc_ecx int32 + Fsc_eax int32 + Fsc_eip int32 + Fsc_cs int32 + Fsc_eflags int32 + Fsc_esp int32 + Fsc_ss int32 + Fsc_cookie int32 + Fsc_mask int32 + Fsc_trapno int32 + Fsc_err int32 + Fsc_fpstate uintptr +} /* signal.h:54:1 */ + +// Language spec says we must list exactly one parameter, even though we +// actually supply three. Ugh! + +// $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $ + +// Copyright (c) 1997 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +type Sigval = struct{ Fsival_int int32 } /* siginfo.h:33:1 */ + +// Negative signal codes are reserved for future use for +// user generated signals. + +// The machine dependent signal codes (SIGILL, SIGFPE, +// SIGSEGV, and SIGBUS) + +// SIGTRAP signal codes + +// SIGCHLD signal codes + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_code int32 + Fsi_errno int32 + F_data struct{ F_pad [29]int32 } +} /* siginfo.h:173:3 */ + +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F__sigaction_u struct{ F__sa_handler uintptr } + Fsa_mask Sigset_t + Fsa_flags int32 +} /* signal.h:112:1 */ + +// if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. + +// Flags for sigprocmask: + +type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function + +// 4.3 compatibility: +// Signal vector "template" used in sigvec call. +type Sigvec = struct { + Fsv_handler uintptr + Fsv_mask int32 + Fsv_flags int32 +} /* signal.h:152:1 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* signal.h:176:9 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Stack_t = Sigaltstack /* signal.h:180:3 */ + +type Ucontext_t = Sigcontext /* signal.h:190:27 */ + +// $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ +// $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd 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 5.9 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ +// Copyright (c) 2002 Marc Espie. +// +// 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 OPENBSD PROJECT 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 OPENBSD +// PROJECT 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// Common definitions for limits.h. + +// Legacy +// $OpenBSD: limits.h,v 1.14 2015/04/30 13:42:08 millert Exp $ +// $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// max value for unsigned long long +// max value for a signed long long +// min value for a signed long long + +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ +// $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: sched.h,v 1.1 2017/10/15 23:40:33 guenther Exp $ + +// sched.h: POSIX 1003.1b Process Scheduling header + +// - +// Copyright (c) 1996, 1997 +// HD Associates, 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by HD Associates, Inc +// and Jukka Antero Ukkonen. +// 4. Neither the name of the author nor the names of any co-contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES 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 HD ASSOCIATES 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. +// + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// Scheduling policies + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:51:1 */ + +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* pthread.h:101:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* pthread.h:112:26 */ +type Pthread_attr_t = uintptr /* pthread.h:113:30 */ +type Pthread_mutex_t = uintptr /* pthread.h:114:39 */ +type Pthread_mutexattr_t = uintptr /* pthread.h:115:35 */ +type Pthread_cond_t = uintptr /* pthread.h:116:30 */ +type Pthread_condattr_t = uintptr /* pthread.h:117:34 */ +type Pthread_key_t = int32 /* pthread.h:118:16 */ +type Pthread_once_t = Pthread_once /* pthread.h:119:30 */ +type Pthread_rwlock_t = uintptr /* pthread.h:120:32 */ +type Pthread_rwlockattr_t = uintptr /* pthread.h:121:35 */ +type Pthread_barrier_t = uintptr /* pthread.h:122:33 */ +type Pthread_barrierattr_t = uintptr /* pthread.h:123:36 */ +type Pthread_spinlock_t = uintptr /* pthread.h:124:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* pthread.h:132:14 */ +type Pthread_startroutine_t = uintptr /* pthread.h:133:14 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go b/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go index ae577d4c..b03d39f1 100644 --- a/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_openbsd_amd64.go @@ -224,8 +224,8 @@ const ( WORD_BIT = 32 // limits.h:93:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -240,11 +240,12 @@ const ( X_MACHINE_LIMITS_H_ = 0 // limits.h:35:1: X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: X_NSIG = 33 // signal.h:45:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: @@ -286,8 +287,8 @@ const ( X_SCHED_H_ = 0 // sched.h:40:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -300,11 +301,11 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -312,7 +313,7 @@ const ( X_XOPEN_IOV_MAX = 16 // limits.h:106:1: X_XOPEN_NAME_MAX = 255 // limits.h:107:1: X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) // Flags for once initialization. @@ -384,7 +385,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // $FreeBSD: pthread.h,v 1.13 1999/07/31 08:36:07 rse Exp $ // Header files. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -681,7 +682,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -841,18 +842,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -934,31 +934,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -1022,7 +1021,7 @@ type Off_t = X__off_t /* types.h:194:18 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -1194,7 +1193,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -1514,7 +1513,7 @@ type Sigval = struct { // SIGCHLD signal codes -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -1801,7 +1800,7 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // max value for a signed long long // min value for a signed long long -// $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ // Copyright (c) 1988, 1993 @@ -1905,7 +1904,7 @@ type Ucontext_t = Sigcontext /* signal.h:190:27 */ // SUCH DAMAGE. // -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - diff --git a/vendor/modernc.org/libc/pthread/pthread_openbsd_arm64.go b/vendor/modernc.org/libc/pthread/pthread_openbsd_arm64.go new file mode 100644 index 00000000..36a3c595 --- /dev/null +++ b/vendor/modernc.org/libc/pthread/pthread_openbsd_arm64.go @@ -0,0 +1,1998 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_openbsd_arm64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ARG_MAX = 524288 // syslimits.h:38:1: + BC_BASE_MAX = 2147483647 // syslimits.h:51:1: + BC_DIM_MAX = 65535 // syslimits.h:52:1: + BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: + BC_STRING_MAX = 2147483647 // syslimits.h:54:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BUS_ADRALN = 1 // siginfo.h:83:1: + BUS_ADRERR = 2 // siginfo.h:84:1: + BUS_OBJERR = 3 // siginfo.h:85:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CHAR_BIT = 8 // limits.h:36:1: + CHAR_MAX = 0xff // limits.h:44:1: + CHAR_MIN = 0 // limits.h:43:1: + CHILD_MAX = 80 // syslimits.h:39:1: + CLD_CONTINUED = 6 // siginfo.h:105:1: + CLD_DUMPED = 3 // siginfo.h:102:1: + CLD_EXITED = 1 // siginfo.h:100:1: + CLD_KILLED = 2 // siginfo.h:101:1: + CLD_STOPPED = 5 // siginfo.h:104:1: + CLD_TRAPPED = 4 // siginfo.h:103:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + EMT_TAGOVF = 1 // siginfo.h:66:1: + EXPR_NEST_MAX = 32 // syslimits.h:56:1: + FD_SETSIZE = 1024 // select.h:62:1: + FPE_FLTDIV = 3 // siginfo.h:71:1: + FPE_FLTINV = 7 // siginfo.h:75:1: + FPE_FLTOVF = 4 // siginfo.h:72:1: + FPE_FLTRES = 6 // siginfo.h:74:1: + FPE_FLTSUB = 8 // siginfo.h:76:1: + FPE_FLTUND = 5 // siginfo.h:73:1: + FPE_INTDIV = 1 // siginfo.h:69:1: + FPE_INTOVF = 2 // siginfo.h:70:1: + GID_MAX = 4294967295 // limits.h:84:1: + HOST_NAME_MAX = 255 // syslimits.h:76:1: + ILL_BADSTK = 8 // siginfo.h:63:1: + ILL_COPROC = 7 // siginfo.h:62:1: + ILL_ILLADR = 3 // siginfo.h:58:1: + ILL_ILLOPC = 1 // siginfo.h:56:1: + ILL_ILLOPN = 2 // siginfo.h:57:1: + ILL_ILLTRP = 4 // siginfo.h:59:1: + ILL_PRVOPC = 5 // siginfo.h:60:1: + ILL_PRVREG = 6 // siginfo.h:61:1: + INT_MAX = 0x7fffffff // limits.h:57:1: + INT_MIN = -2147483648 // limits.h:58:1: + IOV_MAX = 1024 // syslimits.h:64:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LINE_MAX = 2048 // syslimits.h:57:1: + LINK_MAX = 32767 // syslimits.h:40:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + LLONG_MAX = 0x7fffffffffffffff // limits.h:76:1: + LLONG_MIN = -9223372036854775808 // limits.h:78:1: + LOGIN_NAME_MAX = 32 // syslimits.h:72:1: + LONG_BIT = 64 // limits.h:89:1: + LONG_MAX = 0x7fffffffffffffff // limits.h:63:1: + LONG_MIN = -9223372036854775808 // limits.h:65:1: + MAX_CANON = 255 // syslimits.h:41:1: + MAX_INPUT = 255 // syslimits.h:42:1: + MB_LEN_MAX = 4 // limits.h:50:1: + MINSIGSTKSZ = 12288 // signal.h:183:1: + NAME_MAX = 255 // syslimits.h:43:1: + NBBY = 8 // select.h:111:1: + NGROUPS_MAX = 16 // syslimits.h:44:1: + NL_ARGMAX = 9 // limits.h:89:1: + NL_LANGMAX = 14 // limits.h:90:1: + NL_MSGMAX = 32767 // limits.h:91:1: + NL_SETMAX = 255 // limits.h:92:1: + NL_TEXTMAX = 255 // limits.h:93:1: + NSIG = 33 // signal.h:48:1: + NSIGBUS = 3 // siginfo.h:86:1: + NSIGCLD = 6 // siginfo.h:106:1: + NSIGEMT = 1 // siginfo.h:67:1: + NSIGFPE = 8 // siginfo.h:77:1: + NSIGILL = 8 // siginfo.h:64:1: + NSIGSEGV = 2 // siginfo.h:81:1: + NSIGTRAP = 2 // siginfo.h:95:1: + NZERO = 20 // syslimits.h:65:1: + OPEN_MAX = 64 // syslimits.h:45:1: + PATH_MAX = 1024 // syslimits.h:46:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + PIPE_BUF = 512 // syslimits.h:47:1: + PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:88:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 2 // pthread.h:82:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:81:1: + PTHREAD_CANCEL_DISABLE = 1 // pthread.h:80:1: + PTHREAD_CANCEL_ENABLE = 0 // pthread.h:79:1: + PTHREAD_CREATE_DETACHED = 1 // pthread.h:65:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:66:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 4 // pthread.h:52:1: + PTHREAD_DETACHED = 0x1 // pthread.h:60:1: + PTHREAD_DONE_INIT = 1 // pthread.h:147:1: + PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:68:1: + PTHREAD_INHERIT_SCHED = 0x4 // pthread.h:62:1: + PTHREAD_KEYS_MAX = 256 // pthread.h:53:1: + PTHREAD_NEEDS_INIT = 0 // pthread.h:146:1: + PTHREAD_NOFLOAT = 0x8 // pthread.h:63:1: + PTHREAD_PRIO_INHERIT = 1 // pthread.h:162:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:161:1: + PTHREAD_PRIO_PROTECT = 2 // pthread.h:163:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:73:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:74:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:67:1: + PTHREAD_SCOPE_SYSTEM = 0x2 // pthread.h:61:1: + PTHREAD_STACK_MIN = 4096 // pthread.h:54:1: + PTHREAD_THREADS_MAX = 18446744073709551615 // pthread.h:55:1: + QUAD_MAX = 0x7fffffffffffffff // limits.h:51:1: + QUAD_MIN = -9223372036854775808 // limits.h:52:1: + RE_DUP_MAX = 255 // syslimits.h:59:1: + SA_NOCLDSTOP = 0x0008 // signal.h:132:1: + SA_NOCLDWAIT = 0x0020 // signal.h:130:1: + SA_NODEFER = 0x0010 // signal.h:129:1: + SA_ONSTACK = 0x0001 // signal.h:126:1: + SA_RESETHAND = 0x0004 // signal.h:128:1: + SA_RESTART = 0x0002 // signal.h:127:1: + SA_SIGINFO = 0x0040 // signal.h:134:1: + SCHAR_MAX = 0x7f // limits.h:38:1: + SCHAR_MIN = -128 // limits.h:39:1: + SCHED_FIFO = 1 // sched.h:47:1: + SCHED_OTHER = 2 // sched.h:48:1: + SCHED_RR = 3 // sched.h:49:1: + SEGV_ACCERR = 2 // siginfo.h:80:1: + SEGV_MAPERR = 1 // siginfo.h:79:1: + SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: + SHRT_MAX = 0x7fff // limits.h:53:1: + SHRT_MIN = -32768 // limits.h:54:1: + SIGABRT = 6 // signal.h:56:1: + SIGALRM = 14 // signal.h:67:1: + SIGBUS = 10 // signal.h:63:1: + SIGCHLD = 20 // signal.h:73:1: + SIGCONT = 19 // signal.h:72:1: + SIGEMT = 7 // signal.h:59:1: + SIGFPE = 8 // signal.h:61:1: + SIGHUP = 1 // signal.h:51:1: + SIGILL = 4 // signal.h:54:1: + SIGINFO = 29 // signal.h:85:1: + SIGINT = 2 // signal.h:52:1: + SIGIO = 23 // signal.h:77:1: + SIGIOT = 6 // signal.h:58:1: + SIGKILL = 9 // signal.h:62:1: + SIGPIPE = 13 // signal.h:66:1: + SIGPROF = 27 // signal.h:82:1: + SIGQUIT = 3 // signal.h:53:1: + SIGSEGV = 11 // signal.h:64:1: + SIGSTKSZ = 28672 // signal.h:185:1: + SIGSTOP = 17 // signal.h:70:1: + SIGSYS = 12 // signal.h:65:1: + SIGTERM = 15 // signal.h:68:1: + SIGTHR = 32 // signal.h:90:1: + SIGTRAP = 5 // signal.h:55:1: + SIGTSTP = 18 // signal.h:71:1: + SIGTTIN = 21 // signal.h:74:1: + SIGTTOU = 22 // signal.h:75:1: + SIGURG = 16 // signal.h:69:1: + SIGUSR1 = 30 // signal.h:87:1: + SIGUSR2 = 31 // signal.h:88:1: + SIGVTALRM = 26 // signal.h:81:1: + SIGWINCH = 28 // signal.h:84:1: + SIGXCPU = 24 // signal.h:79:1: + SIGXFSZ = 25 // signal.h:80:1: + SIG_BLOCK = 1 // signal.h:140:1: + SIG_SETMASK = 3 // signal.h:142:1: + SIG_UNBLOCK = 2 // signal.h:141:1: + SIZE_MAX = 18446744073709551615 // limits.h:42:1: + SIZE_T_MAX = 18446744073709551615 // limits.h:48:1: + SI_LWP = -1 // siginfo.h:47:1: + SI_MAXSZ = 128 // siginfo.h:127:1: + SI_NOINFO = 32767 // siginfo.h:45:1: + SI_QUEUE = -2 // siginfo.h:48:1: + SI_TIMER = -3 // siginfo.h:49:1: + SI_USER = 0 // siginfo.h:46:1: + SSIZE_MAX = 9223372036854775807 // limits.h:44:1: + SS_DISABLE = 0x0004 // signal.h:182:1: + SS_ONSTACK = 0x0001 // signal.h:181:1: + SV_INTERRUPT = 2 // signal.h:158:1: + SV_ONSTACK = 1 // signal.h:157:1: + SV_RESETHAND = 4 // signal.h:159:1: + SYMLINK_MAX = 1024 // syslimits.h:48:1: + SYMLOOP_MAX = 32 // syslimits.h:49:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + TRAP_BRKPT = 1 // siginfo.h:93:1: + TRAP_TRACE = 2 // siginfo.h:94:1: + TTY_NAME_MAX = 260 // syslimits.h:71:1: + UCHAR_MAX = 0xff // limits.h:41:1: + UID_MAX = 4294967295 // limits.h:83:1: + UINT_MAX = 0xffffffff // limits.h:56:1: + ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: + ULONG_MAX = 0xffffffffffffffff // limits.h:61:1: + UQUAD_MAX = 0xffffffffffffffff // limits.h:50:1: + USHRT_MAX = 0xffff // limits.h:52:1: + WORD_BIT = 32 // limits.h:93:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LIMITS_H_ = 0 // limits.h:36:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:37:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAXCOMLEN = 24 // syslimits.h:79:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_NSIG = 33 // signal.h:45:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: + X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: + X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: + X_POSIX2_BC_STRING_MAX = 1000 // limits.h:74:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:75:1: + X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:76:1: + X_POSIX2_LINE_MAX = 2048 // limits.h:77:1: + X_POSIX2_RE_DUP_MAX = 255 // limits.h:78:1: + X_POSIX_ARG_MAX = 4096 // limits.h:41:1: + X_POSIX_CHILD_MAX = 25 // limits.h:42:1: + X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:61:1: + X_POSIX_HOST_NAME_MAX = 255 // limits.h:82:1: + X_POSIX_LINK_MAX = 8 // limits.h:43:1: + X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:83:1: + X_POSIX_MAX_CANON = 255 // limits.h:44:1: + X_POSIX_MAX_INPUT = 255 // limits.h:45:1: + X_POSIX_NAME_MAX = 14 // limits.h:46:1: + X_POSIX_NGROUPS_MAX = 8 // limits.h:62:1: + X_POSIX_OPEN_MAX = 20 // limits.h:63:1: + X_POSIX_PATH_MAX = 256 // limits.h:47:1: + X_POSIX_PIPE_BUF = 512 // limits.h:48:1: + X_POSIX_RE_DUP_MAX = 255 // limits.h:49:1: + X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:50:1: + X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:51:1: + X_POSIX_SSIZE_MAX = 32767 // limits.h:52:1: + X_POSIX_STREAM_MAX = 8 // limits.h:53:1: + X_POSIX_SYMLINK_MAX = 255 // limits.h:54:1: + X_POSIX_SYMLOOP_MAX = 8 // limits.h:55:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:56:1: + X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:57:1: + X_POSIX_THREAD_THREADS_MAX = 4 // limits.h:58:1: + X_POSIX_TTY_NAME_MAX = 9 // limits.h:84:1: + X_POSIX_TZNAME_MAX = 6 // limits.h:64:1: + X_PTHREAD_H_ = 0 // pthread.h:38:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SCHED_H_ = 0 // sched.h:40:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_LIMITS_H_ = 0 // limits.h:27:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGINFO_H = 0 // siginfo.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_XOPEN_IOV_MAX = 16 // limits.h:106:1: + X_XOPEN_NAME_MAX = 255 // limits.h:107:1: + X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: + Unix = 1 // <predefined>:360:1: +) + +// Flags for once initialization. + +// Static once initialization values. + +// Static initialization values. + +// Mutex types. +const ( /* pthread.h:168:1: */ + PTHREAD_MUTEX_ERRORCHECK = 1 // Error checking mutex + PTHREAD_MUTEX_RECURSIVE = 2 // Recursive mutex + PTHREAD_MUTEX_NORMAL = 3 // No error checking + PTHREAD_MUTEX_STRICT_NP = 4 // Strict error checking + PTHREAD_MUTEX_TYPE_MAX = 5 +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: pthread.h,v 1.4 2018/03/05 01:15:26 deraadt Exp $ + +// Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu +// Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by Chris Provenzano. +// 4. The name of Chris Provenzano may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD: pthread.h,v 1.13 1999/07/31 08:36:07 rse Exp $ + +// Header files. +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:111:1 */ + +// $OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $ +// $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 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.2 (Berkeley) 1/21/94 + +// $OpenBSD: signal.h,v 1.2 2017/03/12 17:57:12 kettenis Exp $ +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Ralph Campbell. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.1 (Berkeley) 6/10/93 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +type Sig_atomic_t = int32 /* signal.h:41:13 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. +type Sigcontext = struct { + F__sc_unused int32 + Fsc_mask int32 + Fsc_sp uint64 + Fsc_lr uint64 + Fsc_elr uint64 + Fsc_spsr uint64 + Fsc_x [30]uint64 + Fsc_cookie int64 +} /* signal.h:51:1 */ + +// Language spec says we must list exactly one parameter, even though we +// actually supply three. Ugh! + +// $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $ + +// Copyright (c) 1997 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +type Sigval = struct { + F__ccgo_pad1 [0]uint64 + Fsival_int int32 + F__ccgo_pad2 [4]byte +} /* siginfo.h:33:1 */ + +// Negative signal codes are reserved for future use for +// user generated signals. + +// The machine dependent signal codes (SIGILL, SIGFPE, +// SIGSEGV, and SIGBUS) + +// SIGTRAP signal codes + +// SIGCHLD signal codes + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_code int32 + Fsi_errno int32 + F__ccgo_pad1 [4]byte + F_data struct { + F__ccgo_pad1 [0]uint64 + F_pad [29]int32 + F__ccgo_pad2 [4]byte + } +} /* siginfo.h:173:3 */ + +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F__sigaction_u struct{ F__sa_handler uintptr } + Fsa_mask Sigset_t + Fsa_flags int32 +} /* signal.h:112:1 */ + +// if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. + +// Flags for sigprocmask: + +type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function + +// 4.3 compatibility: +// Signal vector "template" used in sigvec call. +type Sigvec = struct { + Fsv_handler uintptr + Fsv_mask int32 + Fsv_flags int32 +} /* signal.h:152:1 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 + F__ccgo_pad1 [4]byte +} /* signal.h:176:9 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Stack_t = Sigaltstack /* signal.h:180:3 */ + +type Ucontext_t = Sigcontext /* signal.h:190:27 */ + +// $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ +// $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd 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 5.9 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ +// Copyright (c) 2002 Marc Espie. +// +// 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 OPENBSD PROJECT 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 OPENBSD +// PROJECT 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. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// Common definitions for limits.h. + +// Legacy +// $OpenBSD: limits.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ +// $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 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. +// +// from: @(#)limits.h 7.2 (Berkeley) 6/28/90 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// max value for unsigned long +// max value for a signed long +// min value for a signed long + +// max value for unsigned long long +// max value for a signed long long +// min value for a signed long long + +// $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ +// $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: sched.h,v 1.1 2017/10/15 23:40:33 guenther Exp $ + +// sched.h: POSIX 1003.1b Process Scheduling header + +// - +// Copyright (c) 1996, 1997 +// HD Associates, 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. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by HD Associates, Inc +// and Jukka Antero Ukkonen. +// 4. Neither the name of the author nor the names of any co-contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES 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 HD ASSOCIATES 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. +// + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// Scheduling policies + +type Sched_param = struct{ Fsched_priority int32 } /* sched.h:51:1 */ + +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* pthread.h:101:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* pthread.h:112:26 */ +type Pthread_attr_t = uintptr /* pthread.h:113:30 */ +type Pthread_mutex_t = uintptr /* pthread.h:114:39 */ +type Pthread_mutexattr_t = uintptr /* pthread.h:115:35 */ +type Pthread_cond_t = uintptr /* pthread.h:116:30 */ +type Pthread_condattr_t = uintptr /* pthread.h:117:34 */ +type Pthread_key_t = int32 /* pthread.h:118:16 */ +type Pthread_once_t = Pthread_once /* pthread.h:119:30 */ +type Pthread_rwlock_t = uintptr /* pthread.h:120:32 */ +type Pthread_rwlockattr_t = uintptr /* pthread.h:121:35 */ +type Pthread_barrier_t = uintptr /* pthread.h:122:33 */ +type Pthread_barrierattr_t = uintptr /* pthread.h:123:36 */ +type Pthread_spinlock_t = uintptr /* pthread.h:124:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* pthread.h:132:14 */ +type Pthread_startroutine_t = uintptr /* pthread.h:133:14 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/pthread_windows_386.go b/vendor/modernc.org/libc/pthread/pthread_windows_386.go index a162ee96..9ab6d3a3 100644 --- a/vendor/modernc.org/libc/pthread/pthread_windows_386.go +++ b/vendor/modernc.org/libc/pthread/pthread_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo pthread\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pthread\pthread_windows_386.go -pkgname pthread', DO NOT EDIT. +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_windows_386.go -pkgname pthread', DO NOT EDIT. package pthread @@ -15,325 +15,328 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CHAR_BIT = 8 - CHAR_MAX = 127 - CHAR_MIN = -128 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - E2BIG = 7 - EACCES = 13 - EADDRINUSE = 100 - EADDRNOTAVAIL = 101 - EAFNOSUPPORT = 102 - EAGAIN = 11 - EALREADY = 103 - EBADF = 9 - EBADMSG = 104 - EBUSY = 16 - ECANCELED = 105 - ECHILD = 10 - ECONNABORTED = 106 - ECONNREFUSED = 107 - ECONNRESET = 108 - EDEADLK = 36 - EDEADLOCK = 36 - EDESTADDRREQ = 109 - EDOM = 33 - EEXIST = 17 - EFAULT = 14 - EFBIG = 27 - EHOSTUNREACH = 110 - EIDRM = 111 - EILSEQ = 42 - EINPROGRESS = 112 - EINTR = 4 - EINVAL = 22 - EIO = 5 - EISCONN = 113 - EISDIR = 21 - ELOOP = 114 - EMFILE = 24 - EMLINK = 31 - EMSGSIZE = 115 - ENAMETOOLONG = 38 - ENETDOWN = 116 - ENETRESET = 117 - ENETUNREACH = 118 - ENFILE = 23 - ENOBUFS = 119 - ENODATA = 120 - ENODEV = 19 - ENOENT = 2 - ENOEXEC = 8 - ENOFILE = 2 - ENOLCK = 39 - ENOLINK = 121 - ENOMEM = 12 - ENOMSG = 122 - ENOPROTOOPT = 123 - ENOSPC = 28 - ENOSR = 124 - ENOSTR = 125 - ENOSYS = 40 - ENOTCONN = 126 - ENOTDIR = 20 - ENOTEMPTY = 41 - ENOTRECOVERABLE = 127 - ENOTSOCK = 128 - ENOTSUP = 129 - ENOTTY = 25 - ENXIO = 6 - EOPNOTSUPP = 130 - EOVERFLOW = 132 - EOWNERDEAD = 133 - EPERM = 1 - EPIPE = 32 - EPROTO = 134 - EPROTONOSUPPORT = 135 - EPROTOTYPE = 136 - ERANGE = 34 - EROFS = 30 - ESPIPE = 29 - ESRCH = 3 - ETIME = 137 - ETIMEDOUT = 138 - ETXTBSY = 139 - EWOULDBLOCK = 140 - EXDEV = 18 - INT_MAX = 2147483647 - INT_MIN = -2147483648 - LLONG_MAX = 9223372036854775807 - LLONG_MIN = -9223372036854775808 - LONG_LONG_MAX = 9223372036854775807 - LONG_LONG_MIN = -9223372036854775808 - LONG_MAX = 2147483647 - LONG_MIN = -2147483648 - MAX_READ_LOCKS = 2147483646 - MB_LEN_MAX = 5 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - NSIG = 23 - OLD_P_OVERLAY = 2 - PATH_MAX = 260 - PTHREAD_BARRIER_SERIAL_THREAD = 1 - PTHREAD_CANCEL_ASYNCHRONOUS = 0x02 - PTHREAD_CANCEL_DEFERRED = 0 - PTHREAD_CANCEL_DISABLE = 0 - PTHREAD_CANCEL_ENABLE = 0x01 - PTHREAD_CREATE_DETACHED = 0x04 - PTHREAD_CREATE_JOINABLE = 0 - PTHREAD_DEFAULT_ATTR = 1 - PTHREAD_DESTRUCTOR_ITERATIONS = 256 - PTHREAD_EXPLICIT_SCHED = 0 - PTHREAD_INHERIT_SCHED = 0x08 - PTHREAD_KEYS_MAX = 1048576 - PTHREAD_MUTEX_ADAPTIVE_NP = 0 - PTHREAD_MUTEX_DEFAULT = 0 - PTHREAD_MUTEX_ERRORCHECK = 1 - PTHREAD_MUTEX_ERRORCHECK_NP = 1 - PTHREAD_MUTEX_FAST_NP = 0 - PTHREAD_MUTEX_NORMAL = 0 - PTHREAD_MUTEX_PRIVATE = 0 - PTHREAD_MUTEX_RECURSIVE = 2 - PTHREAD_MUTEX_RECURSIVE_NP = 2 - PTHREAD_MUTEX_SHARED = 1 - PTHREAD_MUTEX_TIMED_NP = 0 - PTHREAD_ONCE_INIT = 0 - PTHREAD_PRIO_INHERIT = 8 - PTHREAD_PRIO_MULT = 32 - PTHREAD_PRIO_NONE = 0 - PTHREAD_PRIO_PROTECT = 16 - PTHREAD_PROCESS_PRIVATE = 0 - PTHREAD_PROCESS_SHARED = 1 - PTHREAD_SCOPE_PROCESS = 0 - PTHREAD_SCOPE_SYSTEM = 0x10 - PTHREAD_THREADS_MAX = 2019 - P_DETACH = 4 - P_NOWAIT = 1 - P_NOWAITO = 3 - P_OVERLAY = 2 - P_WAIT = 0 - RWLS_PER_THREAD = 8 - SCHAR_MAX = 127 - SCHAR_MIN = -128 - SCHED_FIFO = 1 - SCHED_MAX = 2 - SCHED_MIN = 0 - SCHED_OTHER = 0 - SCHED_RR = 2 - SEM_NSEMS_MAX = 1024 - SHRT_MAX = 32767 - SHRT_MIN = -32768 - SIGABRT = 22 - SIGABRT2 = 22 - SIGABRT_COMPAT = 6 - SIGBREAK = 21 - SIGFPE = 8 - SIGILL = 4 - SIGINT = 2 - SIGSEGV = 11 - SIGTERM = 15 - SIG_BLOCK = 0 - SIG_SETMASK = 2 - SIG_UNBLOCK = 1 - SIZE_MAX = 4294967295 - SSIZE_MAX = 2147483647 - STRUNCATE = 80 - UCHAR_MAX = 255 - UINT_MAX = 4294967295 - ULLONG_MAX = 18446744073709551615 - ULONG_LONG_MAX = 18446744073709551615 - ULONG_MAX = 4294967295 - UNALIGNED = 0 - USE___UUIDOF = 0 - USHRT_MAX = 65535 - WAIT_CHILD = 0 - WAIT_GRANDCHILD = 1 - WIN32 = 1 - WINNT = 1 - WINPTHREAD_API = 0 - WIN_PTHREADS_H = 0 - WIN_PTHREADS_PTHREAD_COMPAT_H = 0 - WIN_PTHREADS_SIGNAL_H = 0 - WIN_PTHREADS_UNISTD_H = 0 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ANSI_STDDEF_H = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_ERRNO_DEFINED = 0 - X_CRT_GETPID_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_SYSTEM_DEFINED = 0 - X_CRT_TERMINATE_DEFINED = 0 - X_CRT_WSYSTEM_DEFINED = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_GCC_LIMITS_H_ = 0 - X_GCC_MAX_ALIGN_T = 0 - X_GTHREAD_USE_MUTEX_INIT_FUNC = 1 - X_I16_MAX = 32767 - X_I16_MIN = -32768 - X_I32_MAX = 2147483647 - X_I32_MIN = -2147483648 - X_I64_MAX = 9223372036854775807 - X_I64_MIN = -9223372036854775808 - X_I8_MAX = 127 - X_I8_MIN = -128 - X_INC_CORECRT_STARTUP = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_ERRNO = 0 - X_INC_LIMITS = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_PROCESS = 0 - X_INC_SIGNAL = 0 - X_INC_STDDEF = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LIMITS_H___ = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_OLD_P_OVERLAY = 2 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_POSIX_BARRIERS = 200112 - X_POSIX_CLOCK_SELECTION = 200112 - X_POSIX_READER_WRITER_LOCKS = 200112 - X_POSIX_SEMAPHORES = 200112 - X_POSIX_SEM_NSEMS_MAX = 256 - X_POSIX_SPIN_LOCKS = 200112 - X_POSIX_THREADS = 200112 - X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 256 - X_POSIX_THREAD_KEYS_MAX = 1048576 - X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 - X_POSIX_TIMEOUTS = 200112 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_P_DETACH = 4 - X_P_NOWAIT = 1 - X_P_NOWAITO = 3 - X_P_OVERLAY = 2 - X_P_WAIT = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIG_ATOMIC_T_DEFINED = 0 - X_SIZE_T_DEFINED = 0 - X_SPAWNV_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_STDDEF_H = 0 - X_STDDEF_H_ = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMEB_DEFINED = 0 - X_TIMEB_H_ = 0 - X_TIMEB_H_S = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UI16_MAX = 0xffff - X_UI32_MAX = 0xffffffff - X_UI64_MAX = 0xffffffffffffffff - X_UI8_MAX = 0xff - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WAIT_CHILD = 0 - X_WAIT_GRANDCHILD = 1 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WEXEC_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WSPAWN_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + CHAR_BIT = 8 // limits.h:64:1: + CHAR_MAX = 127 // limits.h:99:1: + CHAR_MIN = -128 // limits.h:97:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + E2BIG = 7 // errno.h:31:1: + EACCES = 13 // errno.h:37:1: + EADDRINUSE = 100 // errno.h:86:1: + EADDRNOTAVAIL = 101 // errno.h:90:1: + EAFNOSUPPORT = 102 // errno.h:82:1: + EAGAIN = 11 // errno.h:35:1: + EALREADY = 103 // errno.h:106:1: + EBADF = 9 // errno.h:33:1: + EBADMSG = 104 // errno.h:182:1: + EBUSY = 16 // errno.h:39:1: + ECANCELED = 105 // errno.h:154:1: + ECHILD = 10 // errno.h:34:1: + ECONNABORTED = 106 // errno.h:102:1: + ECONNREFUSED = 107 // errno.h:110:1: + ECONNRESET = 108 // errno.h:114:1: + EDEADLK = 36 // errno.h:55:1: + EDEADLOCK = 36 // errno.h:71:1: + EDESTADDRREQ = 109 // errno.h:118:1: + EDOM = 33 // errno.h:54:1: + EEXIST = 17 // errno.h:40:1: + EFAULT = 14 // errno.h:38:1: + EFBIG = 27 // errno.h:48:1: + EHOSTUNREACH = 110 // errno.h:122:1: + EIDRM = 111 // errno.h:186:1: + EILSEQ = 42 // errno.h:66:1: + EINPROGRESS = 112 // errno.h:158:1: + EINTR = 4 // errno.h:28:1: + EINVAL = 22 // errno.h:64:1: + EIO = 5 // errno.h:29:1: + EISCONN = 113 // errno.h:94:1: + EISDIR = 21 // errno.h:44:1: + ELOOP = 114 // errno.h:227:1: + EMFILE = 24 // errno.h:46:1: + EMLINK = 31 // errno.h:52:1: + EMSGSIZE = 115 // errno.h:126:1: + ENAMETOOLONG = 38 // errno.h:56:1: + ENETDOWN = 116 // errno.h:130:1: + ENETRESET = 117 // errno.h:134:1: + ENETUNREACH = 118 // errno.h:138:1: + ENFILE = 23 // errno.h:45:1: + ENOBUFS = 119 // errno.h:98:1: + ENODATA = 120 // errno.h:190:1: + ENODEV = 19 // errno.h:42:1: + ENOENT = 2 // errno.h:25:1: + ENOEXEC = 8 // errno.h:32:1: + ENOFILE = 2 // errno.h:26:1: + ENOLCK = 39 // errno.h:57:1: + ENOLINK = 121 // errno.h:194:1: + ENOMEM = 12 // errno.h:36:1: + ENOMSG = 122 // errno.h:198:1: + ENOPROTOOPT = 123 // errno.h:142:1: + ENOSPC = 28 // errno.h:49:1: + ENOSR = 124 // errno.h:202:1: + ENOSTR = 125 // errno.h:206:1: + ENOSYS = 40 // errno.h:58:1: + ENOTCONN = 126 // errno.h:150:1: + ENOTDIR = 20 // errno.h:43:1: + ENOTEMPTY = 41 // errno.h:59:1: + ENOTRECOVERABLE = 127 // errno.h:210:1: + ENOTSOCK = 128 // errno.h:146:1: + ENOTSUP = 129 // errno.h:76:1: + ENOTTY = 25 // errno.h:47:1: + ENXIO = 6 // errno.h:30:1: + EOPNOTSUPP = 130 // errno.h:162:1: + EOVERFLOW = 132 // errno.h:235:1: + EOWNERDEAD = 133 // errno.h:170:1: + EPERM = 1 // errno.h:24:1: + EPIPE = 32 // errno.h:53:1: + EPROTO = 134 // errno.h:174:1: + EPROTONOSUPPORT = 135 // errno.h:178:1: + EPROTOTYPE = 136 // errno.h:231:1: + ERANGE = 34 // errno.h:65:1: + EROFS = 30 // errno.h:51:1: + ESPIPE = 29 // errno.h:50:1: + ESRCH = 3 // errno.h:27:1: + ETIME = 137 // errno.h:214:1: + ETIMEDOUT = 138 // errno.h:223:1: + ETXTBSY = 139 // errno.h:218:1: + EWOULDBLOCK = 140 // errno.h:166:1: + EXDEV = 18 // errno.h:41:1: + GENERIC_ERRORCHECK_INITIALIZER = -2 // pthread.h:279:1: + GENERIC_INITIALIZER = -1 // pthread.h:278:1: + GENERIC_NORMAL_INITIALIZER = -1 // pthread.h:281:1: + GENERIC_RECURSIVE_INITIALIZER = -3 // pthread.h:280:1: + INT_MAX = 2147483647 // limits.h:120:1: + INT_MIN = -2147483648 // limits.h:118:1: + LLONG_MAX = 9223372036854775807 // limits.h:142:1: + LLONG_MIN = -9223372036854775808 // limits.h:140:1: + LONG_LONG_MAX = 9223372036854775807 // limits.h:154:1: + LONG_LONG_MIN = -9223372036854775808 // limits.h:152:1: + LONG_MAX = 2147483647 // limits.h:131:1: + LONG_MIN = -2147483648 // limits.h:129:1: + MAX_READ_LOCKS = 2147483646 // pthread.h:168:1: + MB_LEN_MAX = 5 // limits.h:35:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + NSIG = 23 // signal.h:21:1: + OLD_P_OVERLAY = 2 // process.h:149:1: + PATH_MAX = 260 // limits.h:20:1: + PTHREAD_BARRIER_SERIAL_THREAD = 1 // pthread.h:165:1: + PTHREAD_CANCEL_ASYNCHRONOUS = 0x02 // pthread.h:117:1: + PTHREAD_CANCEL_DEFERRED = 0 // pthread.h:116:1: + PTHREAD_CANCEL_DISABLE = 0 // pthread.h:113:1: + PTHREAD_CANCEL_ENABLE = 0x01 // pthread.h:114:1: + PTHREAD_CREATE_DETACHED = 0x04 // pthread.h:120:1: + PTHREAD_CREATE_JOINABLE = 0 // pthread.h:119:1: + PTHREAD_DEFAULT_ATTR = 1 // pthread.h:128:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 256 // pthread.h:136:1: + PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:122:1: + PTHREAD_INHERIT_SCHED = 0x08 // pthread.h:123:1: + PTHREAD_KEYS_MAX = 1048576 // pthread.h:137:1: + PTHREAD_MUTEX_ADAPTIVE_NP = 0 // pthread.h:156:1: + PTHREAD_MUTEX_DEFAULT = 0 // pthread.h:142:1: + PTHREAD_MUTEX_ERRORCHECK = 1 // pthread.h:275:1: + PTHREAD_MUTEX_ERRORCHECK_NP = 1 // pthread.h:157:1: + PTHREAD_MUTEX_FAST_NP = 0 // pthread.h:154:1: + PTHREAD_MUTEX_NORMAL = 0 // pthread.h:274:1: + PTHREAD_MUTEX_PRIVATE = 0 // pthread.h:145:1: + PTHREAD_MUTEX_RECURSIVE = 2 // pthread.h:276:1: + PTHREAD_MUTEX_RECURSIVE_NP = 2 // pthread.h:158:1: + PTHREAD_MUTEX_SHARED = 1 // pthread.h:144:1: + PTHREAD_MUTEX_TIMED_NP = 0 // pthread.h:155:1: + PTHREAD_ONCE_INIT = 0 // pthread.h:134:1: + PTHREAD_PRIO_INHERIT = 8 // pthread.h:148:1: + PTHREAD_PRIO_MULT = 32 // pthread.h:150:1: + PTHREAD_PRIO_NONE = 0 // pthread.h:147:1: + PTHREAD_PRIO_PROTECT = 16 // pthread.h:149:1: + PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:152:1: + PTHREAD_PROCESS_SHARED = 1 // pthread.h:151:1: + PTHREAD_SCOPE_PROCESS = 0 // pthread.h:125:1: + PTHREAD_SCOPE_SYSTEM = 0x10 // pthread.h:126:1: + PTHREAD_THREADS_MAX = 2019 // pthread.h:437:1: + P_DETACH = 4 // process.h:151:1: + P_NOWAIT = 1 // process.h:147:1: + P_NOWAITO = 3 // process.h:150:1: + P_OVERLAY = 2 // process.h:148:1: + P_WAIT = 0 // process.h:146:1: + RWLS_PER_THREAD = 8 // pthread.h:98:1: + SCHAR_MAX = 127 // limits.h:75:1: + SCHAR_MIN = -128 // limits.h:73:1: + SCHED_FIFO = 1 // pthread.h:234:1: + SCHED_MAX = 2 // pthread.h:237:1: + SCHED_MIN = 0 // pthread.h:236:1: + SCHED_OTHER = 0 // pthread.h:233:1: + SCHED_RR = 2 // pthread.h:235:1: + SEM_NSEMS_MAX = 1024 // pthread.h:443:1: + SHRT_MAX = 32767 // limits.h:106:1: + SHRT_MIN = -32768 // limits.h:104:1: + SIGABRT = 22 // signal.h:30:1: + SIGABRT2 = 22 // signal.h:31:1: + SIGABRT_COMPAT = 6 // signal.h:25:1: + SIGBREAK = 21 // signal.h:29:1: + SIGFPE = 8 // signal.h:26:1: + SIGILL = 4 // signal.h:24:1: + SIGINT = 2 // signal.h:23:1: + SIGSEGV = 11 // signal.h:27:1: + SIGTERM = 15 // signal.h:28:1: + SIG_BLOCK = 0 // pthread.h:419:1: + SIG_SETMASK = 2 // pthread.h:425:1: + SIG_UNBLOCK = 1 // pthread.h:422:1: + SIZE_MAX = 4294967295 // limits.h:78:1: + SSIZE_MAX = 2147483647 // limits.h:86:1: + STRUNCATE = 80 // errno.h:67:1: + UCHAR_MAX = 255 // limits.h:82:1: + UINT_MAX = 4294967295 // limits.h:124:1: + ULLONG_MAX = 18446744073709551615 // limits.h:146:1: + ULONG_LONG_MAX = 18446744073709551615 // limits.h:158:1: + ULONG_MAX = 4294967295 // limits.h:135:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + USHRT_MAX = 65535 // limits.h:113:1: + WAIT_CHILD = 0 // process.h:152:1: + WAIT_GRANDCHILD = 1 // process.h:153:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + WINPTHREAD_API = 0 // pthread.h:92:1: + WIN_PTHREADS_H = 0 // pthread.h:60:1: + WIN_PTHREADS_PTHREAD_COMPAT_H = 0 // pthread_compat.h:61:1: + WIN_PTHREADS_SIGNAL_H = 0 // pthread_signal.h:24:1: + WIN_PTHREADS_UNISTD_H = 0 // pthread_unistd.h:24:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ANSI_STDDEF_H = 0 // stddef.h:52:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_ERRNO_DEFINED = 0 // stddef.h:17:1: + X_CRT_GETPID_DEFINED = 0 // process.h:157:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_SYSTEM_DEFINED = 0 // process.h:91:1: + X_CRT_TERMINATE_DEFINED = 0 // process.h:41:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WSYSTEM_DEFINED = 0 // process.h:120:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_GCC_LIMITS_H_ = 0 // limits.h:30:1: + X_GCC_MAX_ALIGN_T = 0 // stddef.h:419:1: + X_GTHREAD_USE_MUTEX_INIT_FUNC = 1 // pthread.h:686:1: + X_I16_MAX = 32767 // limits.h:54:1: + X_I16_MIN = -32768 // limits.h:53:1: + X_I32_MAX = 2147483647 // limits.h:58:1: + X_I32_MIN = -2147483648 // limits.h:57:1: + X_I64_MAX = 9223372036854775807 // limits.h:71:1: + X_I64_MIN = -9223372036854775808 // limits.h:70:1: + X_I8_MAX = 127 // limits.h:50:1: + X_I8_MIN = -128 // limits.h:49:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CORECRT_STARTUP = 0 // corecrt_startup.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_ERRNO = 0 // errno.h:7:1: + X_INC_LIMITS = 0 // limits.h:9:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_PROCESS = 0 // process.h:7:1: + X_INC_SIGNAL = 0 // signal.h:7:1: + X_INC_STDDEF = 0 // stddef.h:10:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LIMITS_H___ = 0 // limits.h:60:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_OLD_P_OVERLAY = 2 // process.h:23:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_POSIX_BARRIERS = 200112 // pthread_unistd.h:130:1: + X_POSIX_CLOCK_SELECTION = 200112 // pthread_unistd.h:173:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // pthread_unistd.h:101:1: + X_POSIX_SEMAPHORES = 200112 // pthread_unistd.h:190:1: + X_POSIX_SEM_NSEMS_MAX = 256 // pthread.h:440:1: + X_POSIX_SPIN_LOCKS = 200112 // pthread_unistd.h:115:1: + X_POSIX_THREADS = 200112 // pthread_unistd.h:81:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 256 // pthread.h:431:1: + X_POSIX_THREAD_KEYS_MAX = 1048576 // pthread.h:434:1: + X_POSIX_TIMEOUTS = 200112 // pthread_unistd.h:145:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_P_DETACH = 4 // process.h:25:1: + X_P_NOWAIT = 1 // process.h:22:1: + X_P_NOWAITO = 3 // process.h:24:1: + X_P_OVERLAY = 2 // process.h:26:1: + X_P_WAIT = 0 // process.h:21:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 // errno.h:63:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIG_ATOMIC_T_DEFINED = 0 // signal.h:17:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPAWNV_DEFINED = 0 // process.h:83:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_STDDEF_H = 0 // stddef.h:49:1: + X_STDDEF_H_ = 0 // stddef.h:50:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMEB_DEFINED = 0 // timeb.h:51:1: + X_TIMEB_H_ = 0 // timeb.h:7:1: + X_TIMEB_H_S = 0 // timeb_s.h:8:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UI16_MAX = 0xffff // limits.h:55:1: + X_UI32_MAX = 0xffffffff // limits.h:59:1: + X_UI64_MAX = 0xffffffffffffffff // limits.h:72:1: + X_UI8_MAX = 0xff // limits.h:51:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WAIT_CHILD = 0 // process.h:28:1: + X_WAIT_GRANDCHILD = 1 // process.h:29:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WEXEC_DEFINED = 0 // process.h:96:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WSPAWN_DEFINED = 0 // process.h:108:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -423,6 +426,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -443,6 +451,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -483,26 +497,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -528,29 +544,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // ISO C Standard: 7.17 Common definitions <stddef.h> @@ -609,14 +625,15 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // Offset of member MEMBER in a struct of type TYPE. // Type whose alignment is supported in every context and is at least -// as great as that of any standard type not using alignment -// specifiers. +// +// as great as that of any standard type not using alignment +// specifiers. type Max_align_t = struct { F__max_align_ll int64 F__max_align_ld float64 -} /* stddef.h:426:3 */ +} /* stddef.h:427:3 */ -// Copyright (C) 1989-2018 Free Software Foundation, Inc. +// Copyright (C) 1989-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -722,7 +739,18 @@ type X_onexit_table_t = X_onexit_table_t1 /* corecrt_startup.h:28:3 */ type X_onexit_t = uintptr /* corecrt_startup.h:30:13 */ -// Copyright (C) 1992-2018 Free Software Foundation, Inc. +// Includes a definition of _pid_t and pid_t +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + +type X_beginthread_proc_type = uintptr /* process.h:32:16 */ +type X_beginthreadex_proc_type = uintptr /* process.h:33:20 */ + +type X_tls_callback_type = uintptr /* process.h:61:16 */ + +// Copyright (C) 1992-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -774,7 +802,7 @@ type X_onexit_t = uintptr /* corecrt_startup.h:30:13 */ // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. -// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -951,11 +979,11 @@ type Pthread_attr_t1 = struct { type Pthread_attr_t = Pthread_attr_t1 /* pthread.h:251:31 */ // synchronization objects -type Pthread_spinlock_t = uintptr /* pthread.h:268:14 */ -type Pthread_mutex_t = uintptr /* pthread.h:269:14 */ -type Pthread_cond_t = uintptr /* pthread.h:270:14 */ -type Pthread_rwlock_t = uintptr /* pthread.h:271:14 */ -type Pthread_barrier_t = uintptr /* pthread.h:272:14 */ +type Pthread_spinlock_t = Intptr_t /* pthread.h:268:18 */ +type Pthread_mutex_t = Intptr_t /* pthread.h:269:18 */ +type Pthread_cond_t = Intptr_t /* pthread.h:270:18 */ +type Pthread_rwlock_t = Intptr_t /* pthread.h:271:18 */ +type Pthread_barrier_t = uintptr /* pthread.h:272:14 */ type Clockid_t = int32 /* pthread.h:389:13 */ @@ -1076,23 +1104,6 @@ type Clockid_t = int32 /* pthread.h:389:13 */ // // are present. -// _SC_THREAD_SAFE_FUNCTIONS -// Affected functions are -// -// readdir_r(), -// getgrgid_r(), -// getgrnam_r(), -// getpwnam_r(), -// getpwuid_r(), -// flockfile(), -// ftrylockfile(), -// funlockfile(), -// getc_unlocked(), -// getchar_unlocked(), -// putc_unlocked(), -// putchar_unlocked(), -// strerror_r(), - // _SC_TIMEOUTS // The functions // diff --git a/vendor/modernc.org/libc/pthread/pthread_windows_amd64.go b/vendor/modernc.org/libc/pthread/pthread_windows_amd64.go index 31f34bad..2ba486fb 100644 --- a/vendor/modernc.org/libc/pthread/pthread_windows_amd64.go +++ b/vendor/modernc.org/libc/pthread/pthread_windows_amd64.go @@ -621,8 +621,9 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // Offset of member MEMBER in a struct of type TYPE. // Type whose alignment is supported in every context and is at least -// as great as that of any standard type not using alignment -// specifiers. +// +// as great as that of any standard type not using alignment +// specifiers. type Max_align_t = struct { F__max_align_ll int64 F__max_align_ld float64 diff --git a/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go b/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go index 38f65ad6..0d36fd33 100644 --- a/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/pwd/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pwd/pwd_darwin_amd64.go -pkgname pwd', DO NOT EDIT. +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_darwin_amd64.go -pkgname pwd', DO NOT EDIT. package pwd diff --git a/vendor/modernc.org/libc/pwd/capi_freebsd_arm.go b/vendor/modernc.org/libc/pwd/capi_freebsd_arm.go new file mode 100644 index 00000000..a1965b74 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_freebsd_arm.go -pkgname pwd', DO NOT EDIT. + +package pwd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pwd/capi_freebsd_arm64.go b/vendor/modernc.org/libc/pwd/capi_freebsd_arm64.go new file mode 100644 index 00000000..0aad252c --- /dev/null +++ b/vendor/modernc.org/libc/pwd/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_freebsd_amd64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pwd/capi_netbsd_arm.go b/vendor/modernc.org/libc/pwd/capi_netbsd_arm.go new file mode 100644 index 00000000..9b93d040 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_netbsd_arm.go -pkgname pwd', DO NOT EDIT. + +package pwd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pwd/capi_openbsd_386.go b/vendor/modernc.org/libc/pwd/capi_openbsd_386.go new file mode 100644 index 00000000..8f0b1d62 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_openbsd_386.go -pkgname pwd', DO NOT EDIT. + +package pwd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pwd/capi_openbsd_arm64.go b/vendor/modernc.org/libc/pwd/capi_openbsd_arm64.go new file mode 100644 index 00000000..fa21dfc9 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_openbsd_arm64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go b/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go index 5edc4ff2..02c85dd2 100644 --- a/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go +++ b/vendor/modernc.org/libc/pwd/pwd_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o pwd/pwd_darwin_amd64.go -pkgname pwd', DO NOT EDIT. +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_darwin_amd64.go -pkgname pwd', DO NOT EDIT. package pwd @@ -15,49 +15,49 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_GID_T = 0 - X_LP64 = 1 - X_MASTERPASSWD = "master.passwd" - X_MP_DB = "pwd.db" - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PASSWD = "passwd" - X_PASSWORD_CHGNOW = -1 - X_PASSWORD_EFMT1 = 95 - X_PASSWORD_LEN = 128 - X_PASSWORD_NOCHG = 0x04 - X_PASSWORD_NOEXP = 0x08 - X_PASSWORD_NOGID = 0x02 - X_PASSWORD_NOUID = 0x01 - X_PASSWORD_WARNDAYS = 14 - X_PATH_MASTERPASSWD = "/etc/master.passwd" - X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" - X_PATH_MP_DB = "/etc/pwd.db" - X_PATH_PASSWD = "/etc/passwd" - X_PATH_PWD = "/etc" - X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" - X_PATH_SMP_DB = "/etc/spwd.db" - X_PWD_H_ = 0 - X_PW_KEYBYNAME = 49 - X_PW_KEYBYNUM = 50 - X_PW_KEYBYUID = 51 - X_SIZE_T = 0 - X_SMP_DB = "spwd.db" - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UID_T = 0 - X_UUID_STRING_T = 0 - X_UUID_T = 0 - X_UUID_UUID_H = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MASTERPASSWD = "master.passwd" // pwd.h:57:1: + X_MP_DB = "pwd.db" // pwd.h:60:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PASSWD = "passwd" // pwd.h:54:1: + X_PASSWORD_CHGNOW = -1 // pwd.h:80:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:70:1: + X_PASSWORD_LEN = 128 // pwd.h:72:1: + X_PASSWORD_NOCHG = 0x04 // pwd.h:76:1: + X_PASSWORD_NOEXP = 0x08 // pwd.h:77:1: + X_PASSWORD_NOGID = 0x02 // pwd.h:75:1: + X_PASSWORD_NOUID = 0x01 // pwd.h:74:1: + X_PASSWORD_WARNDAYS = 14 // pwd.h:79:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:55:1: + X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" // pwd.h:56:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:59:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:53:1: + X_PATH_PWD = "/etc" // pwd.h:52:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:64:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:61:1: + X_PWD_H_ = 0 // pwd.h:44:1: + X_PW_KEYBYNAME = 49 // pwd.h:66:1: + X_PW_KEYBYNUM = 50 // pwd.h:67:1: + X_PW_KEYBYUID = 51 // pwd.h:68:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SMP_DB = "spwd.db" // pwd.h:62:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UUID_STRING_T = 0 // uuid.h:42:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_UUID_UUID_H = 0 // uuid.h:36:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_freebsd_386.go b/vendor/modernc.org/libc/pwd/pwd_freebsd_386.go index d38cf574..aab9a7db 100644 --- a/vendor/modernc.org/libc/pwd/pwd_freebsd_386.go +++ b/vendor/modernc.org/libc/pwd/pwd_freebsd_386.go @@ -580,8 +580,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/pwd/pwd_freebsd_amd64.go b/vendor/modernc.org/libc/pwd/pwd_freebsd_amd64.go index 4c00c214..d9c00fc9 100644 --- a/vendor/modernc.org/libc/pwd/pwd_freebsd_amd64.go +++ b/vendor/modernc.org/libc/pwd/pwd_freebsd_amd64.go @@ -22,9 +22,9 @@ const ( X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_MASTERPASSWD = "master.passwd" // pwd.h:70:1: X_MP_DB = "pwd.db" // pwd.h:73:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_PASSWD = "passwd" // pwd.h:68:1: X_PASSWORD_EFMT1 = 95 // pwd.h:110:1: X_PASSWORD_LEN = 128 // pwd.h:112:1: @@ -62,7 +62,7 @@ const ( X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_TIME_T_DECLARED = 0 // pwd.h:53:1: X_UID_T_DECLARED = 0 // pwd.h:58:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -337,12 +337,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -585,8 +588,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/pwd/pwd_freebsd_arm.go b/vendor/modernc.org/libc/pwd/pwd_freebsd_arm.go new file mode 100644 index 00000000..c587ad58 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/pwd_freebsd_arm.go @@ -0,0 +1,620 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_freebsd_arm.go -pkgname pwd', DO NOT EDIT. + +package pwd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GID_T_DECLARED = 0 // pwd.h:48:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MASTERPASSWD = "master.passwd" // pwd.h:70:1: + X_MP_DB = "pwd.db" // pwd.h:73:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PASSWD = "passwd" // pwd.h:68:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:110:1: + X_PASSWORD_LEN = 128 // pwd.h:112:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:69:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:72:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:67:1: + X_PATH_PWD = "/etc" // pwd.h:66:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:77:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:74:1: + X_PWD_CURRENT_VERSION = 4 // pwd.h:108:1: + X_PWD_H_ = 0 // pwd.h:41:1: + X_PWF_CHANGE = 16 // pwd.h:134:1: + X_PWF_CLASS = 32 // pwd.h:135:1: + X_PWF_DIR = 128 // pwd.h:137:1: + X_PWF_EXPIRE = 512 // pwd.h:139:1: + X_PWF_FILES = 0x1000 // pwd.h:145:1: + X_PWF_GECOS = 64 // pwd.h:136:1: + X_PWF_GID = 8 // pwd.h:133:1: + X_PWF_HESIOD = 0x3000 // pwd.h:147:1: + X_PWF_NAME = 1 // pwd.h:130:1: + X_PWF_NIS = 0x2000 // pwd.h:146:1: + X_PWF_PASSWD = 2 // pwd.h:131:1: + X_PWF_SHELL = 256 // pwd.h:138:1: + X_PWF_SOURCE = 0x3000 // pwd.h:144:1: + X_PWF_UID = 4 // pwd.h:132:1: + X_PW_KEYBYNAME = 49 // pwd.h:97:1: + X_PW_KEYBYNUM = 50 // pwd.h:98:1: + X_PW_KEYBYUID = 51 // pwd.h:99:1: + X_PW_KEYYPBYNUM = 53 // pwd.h:101:1: + X_PW_KEYYPENABLED = 52 // pwd.h:100:1: + X_PW_VERSION_MASK = 240 // pwd.h:94:1: + X_SIZE_T_DECLARED = 0 // pwd.h:63:1: + X_SMP_DB = "spwd.db" // pwd.h:75:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIME_T_DECLARED = 0 // pwd.h:53:1: + X_UID_T_DECLARED = 0 // pwd.h:58:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)pwd.h 8.2 (Berkeley) 1/21/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Gid_t = X__gid_t /* pwd.h:47:18 */ + +type Time_t = X__time_t /* pwd.h:52:18 */ + +type Uid_t = X__uid_t /* pwd.h:57:18 */ + +// Historically, the keys in _PATH_MP_DB/_PATH_SMP_DB had the format +// `1 octet tag | key', where the tag is one of the _PW_KEY* values +// listed below. These values happen to be ASCII digits. Starting +// with FreeBSD 5.1, the tag is now still a single octet, but the +// upper 4 bits are interpreted as a version. Pre-FreeBSD 5.1 format +// entries are version `3' -- this conveniently results in the same +// key values as before. The new, architecture-independent entries +// are version `4'. +// As it happens, some applications read the database directly. +// (Bad app, no cookie!) Thus, we leave the _PW_KEY* symbols at their +// old pre-FreeBSD 5.1 values so these apps still work. Consequently +// we have to muck around a bit more to get the correct, versioned +// tag, and that is what the _PW_VERSIONED macro is about. + +// The database also contains a key to indicate the format version of +// the entries therein. There may be other, older versioned entries +// as well. + +type Passwd = struct { + Fpw_name uintptr + Fpw_passwd uintptr + Fpw_uid Uid_t + Fpw_gid Gid_t + Fpw_change Time_t + Fpw_class uintptr + Fpw_gecos uintptr + Fpw_dir uintptr + Fpw_shell uintptr + Fpw_expire Time_t + Fpw_fields int32 + F__ccgo_pad1 [4]byte +} /* pwd.h:114:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pwd/pwd_freebsd_arm64.go b/vendor/modernc.org/libc/pwd/pwd_freebsd_arm64.go new file mode 100644 index 00000000..d9c00fc9 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/pwd_freebsd_arm64.go @@ -0,0 +1,679 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_freebsd_amd64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GID_T_DECLARED = 0 // pwd.h:48:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MASTERPASSWD = "master.passwd" // pwd.h:70:1: + X_MP_DB = "pwd.db" // pwd.h:73:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PASSWD = "passwd" // pwd.h:68:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:110:1: + X_PASSWORD_LEN = 128 // pwd.h:112:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:69:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:72:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:67:1: + X_PATH_PWD = "/etc" // pwd.h:66:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:77:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:74:1: + X_PWD_CURRENT_VERSION = 4 // pwd.h:108:1: + X_PWD_H_ = 0 // pwd.h:41:1: + X_PWF_CHANGE = 16 // pwd.h:134:1: + X_PWF_CLASS = 32 // pwd.h:135:1: + X_PWF_DIR = 128 // pwd.h:137:1: + X_PWF_EXPIRE = 512 // pwd.h:139:1: + X_PWF_FILES = 0x1000 // pwd.h:145:1: + X_PWF_GECOS = 64 // pwd.h:136:1: + X_PWF_GID = 8 // pwd.h:133:1: + X_PWF_HESIOD = 0x3000 // pwd.h:147:1: + X_PWF_NAME = 1 // pwd.h:130:1: + X_PWF_NIS = 0x2000 // pwd.h:146:1: + X_PWF_PASSWD = 2 // pwd.h:131:1: + X_PWF_SHELL = 256 // pwd.h:138:1: + X_PWF_SOURCE = 0x3000 // pwd.h:144:1: + X_PWF_UID = 4 // pwd.h:132:1: + X_PW_KEYBYNAME = 49 // pwd.h:97:1: + X_PW_KEYBYNUM = 50 // pwd.h:98:1: + X_PW_KEYBYUID = 51 // pwd.h:99:1: + X_PW_KEYYPBYNUM = 53 // pwd.h:101:1: + X_PW_KEYYPENABLED = 52 // pwd.h:100:1: + X_PW_VERSION_MASK = 240 // pwd.h:94:1: + X_SIZE_T_DECLARED = 0 // pwd.h:63:1: + X_SMP_DB = "spwd.db" // pwd.h:75:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIME_T_DECLARED = 0 // pwd.h:53:1: + X_UID_T_DECLARED = 0 // pwd.h:58:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)pwd.h 8.2 (Berkeley) 1/21/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Gid_t = X__gid_t /* pwd.h:47:18 */ + +type Time_t = X__time_t /* pwd.h:52:18 */ + +type Uid_t = X__uid_t /* pwd.h:57:18 */ + +// Historically, the keys in _PATH_MP_DB/_PATH_SMP_DB had the format +// `1 octet tag | key', where the tag is one of the _PW_KEY* values +// listed below. These values happen to be ASCII digits. Starting +// with FreeBSD 5.1, the tag is now still a single octet, but the +// upper 4 bits are interpreted as a version. Pre-FreeBSD 5.1 format +// entries are version `3' -- this conveniently results in the same +// key values as before. The new, architecture-independent entries +// are version `4'. +// As it happens, some applications read the database directly. +// (Bad app, no cookie!) Thus, we leave the _PW_KEY* symbols at their +// old pre-FreeBSD 5.1 values so these apps still work. Consequently +// we have to muck around a bit more to get the correct, versioned +// tag, and that is what the _PW_VERSIONED macro is about. + +// The database also contains a key to indicate the format version of +// the entries therein. There may be other, older versioned entries +// as well. + +type Passwd = struct { + Fpw_name uintptr + Fpw_passwd uintptr + Fpw_uid Uid_t + Fpw_gid Gid_t + Fpw_change Time_t + Fpw_class uintptr + Fpw_gecos uintptr + Fpw_dir uintptr + Fpw_shell uintptr + Fpw_expire Time_t + Fpw_fields int32 + F__ccgo_pad1 [4]byte +} /* pwd.h:114:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_386.go b/vendor/modernc.org/libc/pwd/pwd_linux_386.go index e77eb404..6b4b7499 100644 --- a/vendor/modernc.org/libc/pwd/pwd_linux_386.go +++ b/vendor/modernc.org/libc/pwd/pwd_linux_386.go @@ -722,7 +722,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -733,13 +734,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Wide character type. @@ -753,7 +756,8 @@ type X__time64_t = X__int64_t /* types.h:222:28 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* pwd.h:38:17 */ type Uid_t = X__uid_t /* pwd.h:43:17 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_amd64.go b/vendor/modernc.org/libc/pwd/pwd_linux_amd64.go index af537b48..922d6ef3 100644 --- a/vendor/modernc.org/libc/pwd/pwd_linux_amd64.go +++ b/vendor/modernc.org/libc/pwd/pwd_linux_amd64.go @@ -741,7 +741,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -752,8 +753,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -767,7 +769,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* pwd.h:38:17 */ type Uid_t = X__uid_t /* pwd.h:43:17 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_arm.go b/vendor/modernc.org/libc/pwd/pwd_linux_arm.go index 4e675af9..35c8f155 100644 --- a/vendor/modernc.org/libc/pwd/pwd_linux_arm.go +++ b/vendor/modernc.org/libc/pwd/pwd_linux_arm.go @@ -781,7 +781,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -792,13 +793,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Wide character type. @@ -812,7 +815,8 @@ type X__time64_t = X__int64_t /* types.h:222:28 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* pwd.h:38:17 */ type Uid_t = X__uid_t /* pwd.h:43:17 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_arm64.go b/vendor/modernc.org/libc/pwd/pwd_linux_arm64.go index d194350c..207ddb6e 100644 --- a/vendor/modernc.org/libc/pwd/pwd_linux_arm64.go +++ b/vendor/modernc.org/libc/pwd/pwd_linux_arm64.go @@ -809,7 +809,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -820,8 +821,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -835,7 +837,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* pwd.h:38:17 */ type Uid_t = X__uid_t /* pwd.h:43:17 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_ppc64le.go b/vendor/modernc.org/libc/pwd/pwd_linux_ppc64le.go index c7e0084d..8f338c80 100644 --- a/vendor/modernc.org/libc/pwd/pwd_linux_ppc64le.go +++ b/vendor/modernc.org/libc/pwd/pwd_linux_ppc64le.go @@ -751,7 +751,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -762,8 +763,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -777,7 +779,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* pwd.h:38:17 */ type Uid_t = X__uid_t /* pwd.h:43:17 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go b/vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go index c8727bd7..260b0bef 100644 --- a/vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go +++ b/vendor/modernc.org/libc/pwd/pwd_linux_riscv64.go @@ -913,7 +913,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -924,8 +925,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Wide character type. @@ -939,7 +941,8 @@ type X__sig_atomic_t = int32 /* types.h:215:13 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* pwd.h:38:17 */ type Uid_t = X__uid_t /* pwd.h:43:17 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_s390x.go b/vendor/modernc.org/libc/pwd/pwd_linux_s390x.go index baefeeab..b8b92c04 100644 --- a/vendor/modernc.org/libc/pwd/pwd_linux_s390x.go +++ b/vendor/modernc.org/libc/pwd/pwd_linux_s390x.go @@ -740,7 +740,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -751,8 +752,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Wide character type. @@ -766,7 +768,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* pwd.h:38:17 */ type Uid_t = X__uid_t /* pwd.h:43:17 */ diff --git a/vendor/modernc.org/libc/pwd/pwd_netbsd_arm.go b/vendor/modernc.org/libc/pwd/pwd_netbsd_arm.go new file mode 100644 index 00000000..1ca0ed5d --- /dev/null +++ b/vendor/modernc.org/libc/pwd/pwd_netbsd_arm.go @@ -0,0 +1,1595 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_netbsd_arm.go -pkgname pwd', DO NOT EDIT. + +package pwd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PASSWORD_CHGNOW = -1 // pwd.h:103:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:89:1: + X_PASSWORD_LEN = 128 // pwd.h:92:1: + X_PASSWORD_NOCHG = 0x04 // pwd.h:96:1: + X_PASSWORD_NOEXP = 0x08 // pwd.h:97:1: + X_PASSWORD_NOGID = 0x02 // pwd.h:95:1: + X_PASSWORD_NONDES = 36 // pwd.h:90:1: + X_PASSWORD_NOUID = 0x01 // pwd.h:94:1: + X_PASSWORD_NOWARN = 0x20 // pwd.h:100:1: + X_PASSWORD_OLDFMT = 0x10 // pwd.h:99:1: + X_PASSWORD_WARNDAYS = 14 // pwd.h:102:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:73:1: + X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" // pwd.h:74:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:80:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:72:1: + X_PATH_PASSWD_CONF = "/etc/passwd.conf" // pwd.h:76:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:83:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:81:1: + X_PATH_USERMGMT_CONF = "/etc/usermgmt.conf" // pwd.h:78:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_PWD_H_ = 0 // pwd.h:65:1: + X_PW_KEYBYNAME = 49 // pwd.h:85:1: + X_PW_KEYBYNUM = 50 // pwd.h:86:1: + X_PW_KEYBYUID = 51 // pwd.h:87:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +type Passwd = struct { + Fpw_name uintptr + Fpw_passwd uintptr + Fpw_uid X__uid_t + Fpw_gid X__gid_t + Fpw_change Time_t + Fpw_class uintptr + Fpw_gecos uintptr + Fpw_dir uintptr + Fpw_shell uintptr + Fpw_expire Time_t +} /* pwd.h:107:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pwd/pwd_openbsd_386.go b/vendor/modernc.org/libc/pwd/pwd_openbsd_386.go new file mode 100644 index 00000000..b414e457 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/pwd_openbsd_386.go @@ -0,0 +1,718 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_openbsd_386.go -pkgname pwd', DO NOT EDIT. + +package pwd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:62:1: + X_PASSWORD_LEN = 128 // pwd.h:64:1: + X_PASSWORD_NOCHG = 0x04 // pwd.h:71:1: + X_PASSWORD_NOEXP = 0x08 // pwd.h:72:1: + X_PASSWORD_NOGID = 0x02 // pwd.h:70:1: + X_PASSWORD_NOUID = 0x01 // pwd.h:69:1: + X_PASSWORD_OMITV7 = 0x02 // pwd.h:76:1: + X_PASSWORD_SECUREONLY = 0x01 // pwd.h:75:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:48:1: + X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" // pwd.h:49:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:51:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:47:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:54:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:52:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_PWD_H_ = 0 // pwd.h:42:1: + X_PW_BUF_LEN = 1024 // pwd.h:67:1: + X_PW_KEYBYNAME = 49 // pwd.h:56:1: + X_PW_KEYBYNUM = 50 // pwd.h:57:1: + X_PW_KEYBYUID = 51 // pwd.h:58:1: + X_PW_NAME_LEN = 31 // pwd.h:65:1: + X_PW_YPTOKEN = "__YP!" // pwd.h:60:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: pwd.h,v 1.26 2018/09/13 12:31:15 millert Exp $ +// $NetBSD: pwd.h,v 1.9 1996/05/15 21:36:45 jtc 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. +// Portions Copyright(C) 1995, 1996, 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. +// 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// Should be MAXLOGNAME - 1 + +// Flags for pw_mkdb(3) + +type Passwd = struct { + Fpw_name uintptr + Fpw_passwd uintptr + Fpw_uid Uid_t + Fpw_gid Gid_t + Fpw_change Time_t + Fpw_class uintptr + Fpw_gecos uintptr + Fpw_dir uintptr + Fpw_shell uintptr + Fpw_expire Time_t +} /* pwd.h:80:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go b/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go index f8c823c6..cacca58a 100644 --- a/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go +++ b/vendor/modernc.org/libc/pwd/pwd_openbsd_amd64.go @@ -21,8 +21,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -34,7 +34,7 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PASSWORD_EFMT1 = 95 // pwd.h:62:1: X_PASSWORD_LEN = 128 // pwd.h:64:1: X_PASSWORD_NOCHG = 0x04 // pwd.h:71:1: @@ -50,7 +50,7 @@ const ( X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:54:1: X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:52:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_PWD_H_ = 0 // pwd.h:42:1: X_PW_BUF_LEN = 1024 // pwd.h:67:1: X_PW_KEYBYNAME = 49 // pwd.h:56:1: @@ -61,21 +61,21 @@ const ( X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -135,7 +135,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // // @(#)pwd.h 8.2 (Berkeley) 1/21/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -432,7 +432,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -592,18 +592,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -685,27 +684,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/pwd/pwd_openbsd_arm64.go b/vendor/modernc.org/libc/pwd/pwd_openbsd_arm64.go new file mode 100644 index 00000000..2d96567b --- /dev/null +++ b/vendor/modernc.org/libc/pwd/pwd_openbsd_arm64.go @@ -0,0 +1,725 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_openbsd_arm64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PASSWORD_EFMT1 = 95 // pwd.h:62:1: + X_PASSWORD_LEN = 128 // pwd.h:64:1: + X_PASSWORD_NOCHG = 0x04 // pwd.h:71:1: + X_PASSWORD_NOEXP = 0x08 // pwd.h:72:1: + X_PASSWORD_NOGID = 0x02 // pwd.h:70:1: + X_PASSWORD_NOUID = 0x01 // pwd.h:69:1: + X_PASSWORD_OMITV7 = 0x02 // pwd.h:76:1: + X_PASSWORD_SECUREONLY = 0x01 // pwd.h:75:1: + X_PATH_MASTERPASSWD = "/etc/master.passwd" // pwd.h:48:1: + X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp" // pwd.h:49:1: + X_PATH_MP_DB = "/etc/pwd.db" // pwd.h:51:1: + X_PATH_PASSWD = "/etc/passwd" // pwd.h:47:1: + X_PATH_PWD_MKDB = "/usr/sbin/pwd_mkdb" // pwd.h:54:1: + X_PATH_SMP_DB = "/etc/spwd.db" // pwd.h:52:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_PWD_H_ = 0 // pwd.h:42:1: + X_PW_BUF_LEN = 1024 // pwd.h:67:1: + X_PW_KEYBYNAME = 49 // pwd.h:56:1: + X_PW_KEYBYNUM = 50 // pwd.h:57:1: + X_PW_KEYBYUID = 51 // pwd.h:58:1: + X_PW_NAME_LEN = 31 // pwd.h:65:1: + X_PW_YPTOKEN = "__YP!" // pwd.h:60:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: pwd.h,v 1.26 2018/09/13 12:31:15 millert Exp $ +// $NetBSD: pwd.h,v 1.9 1996/05/15 21:36:45 jtc 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. +// Portions Copyright(C) 1995, 1996, 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. +// 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// Should be MAXLOGNAME - 1 + +// Flags for pw_mkdb(3) + +type Passwd = struct { + Fpw_name uintptr + Fpw_passwd uintptr + Fpw_uid Uid_t + Fpw_gid Gid_t + Fpw_change Time_t + Fpw_class uintptr + Fpw_gecos uintptr + Fpw_dir uintptr + Fpw_shell uintptr + Fpw_expire Time_t +} /* pwd.h:80:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/capi_darwin_amd64.go b/vendor/modernc.org/libc/signal/capi_darwin_amd64.go index 841f5c77..3c592ebd 100644 --- a/vendor/modernc.org/libc/signal/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/signal/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o signal/signal_darwin_amd64.go -pkgname signal', DO NOT EDIT. +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_darwin_amd64.go -pkgname signal', DO NOT EDIT. package signal diff --git a/vendor/modernc.org/libc/signal/capi_freebsd_arm.go b/vendor/modernc.org/libc/signal/capi_freebsd_arm.go new file mode 100644 index 00000000..8cd37274 --- /dev/null +++ b/vendor/modernc.org/libc/signal/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_freebsd_arm.go -pkgname signal', DO NOT EDIT. + +package signal + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/signal/capi_freebsd_arm64.go b/vendor/modernc.org/libc/signal/capi_freebsd_arm64.go new file mode 100644 index 00000000..ab2366e7 --- /dev/null +++ b/vendor/modernc.org/libc/signal/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_freebsd_amd64.go -pkgname signal', DO NOT EDIT. + +package signal + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/signal/capi_netbsd_arm.go b/vendor/modernc.org/libc/signal/capi_netbsd_arm.go new file mode 100644 index 00000000..f07681d5 --- /dev/null +++ b/vendor/modernc.org/libc/signal/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_netbsd_arm.go -pkgname signal', DO NOT EDIT. + +package signal + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/signal/capi_openbsd_386.go b/vendor/modernc.org/libc/signal/capi_openbsd_386.go new file mode 100644 index 00000000..88037c6f --- /dev/null +++ b/vendor/modernc.org/libc/signal/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_openbsd_386.go -pkgname signal', DO NOT EDIT. + +package signal + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/signal/capi_openbsd_arm64.go b/vendor/modernc.org/libc/signal/capi_openbsd_arm64.go new file mode 100644 index 00000000..5ba65f06 --- /dev/null +++ b/vendor/modernc.org/libc/signal/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_openbsd_arm64.go -pkgname signal', DO NOT EDIT. + +package signal + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/signal/capi_windows_386.go b/vendor/modernc.org/libc/signal/capi_windows_386.go index d7651277..b402e079 100644 --- a/vendor/modernc.org/libc/signal/capi_windows_386.go +++ b/vendor/modernc.org/libc/signal/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo signal\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o signal\signal_windows_386.go -pkgname signal', DO NOT EDIT. +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_windows_386.go -pkgname signal', DO NOT EDIT. package signal diff --git a/vendor/modernc.org/libc/signal/more_freebsd_arm.go b/vendor/modernc.org/libc/signal/more_freebsd_arm.go new file mode 100644 index 00000000..c1791b2a --- /dev/null +++ b/vendor/modernc.org/libc/signal/more_freebsd_arm.go @@ -0,0 +1,12 @@ +// Copyright 2020 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package signal + +const ( + // sys/sys/signal.h:139:#define SIG_DFL ((__sighandler_t *)0) + SIG_DFL = 0 + // sys/sys/signal.h:140:#define SIG_IGN ((__sighandler_t *)1) + SIG_IGN = 1 +) diff --git a/vendor/modernc.org/libc/signal/more_freebsd_arm64.go b/vendor/modernc.org/libc/signal/more_freebsd_arm64.go new file mode 100644 index 00000000..c1791b2a --- /dev/null +++ b/vendor/modernc.org/libc/signal/more_freebsd_arm64.go @@ -0,0 +1,12 @@ +// Copyright 2020 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package signal + +const ( + // sys/sys/signal.h:139:#define SIG_DFL ((__sighandler_t *)0) + SIG_DFL = 0 + // sys/sys/signal.h:140:#define SIG_IGN ((__sighandler_t *)1) + SIG_IGN = 1 +) diff --git a/vendor/modernc.org/libc/signal/more_netbsd_arm.go b/vendor/modernc.org/libc/signal/more_netbsd_arm.go new file mode 100644 index 00000000..c1791b2a --- /dev/null +++ b/vendor/modernc.org/libc/signal/more_netbsd_arm.go @@ -0,0 +1,12 @@ +// Copyright 2020 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package signal + +const ( + // sys/sys/signal.h:139:#define SIG_DFL ((__sighandler_t *)0) + SIG_DFL = 0 + // sys/sys/signal.h:140:#define SIG_IGN ((__sighandler_t *)1) + SIG_IGN = 1 +) diff --git a/vendor/modernc.org/libc/signal/more_openbsd_386.go b/vendor/modernc.org/libc/signal/more_openbsd_386.go new file mode 100644 index 00000000..c1791b2a --- /dev/null +++ b/vendor/modernc.org/libc/signal/more_openbsd_386.go @@ -0,0 +1,12 @@ +// Copyright 2020 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package signal + +const ( + // sys/sys/signal.h:139:#define SIG_DFL ((__sighandler_t *)0) + SIG_DFL = 0 + // sys/sys/signal.h:140:#define SIG_IGN ((__sighandler_t *)1) + SIG_IGN = 1 +) diff --git a/vendor/modernc.org/libc/signal/more_openbsd_arm64.go b/vendor/modernc.org/libc/signal/more_openbsd_arm64.go new file mode 100644 index 00000000..c1791b2a --- /dev/null +++ b/vendor/modernc.org/libc/signal/more_openbsd_arm64.go @@ -0,0 +1,12 @@ +// Copyright 2020 The Libc Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package signal + +const ( + // sys/sys/signal.h:139:#define SIG_DFL ((__sighandler_t *)0) + SIG_DFL = 0 + // sys/sys/signal.h:140:#define SIG_IGN ((__sighandler_t *)1) + SIG_IGN = 1 +) diff --git a/vendor/modernc.org/libc/signal/signal_darwin_amd64.go b/vendor/modernc.org/libc/signal/signal_darwin_amd64.go index e820a96b..2b6fd687 100644 --- a/vendor/modernc.org/libc/signal/signal_darwin_amd64.go +++ b/vendor/modernc.org/libc/signal/signal_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o signal/signal_darwin_amd64.go -pkgname signal', DO NOT EDIT. +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_darwin_amd64.go -pkgname signal', DO NOT EDIT. package signal @@ -15,157 +15,157 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUS_ADRALN = 1 - BUS_ADRERR = 2 - BUS_NOOP = 0 - BUS_OBJERR = 3 - CLD_CONTINUED = 6 - CLD_DUMPED = 3 - CLD_EXITED = 1 - CLD_KILLED = 2 - CLD_NOOP = 0 - CLD_STOPPED = 5 - CLD_TRAPPED = 4 - FPE_FLTDIV = 1 - FPE_FLTINV = 5 - FPE_FLTOVF = 2 - FPE_FLTRES = 4 - FPE_FLTSUB = 6 - FPE_FLTUND = 3 - FPE_INTDIV = 7 - FPE_INTOVF = 8 - FPE_NOOP = 0 - FP_CHOP = 3 - FP_PREC_24B = 0 - FP_PREC_53B = 2 - FP_PREC_64B = 3 - FP_RND_DOWN = 1 - FP_RND_NEAR = 0 - FP_RND_UP = 2 - FP_STATE_BYTES = 512 - ILL_BADSTK = 8 - ILL_COPROC = 7 - ILL_ILLADR = 5 - ILL_ILLOPC = 1 - ILL_ILLOPN = 4 - ILL_ILLTRP = 2 - ILL_NOOP = 0 - ILL_PRVOPC = 3 - ILL_PRVREG = 6 - MINSIGSTKSZ = 32768 - NSIG = 32 - POLL_ERR = 4 - POLL_HUP = 6 - POLL_IN = 1 - POLL_MSG = 3 - POLL_OUT = 2 - POLL_PRI = 5 - SA_64REGSET = 0x0200 - SA_NOCLDSTOP = 0x0008 - SA_NOCLDWAIT = 0x0020 - SA_NODEFER = 0x0010 - SA_ONSTACK = 0x0001 - SA_RESETHAND = 0x0004 - SA_RESTART = 0x0002 - SA_SIGINFO = 0x0040 - SA_USERSPACE_MASK = 127 - SA_USERTRAMP = 0x0100 - SEGV_ACCERR = 2 - SEGV_MAPERR = 1 - SEGV_NOOP = 0 - SIGABRT = 6 - SIGALRM = 14 - SIGBUS = 10 - SIGCHLD = 20 - SIGCONT = 19 - SIGEMT = 7 - SIGEV_NONE = 0 - SIGEV_SIGNAL = 1 - SIGEV_THREAD = 3 - SIGFPE = 8 - SIGHUP = 1 - SIGILL = 4 - SIGINFO = 29 - SIGINT = 2 - SIGIO = 23 - SIGIOT = 6 - SIGKILL = 9 - SIGPIPE = 13 - SIGPROF = 27 - SIGQUIT = 3 - SIGSEGV = 11 - SIGSTKSZ = 131072 - SIGSTOP = 17 - SIGSYS = 12 - SIGTERM = 15 - SIGTRAP = 5 - SIGTSTP = 18 - SIGTTIN = 21 - SIGTTOU = 22 - SIGURG = 16 - SIGUSR1 = 30 - SIGUSR2 = 31 - SIGVTALRM = 26 - SIGWINCH = 28 - SIGXCPU = 24 - SIGXFSZ = 25 - SIG_BLOCK = 1 - SIG_SETMASK = 3 - SIG_UNBLOCK = 2 - SI_ASYNCIO = 0x10004 - SI_MESGQ = 0x10005 - SI_QUEUE = 0x10002 - SI_TIMER = 0x10003 - SI_USER = 0x10001 - SS_DISABLE = 0x0004 - SS_ONSTACK = 0x0001 - SV_INTERRUPT = 2 - SV_NOCLDSTOP = 8 - SV_NODEFER = 16 - SV_ONSTACK = 1 - SV_RESETHAND = 4 - SV_SIGINFO = 64 - TRAP_BRKPT = 1 - TRAP_TRACE = 2 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_SIGNAL_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_I386_SIGNAL_H_ = 1 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MACH_I386__STRUCTS_H_ = 0 - X_MACH_MACHINE__STRUCTS_H_ = 0 - X_MCONTEXT_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_T = 0 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_SYS_SIGNAL_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USER_SIGNAL_H = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + BUS_ADRALN = 1 // signal.h:241:1: + BUS_ADRERR = 2 // signal.h:242:1: + BUS_NOOP = 0 // signal.h:239:1: + BUS_OBJERR = 3 // signal.h:243:1: + CLD_CONTINUED = 6 // signal.h:258:1: + CLD_DUMPED = 3 // signal.h:255:1: + CLD_EXITED = 1 // signal.h:253:1: + CLD_KILLED = 2 // signal.h:254:1: + CLD_NOOP = 0 // signal.h:251:1: + CLD_STOPPED = 5 // signal.h:257:1: + CLD_TRAPPED = 4 // signal.h:256:1: + FPE_FLTDIV = 1 // signal.h:221:1: + FPE_FLTINV = 5 // signal.h:225:1: + FPE_FLTOVF = 2 // signal.h:222:1: + FPE_FLTRES = 4 // signal.h:224:1: + FPE_FLTSUB = 6 // signal.h:226:1: + FPE_FLTUND = 3 // signal.h:223:1: + FPE_INTDIV = 7 // signal.h:227:1: + FPE_INTOVF = 8 // signal.h:228:1: + FPE_NOOP = 0 // signal.h:219:1: + FP_CHOP = 3 // _structs.h:112:1: + FP_PREC_24B = 0 // _structs.h:103:1: + FP_PREC_53B = 2 // _structs.h:104:1: + FP_PREC_64B = 3 // _structs.h:105:1: + FP_RND_DOWN = 1 // _structs.h:110:1: + FP_RND_NEAR = 0 // _structs.h:109:1: + FP_RND_UP = 2 // _structs.h:111:1: + FP_STATE_BYTES = 512 // _structs.h:276:1: + ILL_BADSTK = 8 // signal.h:215:1: + ILL_COPROC = 7 // signal.h:214:1: + ILL_ILLADR = 5 // signal.h:212:1: + ILL_ILLOPC = 1 // signal.h:208:1: + ILL_ILLOPN = 4 // signal.h:211:1: + ILL_ILLTRP = 2 // signal.h:209:1: + ILL_NOOP = 0 // signal.h:206:1: + ILL_PRVOPC = 3 // signal.h:210:1: + ILL_PRVREG = 6 // signal.h:213:1: + MINSIGSTKSZ = 32768 // signal.h:340:1: + NSIG = 32 // signal.h:79:1: + POLL_ERR = 4 // signal.h:264:1: + POLL_HUP = 6 // signal.h:266:1: + POLL_IN = 1 // signal.h:261:1: + POLL_MSG = 3 // signal.h:263:1: + POLL_OUT = 2 // signal.h:262:1: + POLL_PRI = 5 // signal.h:265:1: + SA_64REGSET = 0x0200 // signal.h:308:1: + SA_NOCLDSTOP = 0x0008 // signal.h:301:1: + SA_NOCLDWAIT = 0x0020 // signal.h:303:1: + SA_NODEFER = 0x0010 // signal.h:302:1: + SA_ONSTACK = 0x0001 // signal.h:298:1: + SA_RESETHAND = 0x0004 // signal.h:300:1: + SA_RESTART = 0x0002 // signal.h:299:1: + SA_SIGINFO = 0x0040 // signal.h:304:1: + SA_USERSPACE_MASK = 127 // signal.h:314:1: + SA_USERTRAMP = 0x0100 // signal.h:306:1: + SEGV_ACCERR = 2 // signal.h:235:1: + SEGV_MAPERR = 1 // signal.h:234:1: + SEGV_NOOP = 0 // signal.h:232:1: + SIGABRT = 6 // signal.h:89:1: + SIGALRM = 14 // signal.h:102:1: + SIGBUS = 10 // signal.h:98:1: + SIGCHLD = 20 // signal.h:108:1: + SIGCONT = 19 // signal.h:107:1: + SIGEMT = 7 // signal.h:94:1: + SIGEV_NONE = 0 // signal.h:164:1: + SIGEV_SIGNAL = 1 // signal.h:165:1: + SIGEV_THREAD = 3 // signal.h:166:1: + SIGFPE = 8 // signal.h:96:1: + SIGHUP = 1 // signal.h:84:1: + SIGILL = 4 // signal.h:87:1: + SIGINFO = 29 // signal.h:120:1: + SIGINT = 2 // signal.h:85:1: + SIGIO = 23 // signal.h:112:1: + SIGIOT = 6 // signal.h:93:1: + SIGKILL = 9 // signal.h:97:1: + SIGPIPE = 13 // signal.h:101:1: + SIGPROF = 27 // signal.h:117:1: + SIGQUIT = 3 // signal.h:86:1: + SIGSEGV = 11 // signal.h:99:1: + SIGSTKSZ = 131072 // signal.h:341:1: + SIGSTOP = 17 // signal.h:105:1: + SIGSYS = 12 // signal.h:100:1: + SIGTERM = 15 // signal.h:103:1: + SIGTRAP = 5 // signal.h:88:1: + SIGTSTP = 18 // signal.h:106:1: + SIGTTIN = 21 // signal.h:109:1: + SIGTTOU = 22 // signal.h:110:1: + SIGURG = 16 // signal.h:104:1: + SIGUSR1 = 30 // signal.h:122:1: + SIGUSR2 = 31 // signal.h:123:1: + SIGVTALRM = 26 // signal.h:116:1: + SIGWINCH = 28 // signal.h:119:1: + SIGXCPU = 24 // signal.h:114:1: + SIGXFSZ = 25 // signal.h:115:1: + SIG_BLOCK = 1 // signal.h:319:1: + SIG_SETMASK = 3 // signal.h:321:1: + SIG_UNBLOCK = 2 // signal.h:320:1: + SI_ASYNCIO = 0x10004 // signal.h:327:1: + SI_MESGQ = 0x10005 // signal.h:328:1: + SI_QUEUE = 0x10002 // signal.h:325:1: + SI_TIMER = 0x10003 // signal.h:326:1: + SI_USER = 0x10001 // signal.h:324:1: + SS_DISABLE = 0x0004 // signal.h:339:1: + SS_ONSTACK = 0x0001 // signal.h:338:1: + SV_INTERRUPT = 2 // signal.h:355:1: + SV_NOCLDSTOP = 8 // signal.h:358:1: + SV_NODEFER = 16 // signal.h:357:1: + SV_ONSTACK = 1 // signal.h:354:1: + SV_RESETHAND = 4 // signal.h:356:1: + SV_SIGINFO = 64 // signal.h:359:1: + TRAP_BRKPT = 1 // signal.h:246:1: + TRAP_TRACE = 2 // signal.h:247:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_SIGNAL_H_ = 0 // signal.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_I386_SIGNAL_H_ = 1 // signal.h:34:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MACH_I386__STRUCTS_H_ = 0 // _structs.h:33:1: + X_MACH_MACHINE__STRUCTS_H_ = 0 // _structs.h:30:1: + X_MCONTEXT_T = 0 // _mcontext.h:202:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:70:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USER_SIGNAL_H = 0 // signal.h:59:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/signal/signal_freebsd_386.go b/vendor/modernc.org/libc/signal/signal_freebsd_386.go index 36763cb2..fa9b0a7a 100644 --- a/vendor/modernc.org/libc/signal/signal_freebsd_386.go +++ b/vendor/modernc.org/libc/signal/signal_freebsd_386.go @@ -676,8 +676,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/signal/signal_freebsd_amd64.go b/vendor/modernc.org/libc/signal/signal_freebsd_amd64.go index 8a93ad3b..ef0ef33a 100644 --- a/vendor/modernc.org/libc/signal/signal_freebsd_amd64.go +++ b/vendor/modernc.org/libc/signal/signal_freebsd_amd64.go @@ -139,9 +139,9 @@ const ( X_MC_HASBASES = 0x2 // ucontext.h:102:1: X_MC_HASFPXSTATE = 0x4 // ucontext.h:103:1: X_MC_HASSEGS = 0x1 // ucontext.h:101:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_PID_T_DECLARED = 0 // signal.h:61:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: X_SIGNAL_H_ = 0 // signal.h:36:1: @@ -160,7 +160,7 @@ const ( X_UID_T_DECLARED = 0 // signal.h:62:1: X_X86_SIGNAL_H = 1 // signal.h:37:1: X_X86_UCONTEXT_H_ = 0 // ucontext.h:35:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -430,12 +430,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -678,8 +681,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/signal/signal_freebsd_arm.go b/vendor/modernc.org/libc/signal/signal_freebsd_arm.go new file mode 100644 index 00000000..30ee43bc --- /dev/null +++ b/vendor/modernc.org/libc/signal/signal_freebsd_arm.go @@ -0,0 +1,1414 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_freebsd_arm.go -pkgname signal', DO NOT EDIT. + +package signal + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BUS_ADRALN = 1 // signal.h:315:1: + BUS_ADRERR = 2 // signal.h:316:1: + BUS_OBJERR = 3 // signal.h:317:1: + BUS_OOMERR = 100 // signal.h:318:1: + CLD_CONTINUED = 6 // signal.h:350:1: + CLD_DUMPED = 3 // signal.h:346:1: + CLD_EXITED = 1 // signal.h:343:1: + CLD_KILLED = 2 // signal.h:344:1: + CLD_STOPPED = 5 // signal.h:349:1: + CLD_TRAPPED = 4 // signal.h:348:1: + FPE_FLTDIV = 3 // signal.h:329:1: + FPE_FLTINV = 7 // signal.h:333:1: + FPE_FLTOVF = 4 // signal.h:330:1: + FPE_FLTRES = 6 // signal.h:332:1: + FPE_FLTSUB = 8 // signal.h:334:1: + FPE_FLTUND = 5 // signal.h:331:1: + FPE_INTDIV = 2 // signal.h:328:1: + FPE_INTOVF = 1 // signal.h:327:1: + ILL_BADSTK = 8 // signal.h:312:1: + ILL_COPROC = 7 // signal.h:311:1: + ILL_ILLADR = 3 // signal.h:307:1: + ILL_ILLOPC = 1 // signal.h:305:1: + ILL_ILLOPN = 2 // signal.h:306:1: + ILL_ILLTRP = 4 // signal.h:308:1: + ILL_PRVOPC = 5 // signal.h:309:1: + ILL_PRVREG = 6 // signal.h:310:1: + MINSIGSTKSZ = 4096 // signal.h:432:1: + NSIG = 32 // signal.h:399:1: + POLL_ERR = 4 // signal.h:356:1: + POLL_HUP = 6 // signal.h:358:1: + POLL_IN = 1 // signal.h:353:1: + POLL_MSG = 3 // signal.h:355:1: + POLL_OUT = 2 // signal.h:354:1: + POLL_PRI = 5 // signal.h:357:1: + SA_NOCLDSTOP = 0x0008 // signal.h:386:1: + SA_NOCLDWAIT = 0x0020 // signal.h:394:1: + SA_NODEFER = 0x0010 // signal.h:393:1: + SA_ONSTACK = 0x0001 // signal.h:390:1: + SA_RESETHAND = 0x0004 // signal.h:392:1: + SA_RESTART = 0x0002 // signal.h:391:1: + SA_SIGINFO = 0x0040 // signal.h:395:1: + SEGV_ACCERR = 2 // signal.h:322:1: + SEGV_MAPERR = 1 // signal.h:321:1: + SEGV_PKUERR = 100 // signal.h:324:1: + SIGABRT = 6 // signal.h:81:1: + SIGALRM = 14 // signal.h:99:1: + SIGBUS = 10 // signal.h:91:1: + SIGCHLD = 20 // signal.h:109:1: + SIGCONT = 19 // signal.h:108:1: + SIGEMT = 7 // signal.h:84:1: + SIGEV_KEVENT = 3 // signal.h:222:1: + SIGEV_NONE = 0 // signal.h:218:1: + SIGEV_SIGNAL = 1 // signal.h:219:1: + SIGEV_THREAD = 2 // signal.h:220:1: + SIGEV_THREAD_ID = 4 // signal.h:223:1: + SIGFPE = 8 // signal.h:86:1: + SIGHUP = 1 // signal.h:71:1: + SIGILL = 4 // signal.h:77:1: + SIGINFO = 29 // signal.h:124:1: + SIGINT = 2 // signal.h:73:1: + SIGIO = 23 // signal.h:114:1: + SIGIOT = 6 // signal.h:83:1: + SIGKILL = 9 // signal.h:88:1: + SIGLIBRT = 33 // signal.h:133:1: + SIGLWP = 32 // signal.h:132:1: + SIGPIPE = 13 // signal.h:98:1: + SIGPROF = 27 // signal.h:120:1: + SIGQUIT = 3 // signal.h:75:1: + SIGRTMAX = 126 // signal.h:137:1: + SIGRTMIN = 65 // signal.h:136:1: + SIGSEGV = 11 // signal.h:93:1: + SIGSTKSZ = 36864 // signal.h:433:1: + SIGSTOP = 17 // signal.h:106:1: + SIGSYS = 12 // signal.h:95:1: + SIGTERM = 15 // signal.h:101:1: + SIGTHR = 32 // signal.h:131:1: + SIGTRAP = 5 // signal.h:79:1: + SIGTSTP = 18 // signal.h:107:1: + SIGTTIN = 21 // signal.h:110:1: + SIGTTOU = 22 // signal.h:111:1: + SIGURG = 16 // signal.h:103:1: + SIGUSR1 = 30 // signal.h:127:1: + SIGUSR2 = 31 // signal.h:128:1: + SIGVTALRM = 26 // signal.h:119:1: + SIGWINCH = 28 // signal.h:123:1: + SIGXCPU = 24 // signal.h:117:1: + SIGXFSZ = 25 // signal.h:118:1: + SIG_BLOCK = 1 // signal.h:501:1: + SIG_SETMASK = 3 // signal.h:503:1: + SIG_UNBLOCK = 2 // signal.h:502:1: + SI_ASYNCIO = 0x10004 // signal.h:408:1: + SI_KERNEL = 0x10006 // signal.h:412:1: + SI_LWP = 0x10007 // signal.h:413:1: + SI_MESGQ = 0x10005 // signal.h:410:1: + SI_NOINFO = 0 // signal.h:403:1: + SI_QUEUE = 0x10002 // signal.h:405:1: + SI_TIMER = 0x10003 // signal.h:406:1: + SI_UNDEFINED = 0 // signal.h:416:1: + SI_USER = 0x10001 // signal.h:404:1: + SS_DISABLE = 0x0004 // signal.h:431:1: + SS_ONSTACK = 0x0001 // signal.h:430:1: + SV_INTERRUPT = 2 // signal.h:459:1: + SV_NOCLDSTOP = 8 // signal.h:462:1: + SV_NODEFER = 16 // signal.h:461:1: + SV_ONSTACK = 1 // signal.h:458:1: + SV_RESETHAND = 4 // signal.h:460:1: + SV_SIGINFO = 64 // signal.h:463:1: + TRAP_BRKPT = 1 // signal.h:337:1: + TRAP_CAP = 4 // signal.h:340:1: + TRAP_DTRACE = 3 // signal.h:339:1: + TRAP_TRACE = 2 // signal.h:338:1: + UC_ = 0 // ucontext.h:88:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE_MCONTEXT_H_ = 0 // ucontext.h:37:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:38:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_NGREG = 17 // ucontext.h:41:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PID_T_DECLARED = 0 // signal.h:61:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_REG_CPSR = 16 // ucontext.h:61:1: + X_REG_FP = 11 // ucontext.h:63:1: + X_REG_LR = 14 // ucontext.h:65:1: + X_REG_PC = 15 // ucontext.h:66:1: + X_REG_R0 = 0 // ucontext.h:45:1: + X_REG_R1 = 1 // ucontext.h:46:1: + X_REG_R10 = 10 // ucontext.h:55:1: + X_REG_R11 = 11 // ucontext.h:56:1: + X_REG_R12 = 12 // ucontext.h:57:1: + X_REG_R13 = 13 // ucontext.h:58:1: + X_REG_R14 = 14 // ucontext.h:59:1: + X_REG_R15 = 15 // ucontext.h:60:1: + X_REG_R2 = 2 // ucontext.h:47:1: + X_REG_R3 = 3 // ucontext.h:48:1: + X_REG_R4 = 4 // ucontext.h:49:1: + X_REG_R5 = 5 // ucontext.h:50:1: + X_REG_R6 = 6 // ucontext.h:51:1: + X_REG_R7 = 7 // ucontext.h:52:1: + X_REG_R8 = 8 // ucontext.h:53:1: + X_REG_R9 = 9 // ucontext.h:54:1: + X_REG_SP = 13 // ucontext.h:64:1: + X_SIGNAL_H_ = 0 // signal.h:36:1: + X_SIGSET_T_DECLARED = 0 // signal.h:165:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // signal.h:57:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_SYS__UCONTEXT_H_ = 0 // _ucontext.h:34:1: + X_TIME_T_DECLARED = 0 // _timespec.h:43:1: + X_UID_T_DECLARED = 0 // signal.h:62:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// 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. +// +// @(#)signal.h 8.3 (Berkeley) 3/30/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and long longs are the same size. Ensure they stay in sync. + +// Minimum signal stack size. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1986, 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. +// +// @(#)signal.h 8.1 (Berkeley) 6/11/93 +// from: FreeBSD: src/sys/i386/include/signal.h,v 1.13 2000/11/09 +// from: FreeBSD: src/sys/sparc64/include/signal.h,v 1.6 2001/09/30 18:52:17 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +type Sig_atomic_t = int32 /* signal.h:42:14 */ + +type Sigcontext = struct{ F_dummy int32 } /* signal.h:46:1 */ + +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Time_t = X__time_t /* _timespec.h:42:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +type Uid_t = X__uid_t /* signal.h:61:18 */ + +type Sigset_t = X__sigset_t /* signal.h:166:20 */ + +type Sigval = struct{ Fsival_int int32 } /* signal.h:171:1 */ + +type Sigevent = struct { + Fsigev_notify int32 + Fsigev_signo int32 + Fsigev_value struct{ Fsival_int int32 } + F_sigev_un struct { + F_threadid X__lwpid_t + F__ccgo_pad1 [28]byte + } +} /* signal.h:195:1 */ + +type X__siginfo = struct { + Fsi_signo int32 + Fsi_errno int32 + Fsi_code int32 + Fsi_pid X__pid_t + Fsi_uid X__uid_t + Fsi_status int32 + Fsi_addr uintptr + Fsi_value struct{ Fsival_int int32 } + F_reason struct { + F_fault struct{ F_trapno int32 } + F__ccgo_pad1 [28]byte + } +} /* signal.h:229:9 */ + +type Siginfo_t = X__siginfo /* signal.h:263:3 */ + +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F__sigaction_u struct{ F__sa_handler uintptr } + Fsa_flags int32 + Fsa_mask Sigset_t +} /* signal.h:368:1 */ + +// If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. + +// a timer set by timer_settime(). +// an asynchronous I/O request. +// message on an empty message queue. + +type Sig_t = uintptr /* signal.h:420:24 */ + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size X__size_t + Fss_flags int32 +} /* signal.h:428:9 */ + +type Stack_t = Sigaltstack /* signal.h:428:26 */ + +// 4.3 compatibility: +// Signal vector "template" used in sigvec call. +type Sigvec = struct { + Fsv_handler uintptr + Fsv_mask int32 + Fsv_flags int32 +} /* signal.h:452:1 */ + +// Keep this in one place only + +// Structure used in sigstack call. +type Sigstack = struct { + Fss_sp uintptr + Fss_onstack int32 +} /* signal.h:479:1 */ + +// $NetBSD: mcontext.h,v 1.4 2003/10/08 22:43:01 thorpej Exp $ + +// - +// SPDX-License-Identifier: BSD-2-Clause-NetBSD +// +// Copyright (c) 2001, 2002 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 of Wasabi Systems, 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. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// General register state +type X__greg_t = uint32 /* ucontext.h:42:22 */ +type X__gregset_t = [17]X__greg_t /* ucontext.h:43:18 */ + +// Convenience synonyms + +// Floating point register state +type Mcontext_vfp_t = struct { + Fmcv_reg [32]X__uint64_t + Fmcv_fpscr X__uint32_t + F__ccgo_pad1 [4]byte +} /* ucontext.h:74:3 */ + +type Mcontext_t = struct { + F__gregs X__gregset_t + Fmc_vfp_size X__size_t + Fmc_vfp_ptr uintptr + Fmc_spare [33]uint32 +} /* ucontext.h:86:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1999 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer +// in this position and unchanged. +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +type X__ucontext = struct { + Fuc_sigmask X__sigset_t + Fuc_mcontext Mcontext_t + Fuc_link uintptr + Fuc_stack struct { + Fss_sp uintptr + Fss_size X__size_t + Fss_flags int32 + } + Fuc_flags int32 + F__spare__ [4]int32 +} /* _ucontext.h:36:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1999 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer +// in this position and unchanged. +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +type Ucontext_t = X__ucontext /* _ucontext.h:52:3 */ + +type Pid_t = X__pid_t /* signal.h:60:18 */ // XXX +type X__pthread_t = uintptr /* signal.h:67:24 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/signal_freebsd_arm64.go b/vendor/modernc.org/libc/signal/signal_freebsd_arm64.go new file mode 100644 index 00000000..ef0ef33a --- /dev/null +++ b/vendor/modernc.org/libc/signal/signal_freebsd_arm64.go @@ -0,0 +1,1624 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_freebsd_amd64.go -pkgname signal', DO NOT EDIT. + +package signal + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BUS_ADRALN = 1 // signal.h:315:1: + BUS_ADRERR = 2 // signal.h:316:1: + BUS_OBJERR = 3 // signal.h:317:1: + BUS_OOMERR = 100 // signal.h:318:1: + CLD_CONTINUED = 6 // signal.h:350:1: + CLD_DUMPED = 3 // signal.h:346:1: + CLD_EXITED = 1 // signal.h:343:1: + CLD_KILLED = 2 // signal.h:344:1: + CLD_STOPPED = 5 // signal.h:349:1: + CLD_TRAPPED = 4 // signal.h:348:1: + FPE_FLTDIV = 3 // signal.h:329:1: + FPE_FLTINV = 7 // signal.h:333:1: + FPE_FLTOVF = 4 // signal.h:330:1: + FPE_FLTRES = 6 // signal.h:332:1: + FPE_FLTSUB = 8 // signal.h:334:1: + FPE_FLTUND = 5 // signal.h:331:1: + FPE_INTDIV = 2 // signal.h:328:1: + FPE_INTOVF = 1 // signal.h:327:1: + ILL_BADSTK = 8 // signal.h:312:1: + ILL_COPROC = 7 // signal.h:311:1: + ILL_ILLADR = 3 // signal.h:307:1: + ILL_ILLOPC = 1 // signal.h:305:1: + ILL_ILLOPN = 2 // signal.h:306:1: + ILL_ILLTRP = 4 // signal.h:308:1: + ILL_PRVOPC = 5 // signal.h:309:1: + ILL_PRVREG = 6 // signal.h:310:1: + MINSIGSTKSZ = 2048 // signal.h:432:1: + NSIG = 32 // signal.h:399:1: + POLL_ERR = 4 // signal.h:356:1: + POLL_HUP = 6 // signal.h:358:1: + POLL_IN = 1 // signal.h:353:1: + POLL_MSG = 3 // signal.h:355:1: + POLL_OUT = 2 // signal.h:354:1: + POLL_PRI = 5 // signal.h:357:1: + SA_NOCLDSTOP = 0x0008 // signal.h:386:1: + SA_NOCLDWAIT = 0x0020 // signal.h:394:1: + SA_NODEFER = 0x0010 // signal.h:393:1: + SA_ONSTACK = 0x0001 // signal.h:390:1: + SA_RESETHAND = 0x0004 // signal.h:392:1: + SA_RESTART = 0x0002 // signal.h:391:1: + SA_SIGINFO = 0x0040 // signal.h:395:1: + SEGV_ACCERR = 2 // signal.h:322:1: + SEGV_MAPERR = 1 // signal.h:321:1: + SEGV_PKUERR = 100 // signal.h:324:1: + SIGABRT = 6 // signal.h:81:1: + SIGALRM = 14 // signal.h:99:1: + SIGBUS = 10 // signal.h:91:1: + SIGCHLD = 20 // signal.h:109:1: + SIGCONT = 19 // signal.h:108:1: + SIGEMT = 7 // signal.h:84:1: + SIGEV_KEVENT = 3 // signal.h:222:1: + SIGEV_NONE = 0 // signal.h:218:1: + SIGEV_SIGNAL = 1 // signal.h:219:1: + SIGEV_THREAD = 2 // signal.h:220:1: + SIGEV_THREAD_ID = 4 // signal.h:223:1: + SIGFPE = 8 // signal.h:86:1: + SIGHUP = 1 // signal.h:71:1: + SIGILL = 4 // signal.h:77:1: + SIGINFO = 29 // signal.h:124:1: + SIGINT = 2 // signal.h:73:1: + SIGIO = 23 // signal.h:114:1: + SIGIOT = 6 // signal.h:83:1: + SIGKILL = 9 // signal.h:88:1: + SIGLIBRT = 33 // signal.h:133:1: + SIGLWP = 32 // signal.h:132:1: + SIGPIPE = 13 // signal.h:98:1: + SIGPROF = 27 // signal.h:120:1: + SIGQUIT = 3 // signal.h:75:1: + SIGRTMAX = 126 // signal.h:137:1: + SIGRTMIN = 65 // signal.h:136:1: + SIGSEGV = 11 // signal.h:93:1: + SIGSTKSZ = 34816 // signal.h:433:1: + SIGSTOP = 17 // signal.h:106:1: + SIGSYS = 12 // signal.h:95:1: + SIGTERM = 15 // signal.h:101:1: + SIGTHR = 32 // signal.h:131:1: + SIGTRAP = 5 // signal.h:79:1: + SIGTSTP = 18 // signal.h:107:1: + SIGTTIN = 21 // signal.h:110:1: + SIGTTOU = 22 // signal.h:111:1: + SIGURG = 16 // signal.h:103:1: + SIGUSR1 = 30 // signal.h:127:1: + SIGUSR2 = 31 // signal.h:128:1: + SIGVTALRM = 26 // signal.h:119:1: + SIGWINCH = 28 // signal.h:123:1: + SIGXCPU = 24 // signal.h:117:1: + SIGXFSZ = 25 // signal.h:118:1: + SIG_BLOCK = 1 // signal.h:501:1: + SIG_SETMASK = 3 // signal.h:503:1: + SIG_UNBLOCK = 2 // signal.h:502:1: + SI_ASYNCIO = 0x10004 // signal.h:408:1: + SI_KERNEL = 0x10006 // signal.h:412:1: + SI_LWP = 0x10007 // signal.h:413:1: + SI_MESGQ = 0x10005 // signal.h:410:1: + SI_NOINFO = 0 // signal.h:403:1: + SI_QUEUE = 0x10002 // signal.h:405:1: + SI_TIMER = 0x10003 // signal.h:406:1: + SI_UNDEFINED = 0 // signal.h:416:1: + SI_USER = 0x10001 // signal.h:404:1: + SS_DISABLE = 0x0004 // signal.h:431:1: + SS_ONSTACK = 0x0001 // signal.h:430:1: + SV_INTERRUPT = 2 // signal.h:459:1: + SV_NOCLDSTOP = 8 // signal.h:462:1: + SV_NODEFER = 16 // signal.h:461:1: + SV_ONSTACK = 1 // signal.h:458:1: + SV_RESETHAND = 4 // signal.h:460:1: + SV_SIGINFO = 64 // signal.h:463:1: + TRAP_BRKPT = 1 // signal.h:337:1: + TRAP_CAP = 4 // signal.h:340:1: + TRAP_DTRACE = 3 // signal.h:339:1: + TRAP_TRACE = 2 // signal.h:338:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MC_FLAG_MASK = 7 // ucontext.h:104:1: + X_MC_FPFMT_NODEV = 0x10000 // ucontext.h:145:1: + X_MC_FPFMT_XMM = 0x10002 // ucontext.h:146:1: + X_MC_FPOWNED_FPU = 0x20001 // ucontext.h:149:1: + X_MC_FPOWNED_NONE = 0x20000 // ucontext.h:148:1: + X_MC_FPOWNED_PCB = 0x20002 // ucontext.h:150:1: + X_MC_HASBASES = 0x2 // ucontext.h:102:1: + X_MC_HASFPXSTATE = 0x4 // ucontext.h:103:1: + X_MC_HASSEGS = 0x1 // ucontext.h:101:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PID_T_DECLARED = 0 // signal.h:61:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_SIGNAL_H_ = 0 // signal.h:36:1: + X_SIGSET_T_DECLARED = 0 // signal.h:165:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // signal.h:57:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_SYS__UCONTEXT_H_ = 0 // _ucontext.h:34:1: + X_TIME_T_DECLARED = 0 // _timespec.h:43:1: + X_UID_T_DECLARED = 0 // signal.h:62:1: + X_X86_SIGNAL_H = 1 // signal.h:37:1: + X_X86_UCONTEXT_H_ = 0 // ucontext.h:35:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// 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. +// +// @(#)signal.h 8.3 (Berkeley) 3/30/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// Copyright (c) 2003 Peter Wemm. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.1 (Berkeley) 6/11/93 +// $FreeBSD$ + +// Machine-dependent signal definitions + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +type Sig_atomic_t = int64 /* signal.h:101:14 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. +// +// The sequence of the fields/registers after sc_mask in struct +// sigcontext must match those in mcontext_t and struct trapframe. +type Sigcontext = struct { + Fsc_mask struct{ F__bits [4]X__uint32_t } + Fsc_onstack int64 + Fsc_rdi int64 + Fsc_rsi int64 + Fsc_rdx int64 + Fsc_rcx int64 + Fsc_r8 int64 + Fsc_r9 int64 + Fsc_rax int64 + Fsc_rbx int64 + Fsc_rbp int64 + Fsc_r10 int64 + Fsc_r11 int64 + Fsc_r12 int64 + Fsc_r13 int64 + Fsc_r14 int64 + Fsc_r15 int64 + Fsc_trapno int32 + Fsc_fs int16 + Fsc_gs int16 + Fsc_addr int64 + Fsc_flags int32 + Fsc_es int16 + Fsc_ds int16 + Fsc_err int64 + Fsc_rip int64 + Fsc_cs int64 + Fsc_rflags int64 + Fsc_rsp int64 + Fsc_ss int64 + Fsc_len int64 + Fsc_fpformat int64 + Fsc_ownedfp int64 + Fsc_fpstate [64]int64 + Fsc_fsbase int64 + Fsc_gsbase int64 + Fsc_xfpustate int64 + Fsc_xfpustate_len int64 + Fsc_spare [4]int64 +} /* signal.h:114:1 */ + +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Time_t = X__time_t /* _timespec.h:42:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +type Uid_t = X__uid_t /* signal.h:61:18 */ + +type Sigset_t = X__sigset_t /* signal.h:166:20 */ + +type Sigval = struct { + F__ccgo_pad1 [0]uint64 + Fsival_int int32 + F__ccgo_pad2 [4]byte +} /* signal.h:171:1 */ + +type Sigevent = struct { + Fsigev_notify int32 + Fsigev_signo int32 + Fsigev_value struct { + F__ccgo_pad1 [0]uint64 + Fsival_int int32 + F__ccgo_pad2 [4]byte + } + F_sigev_un struct { + F__ccgo_pad1 [0]uint64 + F_threadid X__lwpid_t + F__ccgo_pad2 [60]byte + } +} /* signal.h:195:1 */ + +type X__siginfo = struct { + Fsi_signo int32 + Fsi_errno int32 + Fsi_code int32 + Fsi_pid X__pid_t + Fsi_uid X__uid_t + Fsi_status int32 + Fsi_addr uintptr + Fsi_value struct { + F__ccgo_pad1 [0]uint64 + Fsival_int int32 + F__ccgo_pad2 [4]byte + } + F_reason struct { + F__ccgo_pad1 [0]uint64 + F_fault struct{ F_trapno int32 } + F__ccgo_pad2 [36]byte + } +} /* signal.h:229:9 */ + +type Siginfo_t = X__siginfo /* signal.h:263:3 */ + +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F__sigaction_u struct{ F__sa_handler uintptr } + Fsa_flags int32 + Fsa_mask Sigset_t + F__ccgo_pad1 [4]byte +} /* signal.h:368:1 */ + +// If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. + +// a timer set by timer_settime(). +// an asynchronous I/O request. +// message on an empty message queue. + +type Sig_t = uintptr /* signal.h:420:24 */ + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size X__size_t + Fss_flags int32 + F__ccgo_pad1 [4]byte +} /* signal.h:428:9 */ + +type Stack_t = Sigaltstack /* signal.h:428:26 */ + +// 4.3 compatibility: +// Signal vector "template" used in sigvec call. +type Sigvec = struct { + Fsv_handler uintptr + Fsv_mask int32 + Fsv_flags int32 +} /* signal.h:452:1 */ + +// Keep this in one place only + +// Structure used in sigstack call. +type Sigstack = struct { + Fss_sp uintptr + Fss_onstack int32 + F__ccgo_pad1 [4]byte +} /* signal.h:479:1 */ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2003 Peter Wemm +// Copyright (c) 1999 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer +// in this position and unchanged. +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// mc_flags bits. Shall be in sync with TF_XXX. + +type X__mcontext = struct { + Fmc_onstack X__register_t + Fmc_rdi X__register_t + Fmc_rsi X__register_t + Fmc_rdx X__register_t + Fmc_rcx X__register_t + Fmc_r8 X__register_t + Fmc_r9 X__register_t + Fmc_rax X__register_t + Fmc_rbx X__register_t + Fmc_rbp X__register_t + Fmc_r10 X__register_t + Fmc_r11 X__register_t + Fmc_r12 X__register_t + Fmc_r13 X__register_t + Fmc_r14 X__register_t + Fmc_r15 X__register_t + Fmc_trapno X__uint32_t + Fmc_fs X__uint16_t + Fmc_gs X__uint16_t + Fmc_addr X__register_t + Fmc_flags X__uint32_t + Fmc_es X__uint16_t + Fmc_ds X__uint16_t + Fmc_err X__register_t + Fmc_rip X__register_t + Fmc_cs X__register_t + Fmc_rflags X__register_t + Fmc_rsp X__register_t + Fmc_ss X__register_t + Fmc_len int64 + Fmc_fpformat int64 + Fmc_ownedfp int64 + Fmc_fpstate [64]int64 + Fmc_fsbase X__register_t + Fmc_gsbase X__register_t + Fmc_xfpustate X__register_t + Fmc_xfpustate_len X__register_t + Fmc_spare [4]int64 +} /* ucontext.h:106:9 */ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2003 Peter Wemm +// Copyright (c) 1999 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer +// in this position and unchanged. +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// mc_flags bits. Shall be in sync with TF_XXX. + +type Mcontext_t = X__mcontext /* ucontext.h:164:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1999 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer +// in this position and unchanged. +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +type X__ucontext = struct { + Fuc_sigmask X__sigset_t + Fuc_mcontext Mcontext_t + Fuc_link uintptr + Fuc_stack struct { + Fss_sp uintptr + Fss_size X__size_t + Fss_flags int32 + F__ccgo_pad1 [4]byte + } + Fuc_flags int32 + F__spare__ [4]int32 + F__ccgo_pad1 [4]byte +} /* _ucontext.h:36:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1999 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer +// in this position and unchanged. +// 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. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +type Ucontext_t = X__ucontext /* _ucontext.h:52:3 */ + +type Pid_t = X__pid_t /* signal.h:60:18 */ // XXX +type X__pthread_t = uintptr /* signal.h:67:24 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/signal_linux_386.go b/vendor/modernc.org/libc/signal/signal_linux_386.go index b595fb32..89bd02f2 100644 --- a/vendor/modernc.org/libc/signal/signal_linux_386.go +++ b/vendor/modernc.org/libc/signal/signal_linux_386.go @@ -214,7 +214,8 @@ const ( /* siginfo-consts.h:189:1: */ // Architecture-specific adjustments to siginfo_t. x86 version. // Values for `si_code'. Positive values are reserved for kernel-generated -// signals. +// +// signals. const ( /* siginfo-consts.h:35:1: */ SI_ASYNCNL = -60 // Sent by asynch name lookup completion. SI_DETHREAD = -7 // Sent by execve killing subsidiary @@ -978,7 +979,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -989,13 +991,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Signal number definitions. Linux version. @@ -1091,7 +1095,8 @@ type X__time64_t = X__int64_t /* types.h:222:28 */ // Never include this file directly; use <sys/types.h> instead. // An integral type that can be modified atomically, without the -// possibility of a signal arriving in the middle of the operation. +// +// possibility of a signal arriving in the middle of the operation. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ type X__sigset_t = struct{ F__val [32]uint32 } /* __sigset_t.h:8:3 */ @@ -1159,7 +1164,8 @@ type Uid_t = X__uid_t /* signal.h:46:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2097,18 +2103,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -2125,7 +2134,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2137,7 +2147,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 diff --git a/vendor/modernc.org/libc/signal/signal_linux_amd64.go b/vendor/modernc.org/libc/signal/signal_linux_amd64.go index ada50c83..b7cdcd8e 100644 --- a/vendor/modernc.org/libc/signal/signal_linux_amd64.go +++ b/vendor/modernc.org/libc/signal/signal_linux_amd64.go @@ -212,7 +212,8 @@ const ( /* siginfo-consts.h:189:1: */ // Architecture-specific adjustments to siginfo_t. x86 version. // Values for `si_code'. Positive values are reserved for kernel-generated -// signals. +// +// signals. const ( /* siginfo-consts.h:35:1: */ SI_ASYNCNL = -60 // Sent by asynch name lookup completion. SI_DETHREAD = -7 // Sent by execve killing subsidiary @@ -996,7 +997,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1007,8 +1009,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1108,7 +1111,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // Never include this file directly; use <sys/types.h> instead. // An integral type that can be modified atomically, without the -// possibility of a signal arriving in the middle of the operation. +// +// possibility of a signal arriving in the middle of the operation. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ @@ -1176,7 +1180,8 @@ type Uid_t = X__uid_t /* signal.h:46:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2115,18 +2120,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -2143,7 +2151,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2155,7 +2164,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 diff --git a/vendor/modernc.org/libc/signal/signal_linux_arm.go b/vendor/modernc.org/libc/signal/signal_linux_arm.go index 74b0ed42..c207b6f2 100644 --- a/vendor/modernc.org/libc/signal/signal_linux_arm.go +++ b/vendor/modernc.org/libc/signal/signal_linux_arm.go @@ -209,7 +209,8 @@ const ( /* siginfo-consts.h:189:1: */ // Architecture-specific adjustments to siginfo_t. // Values for `si_code'. Positive values are reserved for kernel-generated -// signals. +// +// signals. const ( /* siginfo-consts.h:35:1: */ SI_ASYNCNL = -60 // Sent by asynch name lookup completion. SI_DETHREAD = -7 // Sent by execve killing subsidiary @@ -1054,7 +1055,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1065,13 +1067,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Signal number definitions. Linux version. @@ -1167,7 +1171,8 @@ type X__time64_t = X__int64_t /* types.h:222:28 */ // Never include this file directly; use <sys/types.h> instead. // An integral type that can be modified atomically, without the -// possibility of a signal arriving in the middle of the operation. +// +// possibility of a signal arriving in the middle of the operation. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ type X__sigset_t = struct{ F__val [32]uint32 } /* __sigset_t.h:8:3 */ @@ -1235,7 +1240,8 @@ type Uid_t = X__uid_t /* signal.h:46:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1739,9 +1745,10 @@ type X_libc_fpstate = struct { type Fpregset_t = X_libc_fpstate /* ucontext.h:99:30 */ // Context to describe whole processor state. This only describes -// the core registers; coprocessor registers get saved elsewhere -// (e.g. in uc_regspace, or somewhere unspecified on the stack -// during non-RT signal handlers). +// +// the core registers; coprocessor registers get saved elsewhere +// (e.g. in uc_regspace, or somewhere unspecified on the stack +// during non-RT signal handlers). type Mcontext_t = struct { Ftrap_no uint32 Ferror_code uint32 @@ -2137,18 +2144,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2165,7 +2175,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2177,7 +2188,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 diff --git a/vendor/modernc.org/libc/signal/signal_linux_arm64.go b/vendor/modernc.org/libc/signal/signal_linux_arm64.go index 8755d730..e50ee6de 100644 --- a/vendor/modernc.org/libc/signal/signal_linux_arm64.go +++ b/vendor/modernc.org/libc/signal/signal_linux_arm64.go @@ -239,7 +239,8 @@ const ( /* siginfo-consts.h:189:1: */ // Architecture-specific adjustments to siginfo_t. // Values for `si_code'. Positive values are reserved for kernel-generated -// signals. +// +// signals. const ( /* siginfo-consts.h:35:1: */ SI_ASYNCNL = -60 // Sent by asynch name lookup completion. SI_DETHREAD = -7 // Sent by execve killing subsidiary @@ -1102,7 +1103,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1113,8 +1115,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1214,7 +1217,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // Never include this file directly; use <sys/types.h> instead. // An integral type that can be modified atomically, without the -// possibility of a signal arriving in the middle of the operation. +// +// possibility of a signal arriving in the middle of the operation. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ @@ -1282,7 +1286,8 @@ type Uid_t = X__uid_t /* signal.h:46:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2188,7 +2193,8 @@ type Time_t = X__time_t /* time_t.h:7:18 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -2297,14 +2303,16 @@ type Fd_mask = X__fd_mask /* select.h:77:19 */ // Define some inlines helping to catch common problems. // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t @@ -2944,18 +2952,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -2975,7 +2986,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2987,7 +2999,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -3055,9 +3068,10 @@ type User_fpsimd_struct = struct { type Elf_greg_t = X__uint64_t /* procfs.h:25:20 */ // And the whole bunch of them. We could have used `struct -// pt_regs' directly in the typedef, but tradition says that -// the register set is an array, which does have some peculiar -// semantics, so leave it that way. +// +// pt_regs' directly in the typedef, but tradition says that +// the register set is an array, which does have some peculiar +// semantics, so leave it that way. type Elf_gregset_t = [34]Elf_greg_t /* procfs.h:32:20 */ // Register set for the floating-point registers. @@ -3187,7 +3201,8 @@ type Prgregset_t = X__prgregset_t /* procfs.h:109:23 */ type Prfpregset_t = X__prfpregset_t /* procfs.h:110:24 */ // We don't have any differences between processes and threads, -// therefore have only one PID type. +// +// therefore have only one PID type. type Lwpid_t = X__pid_t /* procfs.h:114:17 */ // Process status and info. In the end we do provide typedefs for them. @@ -3224,9 +3239,10 @@ type Gregset_t = Elf_gregset_t /* ucontext.h:42:23 */ type Fpregset_t = Elf_fpregset_t /* ucontext.h:45:24 */ // Context to describe whole processor state. This only describes -// the core registers; coprocessor registers get saved elsewhere -// (e.g. in uc_regspace, or somewhere unspecified on the stack -// during non-RT signal handlers). +// +// the core registers; coprocessor registers get saved elsewhere +// (e.g. in uc_regspace, or somewhere unspecified on the stack +// during non-RT signal handlers). type Mcontext_t = struct { Ffault_address uint64 Fregs [31]uint64 diff --git a/vendor/modernc.org/libc/signal/signal_linux_ppc64le.go b/vendor/modernc.org/libc/signal/signal_linux_ppc64le.go index 9a05772b..41b5c9c1 100644 --- a/vendor/modernc.org/libc/signal/signal_linux_ppc64le.go +++ b/vendor/modernc.org/libc/signal/signal_linux_ppc64le.go @@ -582,7 +582,8 @@ const ( /* siginfo-consts.h:189:1: */ // Architecture-specific adjustments to siginfo_t. // Values for `si_code'. Positive values are reserved for kernel-generated -// signals. +// +// signals. const ( /* siginfo-consts.h:35:1: */ SI_ASYNCNL = -60 // Sent by asynch name lookup completion. SI_DETHREAD = -7 // Sent by execve killing subsidiary @@ -1363,7 +1364,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1374,8 +1376,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1475,7 +1478,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // Never include this file directly; use <sys/types.h> instead. // An integral type that can be modified atomically, without the -// possibility of a signal arriving in the middle of the operation. +// +// possibility of a signal arriving in the middle of the operation. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ @@ -1543,7 +1547,8 @@ type Uid_t = X__uid_t /* signal.h:46:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2333,20 +2338,23 @@ type Gregset_t = [48]uint64 /* ucontext.h:93:23 */ type Fpregset_t = [33]float64 /* ucontext.h:94:16 */ // Container for Altivec/VMX Vector Status and Control Register. Only 32-bits -// but can only be copied to/from a 128-bit vector register. So we allocated -// a whole quadword speedup save/restore. +// +// but can only be copied to/from a 128-bit vector register. So we allocated +// a whole quadword speedup save/restore. type X_libc_vscr = struct { Fvscr_word uint32 F__pad [3]uint32 } /* ucontext.h:99:9 */ // Container for Altivec/VMX Vector Status and Control Register. Only 32-bits -// but can only be copied to/from a 128-bit vector register. So we allocated -// a whole quadword speedup save/restore. +// +// but can only be copied to/from a 128-bit vector register. So we allocated +// a whole quadword speedup save/restore. type Vscr_t = X_libc_vscr /* ucontext.h:108:3 */ // Container for Altivec/VMX registers and status. -// Must to be aligned on a 16-byte boundary. +// +// Must to be aligned on a 16-byte boundary. type X_libc_vrstate = struct { Fvrregs [32][4]uint32 Fvscr Vscr_t @@ -2355,7 +2363,8 @@ type X_libc_vrstate = struct { } /* ucontext.h:112:9 */ // Container for Altivec/VMX registers and status. -// Must to be aligned on a 16-byte boundary. +// +// Must to be aligned on a 16-byte boundary. type Vrregset_t = X_libc_vrstate /* ucontext.h:118:3 */ type Mcontext_t = struct { @@ -2689,18 +2698,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2717,7 +2729,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2729,7 +2742,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/signal/signal_linux_riscv64.go b/vendor/modernc.org/libc/signal/signal_linux_riscv64.go index 1a32b33c..f5407bad 100644 --- a/vendor/modernc.org/libc/signal/signal_linux_riscv64.go +++ b/vendor/modernc.org/libc/signal/signal_linux_riscv64.go @@ -221,7 +221,8 @@ const ( /* siginfo-consts.h:193:1: */ // Architecture-specific adjustments to siginfo_t. // Values for `si_code'. Positive values are reserved for kernel-generated -// signals. +// +// signals. const ( /* siginfo-consts.h:35:1: */ SI_ASYNCNL = -60 // Sent by asynch name lookup completion. SI_DETHREAD = -7 // Sent by execve killing subsidiary @@ -1195,7 +1196,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1206,8 +1208,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1312,7 +1315,8 @@ type X__sig_atomic_t = int32 /* types.h:215:13 */ // Never include this file directly; use <sys/types.h> instead. // An integral type that can be modified atomically, without the -// possibility of a signal arriving in the middle of the operation. +// +// possibility of a signal arriving in the middle of the operation. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ @@ -1403,7 +1407,8 @@ type Uid_t = X__uid_t /* signal.h:46:17 */ type Time_t = X__time_t /* time_t.h:10:18 */ // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -2250,9 +2255,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -2286,18 +2292,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2314,7 +2323,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2326,7 +2336,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/signal/signal_linux_s390x.go b/vendor/modernc.org/libc/signal/signal_linux_s390x.go index f0ea5e59..93330096 100644 --- a/vendor/modernc.org/libc/signal/signal_linux_s390x.go +++ b/vendor/modernc.org/libc/signal/signal_linux_s390x.go @@ -218,7 +218,8 @@ const ( /* siginfo-consts.h:189:1: */ // Architecture-specific adjustments to siginfo_t. // Values for `si_code'. Positive values are reserved for kernel-generated -// signals. +// +// signals. const ( /* siginfo-consts.h:35:1: */ SI_ASYNCNL = -60 // Sent by asynch name lookup completion. SI_DETHREAD = -7 // Sent by execve killing subsidiary @@ -1001,7 +1002,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1012,8 +1014,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1113,7 +1116,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // Never include this file directly; use <sys/types.h> instead. // An integral type that can be modified atomically, without the -// possibility of a signal arriving in the middle of the operation. +// +// possibility of a signal arriving in the middle of the operation. type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ @@ -1181,7 +1185,8 @@ type Uid_t = X__uid_t /* signal.h:46:17 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1486,7 +1491,8 @@ type X__s64 = int64 /* int-ll64.h:30:44 */ type X__u64 = uint64 /* int-ll64.h:31:42 */ // A address type so that arithmetic can be done on it & it can be upgraded to -// 64 bit when necessary +// +// 64 bit when necessary type Addr_t = uint64 /* types.h:18:23 */ type Saddr_t = int64 /* types.h:19:25 */ @@ -1808,10 +1814,12 @@ type X__psw_t = struct { type Greg_t = uint64 /* ucontext.h:42:23 */ // And the whole bunch of them. We should have used `struct s390_regs', -// but to avoid name space pollution and since the tradition says that -// the register set is an array, we make gregset_t a simple array -// that has the same size as s390_regs. This is needed for the -// elf_prstatus structure. +// +// but to avoid name space pollution and since the tradition says that +// the register set is an array, we make gregset_t a simple array +// that has the same size as s390_regs. This is needed for the +// elf_prstatus structure. +// // Must match kernels psw_t alignment. type Gregset_t = [27]Greg_t /* ucontext.h:58:16 */ @@ -2149,18 +2157,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -2177,7 +2188,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -2189,7 +2201,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/signal/signal_netbsd_arm.go b/vendor/modernc.org/libc/signal/signal_netbsd_arm.go new file mode 100644 index 00000000..60531217 --- /dev/null +++ b/vendor/modernc.org/libc/signal/signal_netbsd_arm.go @@ -0,0 +1,2853 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_netbsd_arm.go -pkgname signal', DO NOT EDIT. + +package signal + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BUS_ADRALN = 1 // siginfo.h:239:1: + BUS_ADRERR = 2 // siginfo.h:240:1: + BUS_OBJERR = 3 // siginfo.h:241:1: + BYTE_ORDER = 1234 // endian.h:103:1: + CLD_CONTINUED = 6 // siginfo.h:261:1: + CLD_DUMPED = 3 // siginfo.h:257:1: + CLD_EXITED = 1 // siginfo.h:254:1: + CLD_KILLED = 2 // siginfo.h:255:1: + CLD_STOPPED = 5 // siginfo.h:260:1: + CLD_TRAPPED = 4 // siginfo.h:259:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + FPE_FLTDIV = 3 // siginfo.h:227:1: + FPE_FLTINV = 7 // siginfo.h:231:1: + FPE_FLTOVF = 4 // siginfo.h:228:1: + FPE_FLTRES = 6 // siginfo.h:230:1: + FPE_FLTSUB = 8 // siginfo.h:232:1: + FPE_FLTUND = 5 // siginfo.h:229:1: + FPE_INTDIV = 1 // siginfo.h:225:1: + FPE_INTOVF = 2 // siginfo.h:226:1: + ILL_BADSTK = 8 // siginfo.h:222:1: + ILL_COPROC = 7 // siginfo.h:221:1: + ILL_ILLADR = 3 // siginfo.h:217:1: + ILL_ILLOPC = 1 // siginfo.h:215:1: + ILL_ILLOPN = 2 // siginfo.h:216:1: + ILL_ILLTRP = 4 // siginfo.h:218:1: + ILL_PRVOPC = 5 // siginfo.h:219:1: + ILL_PRVREG = 6 // siginfo.h:220:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + MINSIGSTKSZ = 8192 // signal.h:189:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + NSIG = 64 // signal.h:48:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + POLL_ERR = 4 // siginfo.h:267:1: + POLL_HUP = 6 // siginfo.h:269:1: + POLL_IN = 1 // siginfo.h:264:1: + POLL_MSG = 3 // siginfo.h:266:1: + POLL_OUT = 2 // siginfo.h:265:1: + POLL_PRI = 5 // siginfo.h:268:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SA_NOCLDSTOP = 0x0008 // signal.h:151:1: + SA_NOCLDWAIT = 0x0020 // signal.h:152:1: + SA_NODEFER = 0x0010 // signal.h:148:1: + SA_NOKERNINFO = 0x0080 // signal.h:158:1: + SA_ONSTACK = 0x0001 // signal.h:145:1: + SA_RESETHAND = 0x0004 // signal.h:147:1: + SA_RESTART = 0x0002 // signal.h:146:1: + SA_SIGINFO = 0x0040 // signal.h:155:1: + SEGV_ACCERR = 2 // siginfo.h:236:1: + SEGV_MAPERR = 1 // siginfo.h:235:1: + SIGABRT = 6 // signal.h:57:1: + SIGALRM = 14 // signal.h:66:1: + SIGBUS = 10 // signal.h:62:1: + SIGCHLD = 20 // signal.h:72:1: + SIGCONT = 19 // signal.h:71:1: + SIGEMT = 7 // signal.h:59:1: + SIGEV_NONE = 0 // signal.h:224:1: + SIGEV_SA = 3 // signal.h:228:1: + SIGEV_SIGNAL = 1 // signal.h:225:1: + SIGEV_THREAD = 2 // signal.h:226:1: + SIGFPE = 8 // signal.h:60:1: + SIGHUP = 1 // signal.h:52:1: + SIGILL = 4 // signal.h:55:1: + SIGINFO = 29 // signal.h:81:1: + SIGINT = 2 // signal.h:53:1: + SIGIO = 23 // signal.h:75:1: + SIGIOT = 6 // signal.h:58:1: + SIGKILL = 9 // signal.h:61:1: + SIGPIPE = 13 // signal.h:65:1: + SIGPROF = 27 // signal.h:79:1: + SIGPWR = 32 // signal.h:84:1: + SIGQUIT = 3 // signal.h:54:1: + SIGRTMAX = 63 // signal.h:86:1: + SIGRTMIN = 33 // signal.h:85:1: + SIGSEGV = 11 // signal.h:63:1: + SIGSTKSZ = 40960 // signal.h:190:1: + SIGSTOP = 17 // signal.h:69:1: + SIGSYS = 12 // signal.h:64:1: + SIGTERM = 15 // signal.h:67:1: + SIGTRAP = 5 // signal.h:56:1: + SIGTSTP = 18 // signal.h:70:1: + SIGTTIN = 21 // signal.h:73:1: + SIGTTOU = 22 // signal.h:74:1: + SIGURG = 16 // signal.h:68:1: + SIGUSR1 = 30 // signal.h:82:1: + SIGUSR2 = 31 // signal.h:83:1: + SIGVTALRM = 26 // signal.h:78:1: + SIGWINCH = 28 // signal.h:80:1: + SIGXCPU = 24 // signal.h:76:1: + SIGXFSZ = 25 // signal.h:77:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIG_BLOCK = 1 // signal.h:167:1: + SIG_CODE_BUS_ADDR_MASK = 0xfffffff0 // signal.h:154:1: + SIG_CODE_BUS_TYPE_MASK = 0x0000000f // signal.h:155:1: + SIG_CODE_FPE_CODE_MASK = 0x00000f00 // signal.h:131:1: + SIG_CODE_FPE_CODE_SHIFT = 8 // signal.h:132:1: + SIG_CODE_FPE_TYPE_MASK = 0x000000ff // signal.h:133:1: + SIG_CODE_SEGV_ADDR_MASK = 4294967280 // signal.h:156:1: + SIG_CODE_SEGV_TYPE_MASK = 15 // signal.h:157:1: + SIG_SETMASK = 3 // signal.h:169:1: + SIG_UNBLOCK = 2 // signal.h:168:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + SI_ASYNCIO = -3 // siginfo.h:277:1: + SI_LWP = -5 // siginfo.h:282:1: + SI_MESGQ = -4 // siginfo.h:279:1: + SI_NOINFO = 32767 // siginfo.h:283:1: + SI_QUEUE = -1 // siginfo.h:274:1: + SI_TIMER = -2 // siginfo.h:275:1: + SI_USER = 0 // siginfo.h:273:1: + SS_DISABLE = 0x0004 // signal.h:185:1: + SS_ONSTACK = 0x0001 // signal.h:184:1: + TRAP_BRKPT = 1 // siginfo.h:244:1: + TRAP_CHLD = 4 // siginfo.h:247:1: + TRAP_DBREG = 6 // siginfo.h:249:1: + TRAP_EXEC = 3 // siginfo.h:246:1: + TRAP_LWP = 5 // siginfo.h:248:1: + TRAP_SCE = 7 // siginfo.h:250:1: + TRAP_SCX = 8 // siginfo.h:251:1: + TRAP_TRACE = 2 // siginfo.h:245:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_MCONTEXT_H_ = 0 // mcontext.h:33:1: + X_ARM_SIGNAL_H_ = 0 // signal.h:47:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_NGREG = 17 // mcontext.h:48:1: + X_NSIG = 64 // signal.h:45:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_REG_CPSR = 16 // mcontext.h:70:1: + X_REG_ELR = 32 // mcontext.h:104:1: + X_REG_FP = 11 // mcontext.h:118:1: + X_REG_LR = 14 // mcontext.h:120:1: + X_REG_PC = 15 // mcontext.h:121:1: + X_REG_R0 = 0 // mcontext.h:54:1: + X_REG_R1 = 1 // mcontext.h:55:1: + X_REG_R10 = 10 // mcontext.h:64:1: + X_REG_R11 = 11 // mcontext.h:65:1: + X_REG_R12 = 12 // mcontext.h:66:1: + X_REG_R13 = 13 // mcontext.h:67:1: + X_REG_R14 = 14 // mcontext.h:68:1: + X_REG_R15 = 15 // mcontext.h:69:1: + X_REG_R2 = 2 // mcontext.h:56:1: + X_REG_R3 = 3 // mcontext.h:57:1: + X_REG_R4 = 4 // mcontext.h:58:1: + X_REG_R5 = 5 // mcontext.h:59:1: + X_REG_R6 = 6 // mcontext.h:60:1: + X_REG_R7 = 7 // mcontext.h:61:1: + X_REG_R8 = 8 // mcontext.h:62:1: + X_REG_R9 = 9 // mcontext.h:63:1: + X_REG_RV = 0 // mcontext.h:117:1: + X_REG_SP = 13 // mcontext.h:119:1: + X_REG_SPSR = 33 // mcontext.h:105:1: + X_REG_TPIDR = 34 // mcontext.h:106:1: + X_REG_X0 = 0 // mcontext.h:72:1: + X_REG_X1 = 1 // mcontext.h:73:1: + X_REG_X10 = 10 // mcontext.h:82:1: + X_REG_X11 = 11 // mcontext.h:83:1: + X_REG_X12 = 12 // mcontext.h:84:1: + X_REG_X13 = 13 // mcontext.h:85:1: + X_REG_X14 = 14 // mcontext.h:86:1: + X_REG_X15 = 15 // mcontext.h:87:1: + X_REG_X16 = 16 // mcontext.h:88:1: + X_REG_X17 = 17 // mcontext.h:89:1: + X_REG_X18 = 18 // mcontext.h:90:1: + X_REG_X19 = 19 // mcontext.h:91:1: + X_REG_X2 = 2 // mcontext.h:74:1: + X_REG_X20 = 20 // mcontext.h:92:1: + X_REG_X21 = 21 // mcontext.h:93:1: + X_REG_X22 = 22 // mcontext.h:94:1: + X_REG_X23 = 23 // mcontext.h:95:1: + X_REG_X24 = 24 // mcontext.h:96:1: + X_REG_X25 = 25 // mcontext.h:97:1: + X_REG_X26 = 26 // mcontext.h:98:1: + X_REG_X27 = 27 // mcontext.h:99:1: + X_REG_X28 = 28 // mcontext.h:100:1: + X_REG_X29 = 29 // mcontext.h:101:1: + X_REG_X3 = 3 // mcontext.h:75:1: + X_REG_X30 = 30 // mcontext.h:102:1: + X_REG_X31 = 31 // mcontext.h:103:1: + X_REG_X4 = 4 // mcontext.h:76:1: + X_REG_X5 = 5 // mcontext.h:77:1: + X_REG_X6 = 6 // mcontext.h:78:1: + X_REG_X7 = 7 // mcontext.h:79:1: + X_REG_X8 = 8 // mcontext.h:80:1: + X_REG_X9 = 9 // mcontext.h:81:1: + X_SIGNAL_H_ = 0 // signal.h:35:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_SIGINFO_H_ = 0 // siginfo.h:33:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:40:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_SYS_UCONTEXT_H_ = 0 // ucontext.h:33:1: + X_UC_ARM_VFP = 0x00010000 // mcontext.h:263:1: + X_UC_CLRSTACK = 0x00040000 // mcontext.h:267:1: + X_UC_CPU = 0x04 // ucontext.h:58:1: + X_UC_FPU = 0x08 // ucontext.h:59:1: + X_UC_MACHINE_PAD = 1 // mcontext.h:203:1: + X_UC_MD = 0x400f0020 // ucontext.h:60:1: + X_UC_SETSTACK = 0x00020000 // mcontext.h:266:1: + X_UC_SIGMASK = 0x01 // ucontext.h:56:1: + X_UC_STACK = 0x02 // ucontext.h:57:1: + X_UC_TLSBASE = 0x00080000 // mcontext.h:260:1: + X_UC_UCONTEXT_ALIGN = -1 // ucontext.h:52:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: siginfo.h,v 1.33.2.1 2019/10/15 18:32:13 martin 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. + +// $NetBSD: signal.h,v 1.15 2018/04/01 04:35:04 ryo Exp $ + +// Copyright (c) 1994-1996 Mark Brinicombe. +// Copyright (c) 1994 Brini. +// All rights reserved. +// +// This code is derived from software written for Brini by Mark Brinicombe +// +// 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 Brini. +// 4. The name of the company nor the name of the author may be used to +// endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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. +// +// RiscBSD kernel project +// +// signal.h +// +// Architecture dependent signal types and structures +// +// Created : 30/09/94 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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 + +type Sig_atomic_t = int32 /* signal.h:53:13 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. + +type Sigcontext = struct { + Fsc_onstack int32 + F__sc_mask13 int32 + Fsc_spsr uint32 + Fsc_r0 uint32 + Fsc_r1 uint32 + Fsc_r2 uint32 + Fsc_r3 uint32 + Fsc_r4 uint32 + Fsc_r5 uint32 + Fsc_r6 uint32 + Fsc_r7 uint32 + Fsc_r8 uint32 + Fsc_r9 uint32 + Fsc_r10 uint32 + Fsc_r11 uint32 + Fsc_r12 uint32 + Fsc_usr_sp uint32 + Fsc_usr_lr uint32 + Fsc_svc_lr uint32 + Fsc_pc uint32 + Fsc_mask Sigset_t +} /* signal.h:95:1 */ + +// Signals codes + +// SIGFPE codes +// +// see ieeefp.h for definition of FP exception codes + +// SIGILL codes +// +// the signal code is the instruction that raised the signal + +// SIGBUS and SIGSEGV codes +// +// The signal code is combination of the fault address and the fault code. +// +// The fault code is the coproc #15 fault status code +// +// The exception to this is a SIGBUS or SIGSEGV from a prefetch abort. +// In this case the fault status code is not valid so the TYPE_MASK +// should be treated as undefined (in practice it is the bottom 4 bits +// of the fault address). + +// End of signal.h +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +type Sigval = struct{ Fsival_int int32 } /* siginfo.h:41:9 */ + +// Signals codes + +// SIGFPE codes +// +// see ieeefp.h for definition of FP exception codes + +// SIGILL codes +// +// the signal code is the instruction that raised the signal + +// SIGBUS and SIGSEGV codes +// +// The signal code is combination of the fault address and the fault code. +// +// The fault code is the coproc #15 fault status code +// +// The exception to this is a SIGBUS or SIGSEGV from a prefetch abort. +// In this case the fault status code is not valid so the TYPE_MASK +// should be treated as undefined (in practice it is the bottom 4 bits +// of the fault address). + +// End of signal.h +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +type Sigval_t = Sigval /* siginfo.h:44:3 */ + +type X_ksiginfo = struct { + F_signo int32 + F_code int32 + F_errno int32 + F__ccgo_pad1 [4]byte + F_reason struct { + F__ccgo_pad1 [0]uint64 + F_rt struct { + F_pid X__pid_t + F_uid X__uid_t + F_value Sigval_t + } + F__ccgo_pad2 [68]byte + } +} /* siginfo.h:46:1 */ + +type Siginfo = struct { + F__ccgo_pad1 [0]uint64 + Fsi_pad [128]uint8 +} /* siginfo.h:148:9 */ + +type Siginfo_t = Siginfo /* siginfo.h:151:3 */ + +//* Field access macros + +//* si_code +// SIGILL + +// SIGFPE + +// SIGSEGV + +// SIGBUS + +// SIGTRAP + +// SIGCHLD +// did not create a core file +// created a core file + +// SIGIO + +//* si_code +// set by timer_settime(2) +// asynchronous I/O signal +// an empty message queue + +// $NetBSD: ucontext.h,v 1.19 2018/02/27 23:09:02 uwe 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. + +// $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 + +// $NetBSD: mcontext.h,v 1.21 2018/10/12 01:28:58 ryo Exp $ + +// - +// Copyright (c) 2001, 2002 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 of Wasabi Systems, 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. +// +// 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. + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// General register state +type X__greg_t = uint32 /* mcontext.h:49:22 */ + +type X__gregset_t = [17]X__greg_t /* mcontext.h:52:18 */ + +// Convenience synonyms + +// Floating point register state +// Note: the storage layout of this structure must be identical to ARMFPE! +type X__fpregset_t = struct { + F__fp_fpsr uint32 + F__fp_fr [8]struct { + F__fp_exponent uint32 + F__fp_mantissa_hi uint32 + F__fp_mantissa_lo uint32 + } +} /* mcontext.h:178:3 */ + +type X__vfpregset_t = struct { + F__vfp_fpscr uint32 + F__ccgo_pad1 [4]byte + F__vfp_fstmx [32]Uint64_t + F__vfp_fpsid uint32 + F__ccgo_pad2 [4]byte +} /* mcontext.h:190:3 */ + +type Mcontext_t = struct { + F__gregs X__gregset_t + F__ccgo_pad1 [4]byte + F__fpu struct { + F__ccgo_pad1 [0]uint64 + F__fpregs X__fpregset_t + F__ccgo_pad2 [172]byte + } + F_mc_tlsbase X__greg_t + F_mc_user_tpid X__greg_t +} /* mcontext.h:200:3 */ +type Mcontext32_t = struct { + F__gregs X__gregset_t + F__ccgo_pad1 [4]byte + F__fpu struct { + F__ccgo_pad1 [0]uint64 + F__fpregs X__fpregset_t + F__ccgo_pad2 [172]byte + } + F_mc_tlsbase X__greg_t + F_mc_user_tpid X__greg_t +} /* mcontext.h:200:15 */ + +// Machine-dependent uc_flags + +// Machine-dependent uc_flags for arm + +// used by signal delivery to indicate status of signal stack + +type X__ucontext = struct { + Fuc_flags uint32 + Fuc_link uintptr + Fuc_sigmask Sigset_t + Fuc_stack Stack_t + F__ccgo_pad1 [4]byte + Fuc_mcontext Mcontext_t + F__uc_pad [1]int32 + F__ccgo_pad2 [4]byte +} /* ucontext.h:38:9 */ + +// Machine-dependent uc_flags + +// Machine-dependent uc_flags for arm + +// used by signal delivery to indicate status of signal stack + +type Ucontext_t = X__ucontext /* ucontext.h:38:27 */ + +// uc_flags + +// 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 contains valid AltiVec context +// 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 + +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F_sa_u struct{ F_sa_handler uintptr } + Fsa_mask Sigset_t + Fsa_flags int32 +} /* signal.h:123:1 */ + +// $NetBSD: signal.h,v 1.15 2018/04/01 04:35:04 ryo Exp $ + +// Copyright (c) 1994-1996 Mark Brinicombe. +// Copyright (c) 1994 Brini. +// All rights reserved. +// +// This code is derived from software written for Brini by Mark Brinicombe +// +// 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 Brini. +// 4. The name of the company nor the name of the author may be used to +// endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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. +// +// RiscBSD kernel project +// +// signal.h +// +// Architecture dependent signal types and structures +// +// Created : 30/09/94 + +// End of signal.h + +// Only valid for SIGCHLD. + +// Flags for sigprocmask(): + +type Sig_t = uintptr /* signal.h:172:14 */ // type of signal function + +// Flags used with stack_t/struct sigaltstack. + +// Structure used in sigstack call. +type Sigstack = struct { + Fss_sp uintptr + Fss_onstack int32 +} /* signal.h:198:1 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +type Sigevent = struct { + Fsigev_notify int32 + Fsigev_signo int32 + Fsigev_value struct{ Fsival_int int32 } + Fsigev_notify_function uintptr + Fsigev_notify_attributes uintptr +} /* signal.h:216:1 */ + +// $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 + +// $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. + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* timespec.h:47:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/signal_openbsd_386.go b/vendor/modernc.org/libc/signal/signal_openbsd_386.go new file mode 100644 index 00000000..8b611349 --- /dev/null +++ b/vendor/modernc.org/libc/signal/signal_openbsd_386.go @@ -0,0 +1,1355 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_openbsd_386.go -pkgname signal', DO NOT EDIT. + +package signal + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BUS_ADRALN = 1 // siginfo.h:83:1: + BUS_ADRERR = 2 // siginfo.h:84:1: + BUS_OBJERR = 3 // siginfo.h:85:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLD_CONTINUED = 6 // siginfo.h:105:1: + CLD_DUMPED = 3 // siginfo.h:102:1: + CLD_EXITED = 1 // siginfo.h:100:1: + CLD_KILLED = 2 // siginfo.h:101:1: + CLD_STOPPED = 5 // siginfo.h:104:1: + CLD_TRAPPED = 4 // siginfo.h:103:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + EMT_TAGOVF = 1 // siginfo.h:66:1: + FD_SETSIZE = 1024 // select.h:62:1: + FPE_FLTDIV = 3 // siginfo.h:71:1: + FPE_FLTINV = 7 // siginfo.h:75:1: + FPE_FLTOVF = 4 // siginfo.h:72:1: + FPE_FLTRES = 6 // siginfo.h:74:1: + FPE_FLTSUB = 8 // siginfo.h:76:1: + FPE_FLTUND = 5 // siginfo.h:73:1: + FPE_INTDIV = 1 // siginfo.h:69:1: + FPE_INTOVF = 2 // siginfo.h:70:1: + ILL_BADSTK = 8 // siginfo.h:63:1: + ILL_COPROC = 7 // siginfo.h:62:1: + ILL_ILLADR = 3 // siginfo.h:58:1: + ILL_ILLOPC = 1 // siginfo.h:56:1: + ILL_ILLOPN = 2 // siginfo.h:57:1: + ILL_ILLTRP = 4 // siginfo.h:59:1: + ILL_PRVOPC = 5 // siginfo.h:60:1: + ILL_PRVREG = 6 // siginfo.h:61:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + MINSIGSTKSZ = 12288 // signal.h:183:1: + NBBY = 8 // select.h:111:1: + NSIG = 33 // signal.h:48:1: + NSIGBUS = 3 // siginfo.h:86:1: + NSIGCLD = 6 // siginfo.h:106:1: + NSIGEMT = 1 // siginfo.h:67:1: + NSIGFPE = 8 // siginfo.h:77:1: + NSIGILL = 8 // siginfo.h:64:1: + NSIGSEGV = 2 // siginfo.h:81:1: + NSIGTRAP = 2 // siginfo.h:95:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SA_NOCLDSTOP = 0x0008 // signal.h:132:1: + SA_NOCLDWAIT = 0x0020 // signal.h:130:1: + SA_NODEFER = 0x0010 // signal.h:129:1: + SA_ONSTACK = 0x0001 // signal.h:126:1: + SA_RESETHAND = 0x0004 // signal.h:128:1: + SA_RESTART = 0x0002 // signal.h:127:1: + SA_SIGINFO = 0x0040 // signal.h:134:1: + SEGV_ACCERR = 2 // siginfo.h:80:1: + SEGV_MAPERR = 1 // siginfo.h:79:1: + SIGABRT = 6 // signal.h:56:1: + SIGALRM = 14 // signal.h:67:1: + SIGBUS = 10 // signal.h:63:1: + SIGCHLD = 20 // signal.h:73:1: + SIGCONT = 19 // signal.h:72:1: + SIGEMT = 7 // signal.h:59:1: + SIGFPE = 8 // signal.h:61:1: + SIGHUP = 1 // signal.h:51:1: + SIGILL = 4 // signal.h:54:1: + SIGINFO = 29 // signal.h:85:1: + SIGINT = 2 // signal.h:52:1: + SIGIO = 23 // signal.h:77:1: + SIGIOT = 6 // signal.h:58:1: + SIGKILL = 9 // signal.h:62:1: + SIGPIPE = 13 // signal.h:66:1: + SIGPROF = 27 // signal.h:82:1: + SIGQUIT = 3 // signal.h:53:1: + SIGSEGV = 11 // signal.h:64:1: + SIGSTKSZ = 28672 // signal.h:185:1: + SIGSTOP = 17 // signal.h:70:1: + SIGSYS = 12 // signal.h:65:1: + SIGTERM = 15 // signal.h:68:1: + SIGTHR = 32 // signal.h:90:1: + SIGTRAP = 5 // signal.h:55:1: + SIGTSTP = 18 // signal.h:71:1: + SIGTTIN = 21 // signal.h:74:1: + SIGTTOU = 22 // signal.h:75:1: + SIGURG = 16 // signal.h:69:1: + SIGUSR1 = 30 // signal.h:87:1: + SIGUSR2 = 31 // signal.h:88:1: + SIGVTALRM = 26 // signal.h:81:1: + SIGWINCH = 28 // signal.h:84:1: + SIGXCPU = 24 // signal.h:79:1: + SIGXFSZ = 25 // signal.h:80:1: + SIG_BLOCK = 1 // signal.h:140:1: + SIG_SETMASK = 3 // signal.h:142:1: + SIG_UNBLOCK = 2 // signal.h:141:1: + SI_LWP = -1 // siginfo.h:47:1: + SI_MAXSZ = 128 // siginfo.h:127:1: + SI_NOINFO = 32767 // siginfo.h:45:1: + SI_QUEUE = -2 // siginfo.h:48:1: + SI_TIMER = -3 // siginfo.h:49:1: + SI_USER = 0 // siginfo.h:46:1: + SS_DISABLE = 0x0004 // signal.h:182:1: + SS_ONSTACK = 0x0001 // signal.h:181:1: + SV_INTERRUPT = 2 // signal.h:158:1: + SV_ONSTACK = 1 // signal.h:157:1: + SV_RESETHAND = 4 // signal.h:159:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + TRAP_BRKPT = 1 // siginfo.h:93:1: + TRAP_TRACE = 2 // siginfo.h:94:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_NSIG = 33 // signal.h:45:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // signal.h:103:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGINFO_H = 0 // siginfo.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_USER_SIGNAL_H = 0 // signal.h:36:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: signal.h,v 1.26 2018/05/30 13:20:38 bluhm Exp $ +// $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc 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. +// +// @(#)signal.h 8.3 (Berkeley) 3/30/94 + +// $OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $ +// $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 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.2 (Berkeley) 1/21/94 + +// $OpenBSD: signal.h,v 1.11 2016/05/10 18:39:45 deraadt Exp $ +// $NetBSD: signal.h,v 1.6 1996/01/08 13:51:43 mycroft 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type Sig_atomic_t = int32 /* signal.h:40:13 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. +type Sigcontext = struct { + Fsc_gs int32 + Fsc_fs int32 + Fsc_es int32 + Fsc_ds int32 + Fsc_edi int32 + Fsc_esi int32 + Fsc_ebp int32 + Fsc_ebx int32 + Fsc_edx int32 + Fsc_ecx int32 + Fsc_eax int32 + Fsc_eip int32 + Fsc_cs int32 + Fsc_eflags int32 + Fsc_esp int32 + Fsc_ss int32 + Fsc_cookie int32 + Fsc_mask int32 + Fsc_trapno int32 + Fsc_err int32 + Fsc_fpstate uintptr +} /* signal.h:54:1 */ + +// Language spec says we must list exactly one parameter, even though we +// actually supply three. Ugh! + +type Sigset_t = uint32 /* signal.h:104:22 */ + +// $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $ + +// Copyright (c) 1997 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +type Sigval = struct{ Fsival_int int32 } /* siginfo.h:33:1 */ + +// Negative signal codes are reserved for future use for +// user generated signals. + +// The machine dependent signal codes (SIGILL, SIGFPE, +// SIGSEGV, and SIGBUS) + +// SIGTRAP signal codes + +// SIGCHLD signal codes + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:111:1 */ + +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_code int32 + Fsi_errno int32 + F_data struct{ F_pad [29]int32 } +} /* siginfo.h:173:3 */ + +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F__sigaction_u struct{ F__sa_handler uintptr } + Fsa_mask Sigset_t + Fsa_flags int32 +} /* signal.h:112:1 */ + +// if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. + +// Flags for sigprocmask: + +type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function + +// 4.3 compatibility: +// Signal vector "template" used in sigvec call. +type Sigvec = struct { + Fsv_handler uintptr + Fsv_mask int32 + Fsv_flags int32 +} /* signal.h:152:1 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* signal.h:176:9 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Stack_t = Sigaltstack /* signal.h:180:3 */ + +type Ucontext_t = Sigcontext /* signal.h:190:27 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go b/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go index bbbc9e2b..50a97bfd 100644 --- a/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go +++ b/vendor/modernc.org/libc/signal/signal_openbsd_amd64.go @@ -138,8 +138,8 @@ const ( TRAP_TRACE = 2 // siginfo.h:94:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -154,16 +154,16 @@ const ( X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: X_NSIG = 33 // signal.h:45:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // signal.h:103:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -175,17 +175,17 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: X_USER_SIGNAL_H = 0 // signal.h:36:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -591,7 +591,7 @@ type Sigval = struct { // SIGCHLD signal codes -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -655,7 +655,7 @@ type Sigval = struct { // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -825,7 +825,7 @@ type Sigval = struct { // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -985,18 +985,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -1078,27 +1077,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -1234,7 +1232,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/signal/signal_openbsd_arm64.go b/vendor/modernc.org/libc/signal/signal_openbsd_arm64.go new file mode 100644 index 00000000..84f02714 --- /dev/null +++ b/vendor/modernc.org/libc/signal/signal_openbsd_arm64.go @@ -0,0 +1,1361 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_openbsd_arm64.go -pkgname signal', DO NOT EDIT. + +package signal + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BUS_ADRALN = 1 // siginfo.h:83:1: + BUS_ADRERR = 2 // siginfo.h:84:1: + BUS_OBJERR = 3 // siginfo.h:85:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLD_CONTINUED = 6 // siginfo.h:105:1: + CLD_DUMPED = 3 // siginfo.h:102:1: + CLD_EXITED = 1 // siginfo.h:100:1: + CLD_KILLED = 2 // siginfo.h:101:1: + CLD_STOPPED = 5 // siginfo.h:104:1: + CLD_TRAPPED = 4 // siginfo.h:103:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + EMT_TAGOVF = 1 // siginfo.h:66:1: + FD_SETSIZE = 1024 // select.h:62:1: + FPE_FLTDIV = 3 // siginfo.h:71:1: + FPE_FLTINV = 7 // siginfo.h:75:1: + FPE_FLTOVF = 4 // siginfo.h:72:1: + FPE_FLTRES = 6 // siginfo.h:74:1: + FPE_FLTSUB = 8 // siginfo.h:76:1: + FPE_FLTUND = 5 // siginfo.h:73:1: + FPE_INTDIV = 1 // siginfo.h:69:1: + FPE_INTOVF = 2 // siginfo.h:70:1: + ILL_BADSTK = 8 // siginfo.h:63:1: + ILL_COPROC = 7 // siginfo.h:62:1: + ILL_ILLADR = 3 // siginfo.h:58:1: + ILL_ILLOPC = 1 // siginfo.h:56:1: + ILL_ILLOPN = 2 // siginfo.h:57:1: + ILL_ILLTRP = 4 // siginfo.h:59:1: + ILL_PRVOPC = 5 // siginfo.h:60:1: + ILL_PRVREG = 6 // siginfo.h:61:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + MINSIGSTKSZ = 12288 // signal.h:183:1: + NBBY = 8 // select.h:111:1: + NSIG = 33 // signal.h:48:1: + NSIGBUS = 3 // siginfo.h:86:1: + NSIGCLD = 6 // siginfo.h:106:1: + NSIGEMT = 1 // siginfo.h:67:1: + NSIGFPE = 8 // siginfo.h:77:1: + NSIGILL = 8 // siginfo.h:64:1: + NSIGSEGV = 2 // siginfo.h:81:1: + NSIGTRAP = 2 // siginfo.h:95:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SA_NOCLDSTOP = 0x0008 // signal.h:132:1: + SA_NOCLDWAIT = 0x0020 // signal.h:130:1: + SA_NODEFER = 0x0010 // signal.h:129:1: + SA_ONSTACK = 0x0001 // signal.h:126:1: + SA_RESETHAND = 0x0004 // signal.h:128:1: + SA_RESTART = 0x0002 // signal.h:127:1: + SA_SIGINFO = 0x0040 // signal.h:134:1: + SEGV_ACCERR = 2 // siginfo.h:80:1: + SEGV_MAPERR = 1 // siginfo.h:79:1: + SIGABRT = 6 // signal.h:56:1: + SIGALRM = 14 // signal.h:67:1: + SIGBUS = 10 // signal.h:63:1: + SIGCHLD = 20 // signal.h:73:1: + SIGCONT = 19 // signal.h:72:1: + SIGEMT = 7 // signal.h:59:1: + SIGFPE = 8 // signal.h:61:1: + SIGHUP = 1 // signal.h:51:1: + SIGILL = 4 // signal.h:54:1: + SIGINFO = 29 // signal.h:85:1: + SIGINT = 2 // signal.h:52:1: + SIGIO = 23 // signal.h:77:1: + SIGIOT = 6 // signal.h:58:1: + SIGKILL = 9 // signal.h:62:1: + SIGPIPE = 13 // signal.h:66:1: + SIGPROF = 27 // signal.h:82:1: + SIGQUIT = 3 // signal.h:53:1: + SIGSEGV = 11 // signal.h:64:1: + SIGSTKSZ = 28672 // signal.h:185:1: + SIGSTOP = 17 // signal.h:70:1: + SIGSYS = 12 // signal.h:65:1: + SIGTERM = 15 // signal.h:68:1: + SIGTHR = 32 // signal.h:90:1: + SIGTRAP = 5 // signal.h:55:1: + SIGTSTP = 18 // signal.h:71:1: + SIGTTIN = 21 // signal.h:74:1: + SIGTTOU = 22 // signal.h:75:1: + SIGURG = 16 // signal.h:69:1: + SIGUSR1 = 30 // signal.h:87:1: + SIGUSR2 = 31 // signal.h:88:1: + SIGVTALRM = 26 // signal.h:81:1: + SIGWINCH = 28 // signal.h:84:1: + SIGXCPU = 24 // signal.h:79:1: + SIGXFSZ = 25 // signal.h:80:1: + SIG_BLOCK = 1 // signal.h:140:1: + SIG_SETMASK = 3 // signal.h:142:1: + SIG_UNBLOCK = 2 // signal.h:141:1: + SI_LWP = -1 // siginfo.h:47:1: + SI_MAXSZ = 128 // siginfo.h:127:1: + SI_NOINFO = 32767 // siginfo.h:45:1: + SI_QUEUE = -2 // siginfo.h:48:1: + SI_TIMER = -3 // siginfo.h:49:1: + SI_USER = 0 // siginfo.h:46:1: + SS_DISABLE = 0x0004 // signal.h:182:1: + SS_ONSTACK = 0x0001 // signal.h:181:1: + SV_INTERRUPT = 2 // signal.h:158:1: + SV_ONSTACK = 1 // signal.h:157:1: + SV_RESETHAND = 4 // signal.h:159:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + TRAP_BRKPT = 1 // siginfo.h:93:1: + TRAP_TRACE = 2 // siginfo.h:94:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE_SIGNAL_H_ = 0 // signal.h:37:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_NSIG = 33 // signal.h:45:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // signal.h:103:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGINFO_H = 0 // siginfo.h:29:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_USER_SIGNAL_H = 0 // signal.h:36:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: signal.h,v 1.26 2018/05/30 13:20:38 bluhm Exp $ +// $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc 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. +// +// @(#)signal.h 8.3 (Berkeley) 3/30/94 + +// $OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $ +// $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 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.2 (Berkeley) 1/21/94 + +// $OpenBSD: signal.h,v 1.2 2017/03/12 17:57:12 kettenis Exp $ +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Ralph Campbell. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.1 (Berkeley) 6/10/93 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +type Sig_atomic_t = int32 /* signal.h:41:13 */ + +// Information pushed on stack when a signal is delivered. +// This is used by the kernel to restore state following +// execution of the signal handler. It is also made available +// to the handler to allow it to restore state properly if +// a non-standard exit is performed. +type Sigcontext = struct { + F__sc_unused int32 + Fsc_mask int32 + Fsc_sp uint64 + Fsc_lr uint64 + Fsc_elr uint64 + Fsc_spsr uint64 + Fsc_x [30]uint64 + Fsc_cookie int64 +} /* signal.h:51:1 */ + +// Language spec says we must list exactly one parameter, even though we +// actually supply three. Ugh! + +type Sigset_t = uint32 /* signal.h:104:22 */ + +// $OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $ + +// Copyright (c) 1997 Theo de Raadt +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +type Sigval = struct { + F__ccgo_pad1 [0]uint64 + Fsival_int int32 + F__ccgo_pad2 [4]byte +} /* siginfo.h:33:1 */ + +// Negative signal codes are reserved for future use for +// user generated signals. + +// The machine dependent signal codes (SIGILL, SIGFPE, +// SIGSEGV, and SIGBUS) + +// SIGTRAP signal codes + +// SIGCHLD signal codes + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:111:1 */ + +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_code int32 + Fsi_errno int32 + F__ccgo_pad1 [4]byte + F_data struct { + F__ccgo_pad1 [0]uint64 + F_pad [29]int32 + F__ccgo_pad2 [4]byte + } +} /* siginfo.h:173:3 */ + +// Signal vector "template" used in sigaction call. +type Sigaction = struct { + F__sigaction_u struct{ F__sa_handler uintptr } + Fsa_mask Sigset_t + Fsa_flags int32 +} /* signal.h:112:1 */ + +// if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. + +// Flags for sigprocmask: + +type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function + +// 4.3 compatibility: +// Signal vector "template" used in sigvec call. +type Sigvec = struct { + Fsv_handler uintptr + Fsv_mask int32 + Fsv_flags int32 +} /* signal.h:152:1 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 + F__ccgo_pad1 [4]byte +} /* signal.h:176:9 */ + +// Macro for converting signal number to a mask suitable for +// sigblock(). + +// Structure used in sigaltstack call. +type Stack_t = Sigaltstack /* signal.h:180:3 */ + +type Ucontext_t = Sigcontext /* signal.h:190:27 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/signal_windows_386.go b/vendor/modernc.org/libc/signal/signal_windows_386.go index 2b488a95..7925155e 100644 --- a/vendor/modernc.org/libc/signal/signal_windows_386.go +++ b/vendor/modernc.org/libc/signal/signal_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo signal\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o signal\signal_windows_386.go -pkgname signal', DO NOT EDIT. +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_windows_386.go -pkgname signal', DO NOT EDIT. package signal @@ -15,97 +15,97 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - NSIG = 23 - SIGABRT = 22 - SIGABRT2 = 22 - SIGABRT_COMPAT = 6 - SIGBREAK = 21 - SIGFPE = 8 - SIGILL = 4 - SIGINT = 2 - SIGSEGV = 11 - SIGTERM = 15 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - WIN_PTHREADS_SIGNAL_H = 0 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_SIGNAL = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIG_ATOMIC_T_DEFINED = 0 - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + NSIG = 23 // signal.h:21:1: + SIGABRT = 22 // signal.h:30:1: + SIGABRT2 = 22 // signal.h:31:1: + SIGABRT_COMPAT = 6 // signal.h:25:1: + SIGBREAK = 21 // signal.h:29:1: + SIGFPE = 8 // signal.h:26:1: + SIGILL = 4 // signal.h:24:1: + SIGINT = 2 // signal.h:23:1: + SIGSEGV = 11 // signal.h:27:1: + SIGTERM = 15 // signal.h:28:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + WIN_PTHREADS_SIGNAL_H = 0 // pthread_signal.h:24:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_SIGNAL = 0 // signal.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIG_ATOMIC_T_DEFINED = 0 // signal.h:17:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -139,6 +139,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -159,6 +164,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -199,26 +210,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -244,29 +257,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ // // Copyright (c) 2013-2016 mingw-w64 project diff --git a/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go b/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go index 274e16c9..37822092 100644 --- a/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdio/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdio/stdio_darwin_amd64.go -pkgname stdio', DO NOT EDIT. +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_darwin_amd64.go -pkgname stdio', DO NOT EDIT. package stdio diff --git a/vendor/modernc.org/libc/stdio/capi_freebsd_arm.go b/vendor/modernc.org/libc/stdio/capi_freebsd_arm.go new file mode 100644 index 00000000..29dc4620 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_freebsd_arm.go -pkgname stdio', DO NOT EDIT. + +package stdio + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdio/capi_freebsd_arm64.go b/vendor/modernc.org/libc/stdio/capi_freebsd_arm64.go new file mode 100644 index 00000000..f6b25b14 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_freebsd_amd64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdio/capi_netbsd_arm.go b/vendor/modernc.org/libc/stdio/capi_netbsd_arm.go new file mode 100644 index 00000000..5221f646 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_netbsd_arm.go -pkgname stdio', DO NOT EDIT. + +package stdio + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdio/capi_openbsd_386.go b/vendor/modernc.org/libc/stdio/capi_openbsd_386.go new file mode 100644 index 00000000..67c14eb1 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_openbsd_386.go -pkgname stdio', DO NOT EDIT. + +package stdio + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdio/capi_openbsd_arm64.go b/vendor/modernc.org/libc/stdio/capi_openbsd_arm64.go new file mode 100644 index 00000000..e077230e --- /dev/null +++ b/vendor/modernc.org/libc/stdio/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_openbsd_arm64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdio/capi_windows_386.go b/vendor/modernc.org/libc/stdio/capi_windows_386.go index 280ea7c0..48013d5d 100644 --- a/vendor/modernc.org/libc/stdio/capi_windows_386.go +++ b/vendor/modernc.org/libc/stdio/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdio\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdio\stdio_windows_386.go -pkgname stdio', DO NOT EDIT. +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_windows_386.go -pkgname stdio', DO NOT EDIT. package stdio diff --git a/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go b/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go index f6f20867..129bf986 100644 --- a/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdio/stdio_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdio/stdio_darwin_amd64.go -pkgname stdio', DO NOT EDIT. +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_darwin_amd64.go -pkgname stdio', DO NOT EDIT. package stdio @@ -15,60 +15,60 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUFSIZ = 1024 - EOF = -1 - FILENAME_MAX = 1024 - FOPEN_MAX = 20 - L_ctermid = 1024 - L_tmpnam = 1024 - P_tmpdir = "/var/tmp/" - RENAME_EXCL = 0x00000004 - RENAME_SECLUDE = 0x00000001 - RENAME_SWAP = 0x00000002 - SEEK_CUR = 1 - SEEK_END = 2 - SEEK_SET = 0 - TMP_MAX = 308915776 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CTERMID_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_FSTDIO = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IOFBF = 0 - X_IOLBF = 1 - X_IONBF = 2 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_SECURE__COMMON_H_ = 0 - X_SECURE__STDIO_H_ = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_STDIO_H_ = 0 - X_SYS_STDIO_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UINTPTR_T = 0 - X_USE_FORTIFY_LEVEL = 2 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_VA_LIST_T = 0 + BUFSIZ = 1024 // stdio.h:103:1: + EOF = -1 // stdio.h:104:1: + FILENAME_MAX = 1024 // stdio.h:108:1: + FOPEN_MAX = 20 // stdio.h:107:1: + L_ctermid = 1024 // stdio.h:202:1: + L_tmpnam = 1024 // stdio.h:114:1: + P_tmpdir = "/var/tmp/" // stdio.h:112:1: + RENAME_EXCL = 0x00000004 // stdio.h:45:1: + RENAME_SECLUDE = 0x00000001 // stdio.h:43:1: + RENAME_SWAP = 0x00000002 // stdio.h:44:1: + SEEK_CUR = 1 // stdio.h:121:1: + SEEK_END = 2 // stdio.h:124:1: + SEEK_SET = 0 // stdio.h:118:1: + TMP_MAX = 308915776 // stdio.h:115:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CTERMID_H_ = 0 // _ctermid.h:25:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_FSTDIO = 0 // _stdio.h:83:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IOFBF = 0 // stdio.h:99:1: + X_IOLBF = 1 // stdio.h:100:1: + X_IONBF = 2 // stdio.h:101:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_SECURE__COMMON_H_ = 0 // _common.h:25:1: + X_SECURE__STDIO_H_ = 0 // _stdio.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_STDIO_H_ = 0 // stdio.h:62:1: + X_SYS_STDIO_H_ = 0 // stdio.h:30:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USE_FORTIFY_LEVEL = 2 // _common.h:30:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_VA_LIST_T = 0 // _va_list.h:30:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/stdio/stdio_freebsd_386.go b/vendor/modernc.org/libc/stdio/stdio_freebsd_386.go index b4f0cc65..1a99d391 100644 --- a/vendor/modernc.org/libc/stdio/stdio_freebsd_386.go +++ b/vendor/modernc.org/libc/stdio/stdio_freebsd_386.go @@ -598,8 +598,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/stdio/stdio_freebsd_amd64.go b/vendor/modernc.org/libc/stdio/stdio_freebsd_amd64.go index 88a19f38..b51156e0 100644 --- a/vendor/modernc.org/libc/stdio/stdio_freebsd_amd64.go +++ b/vendor/modernc.org/libc/stdio/stdio_freebsd_amd64.go @@ -38,9 +38,9 @@ const ( X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_MMAP_DECLARED = 0 // stdio.h:443:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF64_T_DECLARED = 0 // stdio.h:71:1: X_OFF_T_DECLARED = 0 // stdio.h:61:1: X_RSIZE_T_DEFINED = 0 // stdio.h:55:1: @@ -53,7 +53,7 @@ const ( X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_TRUNCATE_DECLARED = 0 // stdio.h:447:1: X_VA_LIST_DECLARED = 0 // stdio.h:78:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -326,12 +326,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -603,8 +606,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/stdio/stdio_freebsd_arm.go b/vendor/modernc.org/libc/stdio/stdio_freebsd_arm.go new file mode 100644 index 00000000..b9e8810c --- /dev/null +++ b/vendor/modernc.org/libc/stdio/stdio_freebsd_arm.go @@ -0,0 +1,696 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_freebsd_arm.go -pkgname stdio', DO NOT EDIT. + +package stdio + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BUFSIZ = 1024 // stdio.h:209:1: + EOF = -1 // stdio.h:210:1: + FILENAME_MAX = 1024 // stdio.h:221:1: + FOPEN_MAX = 20 // stdio.h:219:1: + L_ctermid = 1024 // stdio.h:319:1: + L_cuserid = 17 // stdio.h:315:1: + L_tmpnam = 1024 // stdio.h:227:1: + P_tmpdir = "/tmp/" // stdio.h:225:1: + SEEK_CUR = 1 // stdio.h:234:1: + SEEK_END = 2 // stdio.h:237:1: + SEEK_SET = 0 // stdio.h:231:1: + TMP_MAX = 308915776 // stdio.h:228:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSTDIO = 0 // stdio.h:82:1: + X_FTRUNCATE_DECLARED = 0 // stdio.h:435:1: + X_ILP32 = 1 // <predefined>:1:1: + X_IOFBF = 0 // stdio.h:205:1: + X_IOLBF = 1 // stdio.h:206:1: + X_IONBF = 2 // stdio.h:207:1: + X_LSEEK_DECLARED = 0 // stdio.h:439:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // stdio.h:443:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // stdio.h:71:1: + X_OFF_T_DECLARED = 0 // stdio.h:61:1: + X_RSIZE_T_DEFINED = 0 // stdio.h:55:1: + X_SIZE_T_DECLARED = 0 // stdio.h:51:1: + X_SSIZE_T_DECLARED = 0 // stdio.h:65:1: + X_STDFILE_DECLARED = 0 // stdio.h:164:1: + X_STDIO_H_ = 0 // stdio.h:39:1: + X_STDSTREAM_DECLARED = 0 // stdio.h:173:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TRUNCATE_DECLARED = 0 // stdio.h:447:1: + X_VA_LIST_DECLARED = 0 // stdio.h:78:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Chris Torek. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stdio.h 8.5 (Berkeley) 4/29/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Fpos_t = X__off_t /* stdio.h:47:18 */ + +type Rsize_t = Size_t /* stdio.h:56:16 */ + +type Off_t = X__off_t /* stdio.h:62:18 */ +type Ssize_t = X__ssize_t /* stdio.h:66:19 */ + +type Off64_t = X__off64_t /* stdio.h:72:19 */ + +type Va_list = X__va_list /* stdio.h:77:19 */ + +// 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 +type X__sbuf = struct { + F_base uintptr + F_size int32 +} /* stdio.h:91:1 */ + +// stdio state variables. +// +// The following always hold: +// +// if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), +// _lbfsize is -_bf._size, else _lbfsize is 0 +// if _flags&__SRD, _w is 0 +// if _flags&__SWR, _r is 0 +// +// This ensures that the getc and putc macros (or inline functions) never +// try to write or read from a file that is in `read' or `write' mode. +// (Moreover, they can, and do, automatically switch from read mode to +// write mode, and back, on "r+" and "w+" files.) +// +// _lbfsize is used only to make the inline line-buffered output stream +// code as compact as possible. +// +// _ub, _up, and _ur are used when ungetc() pushes back more characters +// than fit in the current _bf, or when ungetc() pushes back a character +// that does not match the previous one in _bf. When this happens, +// _ub._base becomes non-nil (i.e., a stream has ungetc() data iff +// _ub._base!=NULL) and _up and _ur save the current values of _p and _r. +// +// Certain members of __sFILE are accessed directly via macros or +// inline functions. To preserve ABI compat, these members must not +// be disturbed. These members are marked below with (*). +type X__sFILE = struct { + F_p uintptr + F_r int32 + F_w int32 + F_flags int16 + F_file int16 + F_bf struct { + F_base uintptr + F_size int32 + } + F_lbfsize int32 + F_cookie uintptr + F_close uintptr + F_read uintptr + F_seek uintptr + F_write uintptr + F_ub struct { + F_base uintptr + F_size int32 + } + F_up uintptr + F_ur int32 + F_ubuf [3]uint8 + F_nbuf [1]uint8 + F_lb struct { + F_base uintptr + F_size int32 + } + F_blksize int32 + F_offset Fpos_t + F_fl_mutex uintptr + F_fl_owner uintptr + F_fl_count int32 + F_orientation int32 + F_mbstate X__mbstate_t + F_flags2 int32 + F__ccgo_pad1 [4]byte +} /* stdio.h:124:1 */ + +type FILE = X__sFILE /* stdio.h:165:24 */ +type Cookie_io_functions_t = struct { + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fclose uintptr +} /* stdio.h:428:3 */ + +// See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 +// B.8.2.7 for the rationale behind the *_unlocked() macros. + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/stdio_freebsd_arm64.go b/vendor/modernc.org/libc/stdio/stdio_freebsd_arm64.go new file mode 100644 index 00000000..b51156e0 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/stdio_freebsd_arm64.go @@ -0,0 +1,762 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_freebsd_amd64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BUFSIZ = 1024 // stdio.h:209:1: + EOF = -1 // stdio.h:210:1: + FILENAME_MAX = 1024 // stdio.h:221:1: + FOPEN_MAX = 20 // stdio.h:219:1: + L_ctermid = 1024 // stdio.h:319:1: + L_cuserid = 17 // stdio.h:315:1: + L_tmpnam = 1024 // stdio.h:227:1: + P_tmpdir = "/tmp/" // stdio.h:225:1: + SEEK_CUR = 1 // stdio.h:234:1: + SEEK_END = 2 // stdio.h:237:1: + SEEK_SET = 0 // stdio.h:231:1: + TMP_MAX = 308915776 // stdio.h:228:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSTDIO = 0 // stdio.h:82:1: + X_FTRUNCATE_DECLARED = 0 // stdio.h:435:1: + X_IOFBF = 0 // stdio.h:205:1: + X_IOLBF = 1 // stdio.h:206:1: + X_IONBF = 2 // stdio.h:207:1: + X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // stdio.h:439:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // stdio.h:443:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // stdio.h:71:1: + X_OFF_T_DECLARED = 0 // stdio.h:61:1: + X_RSIZE_T_DEFINED = 0 // stdio.h:55:1: + X_SIZE_T_DECLARED = 0 // stdio.h:51:1: + X_SSIZE_T_DECLARED = 0 // stdio.h:65:1: + X_STDFILE_DECLARED = 0 // stdio.h:164:1: + X_STDIO_H_ = 0 // stdio.h:39:1: + X_STDSTREAM_DECLARED = 0 // stdio.h:173:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TRUNCATE_DECLARED = 0 // stdio.h:447:1: + X_VA_LIST_DECLARED = 0 // stdio.h:78:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Chris Torek. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stdio.h 8.5 (Berkeley) 4/29/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Fpos_t = X__off_t /* stdio.h:47:18 */ + +type Rsize_t = Size_t /* stdio.h:56:16 */ + +type Off_t = X__off_t /* stdio.h:62:18 */ +type Ssize_t = X__ssize_t /* stdio.h:66:19 */ + +type Off64_t = X__off64_t /* stdio.h:72:19 */ + +type Va_list = X__va_list /* stdio.h:77:19 */ + +// 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 +type X__sbuf = struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte +} /* stdio.h:91:1 */ + +// stdio state variables. +// +// The following always hold: +// +// if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), +// _lbfsize is -_bf._size, else _lbfsize is 0 +// if _flags&__SRD, _w is 0 +// if _flags&__SWR, _r is 0 +// +// This ensures that the getc and putc macros (or inline functions) never +// try to write or read from a file that is in `read' or `write' mode. +// (Moreover, they can, and do, automatically switch from read mode to +// write mode, and back, on "r+" and "w+" files.) +// +// _lbfsize is used only to make the inline line-buffered output stream +// code as compact as possible. +// +// _ub, _up, and _ur are used when ungetc() pushes back more characters +// than fit in the current _bf, or when ungetc() pushes back a character +// that does not match the previous one in _bf. When this happens, +// _ub._base becomes non-nil (i.e., a stream has ungetc() data iff +// _ub._base!=NULL) and _up and _ur save the current values of _p and _r. +// +// Certain members of __sFILE are accessed directly via macros or +// inline functions. To preserve ABI compat, these members must not +// be disturbed. These members are marked below with (*). +type X__sFILE = struct { + F_p uintptr + F_r int32 + F_w int32 + F_flags int16 + F_file int16 + F__ccgo_pad1 [4]byte + F_bf struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_lbfsize int32 + F__ccgo_pad2 [4]byte + F_cookie uintptr + F_close uintptr + F_read uintptr + F_seek uintptr + F_write uintptr + F_ub struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_up uintptr + F_ur int32 + F_ubuf [3]uint8 + F_nbuf [1]uint8 + F_lb struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_blksize int32 + F__ccgo_pad3 [4]byte + F_offset Fpos_t + F_fl_mutex uintptr + F_fl_owner uintptr + F_fl_count int32 + F_orientation int32 + F_mbstate X__mbstate_t + F_flags2 int32 + F__ccgo_pad4 [4]byte +} /* stdio.h:124:1 */ + +type FILE = X__sFILE /* stdio.h:165:24 */ +type Cookie_io_functions_t = struct { + Fread uintptr + Fwrite uintptr + Fseek uintptr + Fclose uintptr +} /* stdio.h:428:3 */ + +// See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 +// B.8.2.7 for the rationale behind the *_unlocked() macros. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_386.go b/vendor/modernc.org/libc/stdio/stdio_linux_386.go index 3870fee0..af4d4c55 100644 --- a/vendor/modernc.org/libc/stdio/stdio_linux_386.go +++ b/vendor/modernc.org/libc/stdio/stdio_linux_386.go @@ -342,7 +342,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -353,13 +354,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -394,16 +397,18 @@ type X__mbstate_t = struct { } /* __mbstate_t.h:21:3 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X_G_fpos_t = struct { F__pos X__off_t F__state X__mbstate_t } /* __fpos_t.h:10:9 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -427,8 +432,9 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X_G_fpos64_t = struct { F__pos X__off64_t F__state X__mbstate_t @@ -455,8 +461,9 @@ type X_G_fpos64_t = struct { // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ type X_IO_FILE = struct { diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_amd64.go b/vendor/modernc.org/libc/stdio/stdio_linux_amd64.go index 2be5f7f6..b11d50c8 100644 --- a/vendor/modernc.org/libc/stdio/stdio_linux_amd64.go +++ b/vendor/modernc.org/libc/stdio/stdio_linux_amd64.go @@ -360,7 +360,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -371,8 +372,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -411,16 +413,18 @@ type X__mbstate_t = struct { } /* __mbstate_t.h:21:3 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X_G_fpos_t = struct { F__pos X__off_t F__state X__mbstate_t } /* __fpos_t.h:10:9 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -444,8 +448,9 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X_G_fpos64_t = struct { F__pos X__off64_t F__state X__mbstate_t @@ -472,8 +477,9 @@ type X_G_fpos64_t = struct { // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ type X_IO_FILE = struct { diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_arm.go b/vendor/modernc.org/libc/stdio/stdio_linux_arm.go index 04e22d91..49bf78d5 100644 --- a/vendor/modernc.org/libc/stdio/stdio_linux_arm.go +++ b/vendor/modernc.org/libc/stdio/stdio_linux_arm.go @@ -370,7 +370,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -381,13 +382,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -422,16 +425,18 @@ type X__mbstate_t = struct { } /* __mbstate_t.h:21:3 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X_G_fpos_t = struct { F__pos X__off_t F__state X__mbstate_t } /* __fpos_t.h:10:9 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -455,8 +460,9 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X_G_fpos64_t = struct { F__pos X__off64_t F__state X__mbstate_t @@ -483,8 +489,9 @@ type X_G_fpos64_t = struct { // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ type X_IO_FILE = struct { diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_arm64.go b/vendor/modernc.org/libc/stdio/stdio_linux_arm64.go index e4cc28cd..abc7829e 100644 --- a/vendor/modernc.org/libc/stdio/stdio_linux_arm64.go +++ b/vendor/modernc.org/libc/stdio/stdio_linux_arm64.go @@ -393,7 +393,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -404,8 +405,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -444,16 +446,18 @@ type X__mbstate_t = struct { } /* __mbstate_t.h:21:3 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X_G_fpos_t = struct { F__pos X__off_t F__state X__mbstate_t } /* __fpos_t.h:10:9 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -477,8 +481,9 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X_G_fpos64_t = struct { F__pos X__off64_t F__state X__mbstate_t @@ -505,8 +510,9 @@ type X_G_fpos64_t = struct { // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ type X_IO_FILE = struct { diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_ppc64le.go b/vendor/modernc.org/libc/stdio/stdio_linux_ppc64le.go index 6fd85256..718d27f6 100644 --- a/vendor/modernc.org/libc/stdio/stdio_linux_ppc64le.go +++ b/vendor/modernc.org/libc/stdio/stdio_linux_ppc64le.go @@ -372,7 +372,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -383,8 +384,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -423,16 +425,18 @@ type X__mbstate_t = struct { } /* __mbstate_t.h:21:3 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X_G_fpos_t = struct { F__pos X__off_t F__state X__mbstate_t } /* __fpos_t.h:10:9 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -456,8 +460,9 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X_G_fpos64_t = struct { F__pos X__off64_t F__state X__mbstate_t @@ -484,8 +489,9 @@ type X_G_fpos64_t = struct { // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ type X_IO_FILE = struct { diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go b/vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go index 502ad77e..b970de85 100644 --- a/vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go +++ b/vendor/modernc.org/libc/stdio/stdio_linux_riscv64.go @@ -397,7 +397,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -408,8 +409,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -448,16 +450,18 @@ type X__mbstate_t = struct { } /* __mbstate_t.h:21:3 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X_G_fpos_t = struct { F__pos X__off_t F__state X__mbstate_t } /* __fpos_t.h:10:9 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -481,8 +485,9 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X_G_fpos64_t = struct { F__pos X__off64_t F__state X__mbstate_t @@ -509,8 +514,9 @@ type X_G_fpos64_t = struct { // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ type X_IO_FILE = struct { diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_s390x.go b/vendor/modernc.org/libc/stdio/stdio_linux_s390x.go index 5b2b70ac..e9704509 100644 --- a/vendor/modernc.org/libc/stdio/stdio_linux_s390x.go +++ b/vendor/modernc.org/libc/stdio/stdio_linux_s390x.go @@ -361,7 +361,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -372,8 +373,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -412,16 +414,18 @@ type X__mbstate_t = struct { } /* __mbstate_t.h:21:3 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X_G_fpos_t = struct { F__pos X__off_t F__state X__mbstate_t } /* __fpos_t.h:10:9 */ // The tag name of this struct is _G_fpos_t to preserve historic -// C++ mangled names for functions taking fpos_t arguments. -// That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // bits/types.h -- definitions of __*_t types underlying *_t types. @@ -445,8 +449,9 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X_G_fpos64_t = struct { F__pos X__off64_t F__state X__mbstate_t @@ -473,8 +478,9 @@ type X_G_fpos64_t = struct { // Never include this file directly; use <sys/types.h> instead. // The tag name of this struct is _G_fpos64_t to preserve historic -// C++ mangled names for functions taking fpos_t and/or fpos64_t -// arguments. That name should not be used in new code. +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ type X_IO_FILE = struct { diff --git a/vendor/modernc.org/libc/stdio/stdio_netbsd_arm.go b/vendor/modernc.org/libc/stdio/stdio_netbsd_arm.go new file mode 100644 index 00000000..011e105d --- /dev/null +++ b/vendor/modernc.org/libc/stdio/stdio_netbsd_arm.go @@ -0,0 +1,455 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_netbsd_arm.go -pkgname stdio', DO NOT EDIT. + +package stdio + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BUFSIZ = 1024 // stdio.h:182:1: + EOF = -1 // stdio.h:183:1: + FILENAME_MAX = 1024 // stdio.h:192:1: + FOPEN_MAX = 20 // stdio.h:191:1: + FPARSELN_UNESCALL = 0x0f // stdio.h:411:1: + FPARSELN_UNESCCOMM = 0x04 // stdio.h:409:1: + FPARSELN_UNESCCONT = 0x02 // stdio.h:408:1: + FPARSELN_UNESCESC = 0x01 // stdio.h:407:1: + FPARSELN_UNESCREST = 0x08 // stdio.h:410:1: + L_ctermid = 1024 // stdio.h:292:1: + L_cuserid = 9 // stdio.h:293:1: + L_tmpnam = 1024 // stdio.h:198:1: + P_tmpdir = "/tmp/" // stdio.h:196:1: + SEEK_CUR = 1 // stdio.h:209:1: + SEEK_END = 2 // stdio.h:212:1: + SEEK_SET = 0 // stdio.h:206:1: + TMP_MAX = 308915776 // stdio.h:201:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSTDIO = 0 // stdio.h:72:1: + X_IOFBF = 0 // stdio.h:178:1: + X_IOLBF = 1 // stdio.h:179:1: + X_IONBF = 2 // stdio.h:180:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_STDIO_H_ = 0 // stdio.h:38:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_NULL_H_ = 0 // null.h:9:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ +type Ssize_t = int32 /* stdio.h:49:23 */ + +// $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. +// Public domain. + +// 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. +type X__sfpos = struct { + F_pos X__off_t + F_mbstate_in X__mbstate_t + F_mbstate_out X__mbstate_t +} /* stdio.h:67:9 */ + +// $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. +// Public domain. + +// 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. +type Fpos_t = X__sfpos /* stdio.h:70:3 */ + +// 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 +type X__sbuf = struct { + F_base uintptr + F_size int32 +} /* stdio.h:81:1 */ + +// 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! +type X__sFILE = struct { + F_p uintptr + F_r int32 + F_w int32 + F_flags uint16 + F_file int16 + F_bf struct { + F_base uintptr + F_size int32 + } + F_lbfsize int32 + F_cookie uintptr + F_close uintptr + F_read uintptr + F_seek uintptr + F_write uintptr + F_ext struct { + F_base uintptr + F_size int32 + } + F_up uintptr + F_ur int32 + F_ubuf [3]uint8 + F_nbuf [1]uint8 + F_flush uintptr + F_lb_unused [4]uint8 + F_blksize int32 + F_offset X__off_t +} /* stdio.h:112:9 */ + +// 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! +type FILE = X__sFILE /* stdio.h:146:3 */ + +// X/Open CAE Specification Issue 5 Version 2 +type Off_t = X__off_t /* stdio.h:376:18 */ + +type Locale_t = uintptr /* stdio.h:543:25 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/stdio_openbsd_386.go b/vendor/modernc.org/libc/stdio/stdio_openbsd_386.go new file mode 100644 index 00000000..be87fb6f --- /dev/null +++ b/vendor/modernc.org/libc/stdio/stdio_openbsd_386.go @@ -0,0 +1,659 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_openbsd_386.go -pkgname stdio', DO NOT EDIT. + +package stdio + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BUFSIZ = 1024 // stdio.h:168:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EOF = -1 // stdio.h:170:1: + FILENAME_MAX = 1024 // stdio.h:178:1: + FOPEN_MAX = 20 // stdio.h:177:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + L_ctermid = 1024 // stdio.h:306:1: + L_tmpnam = 1024 // stdio.h:184:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + P_tmpdir = "/tmp/" // stdio.h:182:1: + SEEK_CUR = 1 // stdio.h:191:1: + SEEK_END = 2 // stdio.h:194:1: + SEEK_SET = 0 // stdio.h:188:1: + TMP_MAX = 0x7fffffff // stdio.h:185:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSTDIO = 0 // stdio.h:59:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IOFBF = 0 // stdio.h:164:1: + X_IOLBF = 1 // stdio.h:165:1: + X_IONBF = 2 // stdio.h:166:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STDIO_H_ = 0 // stdio.h:39:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: stdio.h,v 1.55 2022/01/05 20:57:27 millert Exp $ +// $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ + +// - +// Copyright (c) 1990 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 5.17 (Berkeley) 6/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Fpos_t = Off_t /* stdio.h:61:15 */ // stdio file position type + +// 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 +type X__sbuf = struct { + F_base uintptr + F_size int32 +} /* stdio.h:70:1 */ + +// 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. +type X__sFILE = struct { + F_p uintptr + F_r int32 + F_w int32 + F_flags int16 + F_file int16 + F_bf struct { + F_base uintptr + F_size int32 + } + F_lbfsize int32 + F_cookie uintptr + F_close uintptr + F_read uintptr + F_seek uintptr + F_write uintptr + F_ext struct { + F_base uintptr + F_size int32 + } + F_up uintptr + F_ur int32 + F_ubuf [3]uint8 + F_nbuf [1]uint8 + F_lb struct { + F_base uintptr + F_size int32 + } + F_blksize int32 + F_offset Fpos_t +} /* stdio.h:99:9 */ + +// 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. +type FILE = X__sFILE /* stdio.h:131:3 */ + +// The macro implementations of putc and putc_unlocked are not +// fully POSIX compliant; they do not set errno on failure + +// The macro implementations of putc and putc_unlocked are not +// fully POSIX compliant; they do not set errno on failure + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go b/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go index d0888198..0b4ed237 100644 --- a/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go +++ b/vendor/modernc.org/libc/stdio/stdio_openbsd_amd64.go @@ -32,8 +32,8 @@ const ( TMP_MAX = 0x7fffffff // stdio.h:185:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_FSTDIO = 0 // stdio.h:59:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: @@ -49,14 +49,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_STDIO_H_ = 0 // stdio.h:39:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: @@ -64,13 +64,13 @@ const ( X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -91,7 +91,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* <builtin>:46:14 */ type X__float128 = float64 /* <builtin>:47:21 */ -// $OpenBSD: stdio.h,v 1.54 2020/09/11 17:56:41 naddy Exp $ +// $OpenBSD: stdio.h,v 1.55 2022/01/05 20:57:27 millert Exp $ // $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ // - @@ -294,7 +294,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -454,18 +454,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -547,27 +546,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/stdio/stdio_openbsd_arm64.go b/vendor/modernc.org/libc/stdio/stdio_openbsd_arm64.go new file mode 100644 index 00000000..010e72d9 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/stdio_openbsd_arm64.go @@ -0,0 +1,673 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_openbsd_arm64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BUFSIZ = 1024 // stdio.h:168:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EOF = -1 // stdio.h:170:1: + FILENAME_MAX = 1024 // stdio.h:178:1: + FOPEN_MAX = 20 // stdio.h:177:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + L_ctermid = 1024 // stdio.h:306:1: + L_tmpnam = 1024 // stdio.h:184:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + P_tmpdir = "/tmp/" // stdio.h:182:1: + SEEK_CUR = 1 // stdio.h:191:1: + SEEK_END = 2 // stdio.h:194:1: + SEEK_SET = 0 // stdio.h:188:1: + TMP_MAX = 0x7fffffff // stdio.h:185:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSTDIO = 0 // stdio.h:59:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_IOFBF = 0 // stdio.h:164:1: + X_IOLBF = 1 // stdio.h:165:1: + X_IONBF = 2 // stdio.h:166:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_STDIO_H_ = 0 // stdio.h:39:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: stdio.h,v 1.55 2022/01/05 20:57:27 millert Exp $ +// $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ + +// - +// Copyright (c) 1990 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 5.17 (Berkeley) 6/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Fpos_t = Off_t /* stdio.h:61:15 */ // stdio file position type + +// 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 +type X__sbuf = struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte +} /* stdio.h:70:1 */ + +// 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. +type X__sFILE = struct { + F_p uintptr + F_r int32 + F_w int32 + F_flags int16 + F_file int16 + F__ccgo_pad1 [4]byte + F_bf struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_lbfsize int32 + F__ccgo_pad2 [4]byte + F_cookie uintptr + F_close uintptr + F_read uintptr + F_seek uintptr + F_write uintptr + F_ext struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_up uintptr + F_ur int32 + F_ubuf [3]uint8 + F_nbuf [1]uint8 + F_lb struct { + F_base uintptr + F_size int32 + F__ccgo_pad1 [4]byte + } + F_blksize int32 + F__ccgo_pad3 [4]byte + F_offset Fpos_t +} /* stdio.h:99:9 */ + +// 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. +type FILE = X__sFILE /* stdio.h:131:3 */ + +// The macro implementations of putc and putc_unlocked are not +// fully POSIX compliant; they do not set errno on failure + +// The macro implementations of putc and putc_unlocked are not +// fully POSIX compliant; they do not set errno on failure + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/stdio_windows_386.go b/vendor/modernc.org/libc/stdio/stdio_windows_386.go index ca396f23..8ee5e35d 100644 --- a/vendor/modernc.org/libc/stdio/stdio_windows_386.go +++ b/vendor/modernc.org/libc/stdio/stdio_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdio\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdio\stdio_windows_386.go -pkgname stdio', DO NOT EDIT. +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_windows_386.go -pkgname stdio', DO NOT EDIT. package stdio @@ -15,141 +15,152 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BUFSIZ = 512 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - EOF = -1 - FILENAME_MAX = 260 - FOPEN_MAX = 20 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - SEEK_CUR = 1 - SEEK_END = 2 - SEEK_SET = 0 - STDERR_FILENO = 2 - STDIN_FILENO = 0 - STDOUT_FILENO = 1 - SYS_OPEN = 20 - TMP_MAX = 32767 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_PERROR_DEFINED = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_WPERROR_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_FSEEKO = 0 - X_FILE_OFFSET_BITS_SET_FTELLO = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FPOS_T_DEFINED = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STDIO = 0 - X_INC_STDIO_S = 0 - X_INC_SWPRINTF_INL = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IOB_ENTRIES = 20 - X_IOEOF = 0x0010 - X_IOERR = 0x0020 - X_IOFBF = 0x0000 - X_IOLBF = 0x0040 - X_IOMYBUF = 0x0008 - X_IONBF = 0x0004 - X_IOREAD = 0x0001 - X_IORW = 0x0080 - X_IOSTRG = 0x0040 - X_IOWRT = 0x0002 - X_MT = 0 - X_M_IX86 = 600 - X_NFILE = 512 - X_NSTREAM_ = 512 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_OLD_P_OVERLAY = 2 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_P_DETACH = 4 - X_P_NOWAIT = 1 - X_P_NOWAITO = 3 - X_P_OVERLAY = 2 - X_P_WAIT = 0 - X_P_tmpdir = "\\" - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SPAWNV_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_STDIO_DEFINED = 0 - X_STDIO_S_DEFINED = 0 - X_STDSTREAM_DEFINED = 0 - X_SYS_OPEN = 20 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_TWO_DIGIT_EXPONENT = 0x1 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WAIT_CHILD = 0 - X_WAIT_GRANDCHILD = 1 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WSPAWN_DEFINED = 0 - X_WSTDIO_DEFINED = 0 - X_WSTDIO_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + BUFSIZ = 512 // stdio.h:17:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + EOF = -1 // stdio.h:21:1: + FILENAME_MAX = 260 // stdio.h:61:1: + FOPEN_MAX = 20 // stdio.h:62:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + SEEK_CUR = 1 // stdio.h:53:1: + SEEK_END = 2 // stdio.h:54:1: + SEEK_SET = 0 // stdio.h:55:1: + STDERR_FILENO = 2 // stdio.h:59:1: + STDIN_FILENO = 0 // stdio.h:57:1: + STDOUT_FILENO = 1 // stdio.h:58:1: + SYS_OPEN = 20 // stdio.h:1486:1: + TMP_MAX = 32767 // stdio.h:64:1: + TMP_MAX_S = 32767 // stdio_s.h:27:3: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // stdio.h:728:1: + X_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS = 4 // corecrt_stdio_config.h:23:1: + X_CRT_INTERNAL_LOCAL_SCANF_OPTIONS = 2 // corecrt_stdio_config.h:27:1: + X_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY = 0x0008 // corecrt_stdio_config.h:15:1: + X_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS = 0x0010 // corecrt_stdio_config.h:16:1: + X_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION = 0x0001 // corecrt_stdio_config.h:12:1: + X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS = 0x0004 // corecrt_stdio_config.h:14:1: + X_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR = 0x0002 // corecrt_stdio_config.h:13:1: + X_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY = 0x0004 // corecrt_stdio_config.h:20:1: + X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS = 0x0002 // corecrt_stdio_config.h:19:1: + X_CRT_INTERNAL_SCANF_SECURECRT = 0x0001 // corecrt_stdio_config.h:18:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_PERROR_DEFINED = 0 // stdio.h:712:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WPERROR_DEFINED = 0 // stdio.h:1423:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_DEFINED = 0 // stdio.h:35:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FILE_OFFSET_BITS_SET_FSEEKO = 0 // stdio.h:692:1: + X_FILE_OFFSET_BITS_SET_FTELLO = 0 // stdio.h:699:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FPOS_T_DEFINED = 0 // stdio.h:98:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STDIO = 0 // stdio.h:7:1: + X_INC_STDIO_S = 0 // stdio_s.h:7:1: + X_INC_SWPRINTF_INL = 0 // swprintf.inl:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IOB_ENTRIES = 20 // stdio.h:20:1: + X_IOEOF = 0x0010 // stdio.h:127:1: + X_IOERR = 0x0020 // stdio.h:128:1: + X_IOFBF = 0x0000 // stdio.h:122:1: + X_IOLBF = 0x0040 // stdio.h:123:1: + X_IOMYBUF = 0x0008 // stdio.h:126:1: + X_IONBF = 0x0004 // stdio.h:124:1: + X_IOREAD = 0x0001 // stdio.h:119:1: + X_IORW = 0x0080 // stdio.h:130:1: + X_IOSTRG = 0x0040 // stdio.h:129:1: + X_IOWRT = 0x0002 // stdio.h:120:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NFILE = 512 // stdio.h:18:1: + X_NSTREAM_ = 512 // stdio.h:19:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_OLD_P_OVERLAY = 2 // stdio.h:1557:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_P_DETACH = 4 // stdio.h:1559:1: + X_P_NOWAIT = 1 // stdio.h:1556:1: + X_P_NOWAITO = 3 // stdio.h:1558:1: + X_P_OVERLAY = 2 // stdio.h:1560:1: + X_P_WAIT = 0 // stdio.h:1555:1: + X_P_tmpdir = "\\" // stdio.h:42:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPAWNV_DEFINED = 0 // stdio.h:1567:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_STDIO_CONFIG_DEFINED = 0 // corecrt_stdio_config.h:8:1: + X_STDIO_DEFINED = 0 // stdio.h:1453:1: + X_STDIO_S_DEFINED = 0 // stdio_s.h:25:1: + X_STDSTREAM_DEFINED = 0 // stdio.h:112:1: + X_SYS_OPEN = 20 // stdio.h:63:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_TWO_DIGIT_EXPONENT = 0x1 // stdio.h:135:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WAIT_CHILD = 0 // stdio.h:1562:1: + X_WAIT_GRANDCHILD = 1 // stdio.h:1563:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WSPAWN_DEFINED = 0 // stdio.h:1543:1: + X_WSTDIO_DEFINED = 0 // stdio.h:958:1: + X_WSTDIO_S_DEFINED = 0 // stdio_s.h:579:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -170,6 +181,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // * // This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the Wine project. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + +// * +// This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. @@ -203,6 +219,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -243,26 +265,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -288,36 +312,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// Undefine __mingw_<printf> macros. +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_iobuf = struct { F_ptr uintptr @@ -328,9 +345,9 @@ type X_iobuf = struct { F_charbuf int32 F_bufsiz int32 F_tmpfname uintptr -} /* stdio.h:26:3 */ +} /* stdio.h:24:3 */ -type FILE = X_iobuf /* stdio.h:36:25 */ +type FILE = X_iobuf /* stdio.h:34:25 */ type X_off_t = int32 /* _mingw_off_t.h:5:16 */ type Off32_t = int32 /* _mingw_off_t.h:7:16 */ @@ -340,13 +357,6 @@ type Off64_t = int64 /* _mingw_off_t.h:15:39 */ type Off_t = Off64_t /* _mingw_off_t.h:24:17 */ // A pointer to an array of FILE -type Fpos_t = int64 /* stdio.h:104:37 */ - -// * -// This file has no copyright assigned and is placed in the Public Domain. -// This file is part of the mingw-w64 runtime package. -// No warranty is given; refer to the file DISCLAIMER.PD within this package. - -// Define __mingw_<printf> macros. +type Fpos_t = int64 /* stdio.h:102:37 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go b/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go index aa94ac0d..9d240249 100644 --- a/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdlib/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdlib/stdlib_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. package stdlib diff --git a/vendor/modernc.org/libc/stdlib/capi_freebsd_arm.go b/vendor/modernc.org/libc/stdlib/capi_freebsd_arm.go new file mode 100644 index 00000000..74f74ecf --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_freebsd_arm.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdlib/capi_freebsd_arm64.go b/vendor/modernc.org/libc/stdlib/capi_freebsd_arm64.go new file mode 100644 index 00000000..1fe71b47 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_freebsd_amd64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdlib/capi_netbsd_arm.go b/vendor/modernc.org/libc/stdlib/capi_netbsd_arm.go new file mode 100644 index 00000000..357062a1 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_netbsd_arm.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdlib/capi_openbsd_386.go b/vendor/modernc.org/libc/stdlib/capi_openbsd_386.go new file mode 100644 index 00000000..cde9550b --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_386.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdlib/capi_openbsd_arm64.go b/vendor/modernc.org/libc/stdlib/capi_openbsd_arm64.go new file mode 100644 index 00000000..04d26a46 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_arm64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdlib/capi_windows_386.go b/vendor/modernc.org/libc/stdlib/capi_windows_386.go index c65f2705..50dcc477 100644 --- a/vendor/modernc.org/libc/stdlib/capi_windows_386.go +++ b/vendor/modernc.org/libc/stdlib/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdlib\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdlib\stdlib_windows_386.go -pkgname stdlib', DO NOT EDIT. +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_windows_386.go -pkgname stdlib', DO NOT EDIT. package stdlib diff --git a/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go index 4767f05a..7babc1f1 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdlib/stdlib_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_darwin_amd64.go -pkgname stdlib', DO NOT EDIT. package stdlib @@ -15,305 +15,305 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 - BUS_ADRALN = 1 - BUS_ADRERR = 2 - BUS_NOOP = 0 - BUS_OBJERR = 3 - BYTE_ORDER = 1234 - CLD_CONTINUED = 6 - CLD_DUMPED = 3 - CLD_EXITED = 1 - CLD_KILLED = 2 - CLD_NOOP = 0 - CLD_STOPPED = 5 - CLD_TRAPPED = 4 - CPUMON_MAKE_FATAL = 0x1000 - EXIT_FAILURE = 1 - EXIT_SUCCESS = 0 - FOOTPRINT_INTERVAL_RESET = 0x1 - FPE_FLTDIV = 1 - FPE_FLTINV = 5 - FPE_FLTOVF = 2 - FPE_FLTRES = 4 - FPE_FLTSUB = 6 - FPE_FLTUND = 3 - FPE_INTDIV = 7 - FPE_INTOVF = 8 - FPE_NOOP = 0 - FP_CHOP = 3 - FP_PREC_24B = 0 - FP_PREC_53B = 2 - FP_PREC_64B = 3 - FP_RND_DOWN = 1 - FP_RND_NEAR = 0 - FP_RND_UP = 2 - FP_STATE_BYTES = 512 - ILL_BADSTK = 8 - ILL_COPROC = 7 - ILL_ILLADR = 5 - ILL_ILLOPC = 1 - ILL_ILLOPN = 4 - ILL_ILLTRP = 2 - ILL_NOOP = 0 - ILL_PRVOPC = 3 - ILL_PRVREG = 6 - INT16_MAX = 32767 - INT16_MIN = -32768 - INT32_MAX = 2147483647 - INT32_MIN = -2147483648 - INT64_MAX = 9223372036854775807 - INT64_MIN = -9223372036854775808 - INT8_MAX = 127 - INT8_MIN = -128 - INTMAX_MAX = 9223372036854775807 - INTMAX_MIN = -9223372036854775808 - INTPTR_MAX = 9223372036854775807 - INTPTR_MIN = -9223372036854775808 - INT_FAST16_MAX = 32767 - INT_FAST16_MIN = -32768 - INT_FAST32_MAX = 2147483647 - INT_FAST32_MIN = -2147483648 - INT_FAST64_MAX = 9223372036854775807 - INT_FAST64_MIN = -9223372036854775808 - INT_FAST8_MAX = 127 - INT_FAST8_MIN = -128 - INT_LEAST16_MAX = 32767 - INT_LEAST16_MIN = -32768 - INT_LEAST32_MAX = 2147483647 - INT_LEAST32_MIN = -2147483648 - INT_LEAST64_MAX = 9223372036854775807 - INT_LEAST64_MIN = -9223372036854775808 - INT_LEAST8_MAX = 127 - INT_LEAST8_MIN = -128 - IOPOL_APPLICATION = 5 - IOPOL_ATIME_UPDATES_DEFAULT = 0 - IOPOL_ATIME_UPDATES_OFF = 1 - IOPOL_DEFAULT = 0 - IOPOL_IMPORTANT = 1 - IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0 - IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1 - IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2 - IOPOL_NORMAL = 1 - IOPOL_PASSIVE = 2 - IOPOL_SCOPE_DARWIN_BG = 2 - IOPOL_SCOPE_PROCESS = 0 - IOPOL_SCOPE_THREAD = 1 - IOPOL_STANDARD = 5 - IOPOL_THROTTLE = 3 - IOPOL_TYPE_DISK = 0 - IOPOL_TYPE_VFS_ATIME_UPDATES = 2 - IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 - IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4 - IOPOL_UTILITY = 4 - IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1 - IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0 - LITTLE_ENDIAN = 1234 - MINSIGSTKSZ = 32768 - NSIG = 32 - PDP_ENDIAN = 3412 - POLL_ERR = 4 - POLL_HUP = 6 - POLL_IN = 1 - POLL_MSG = 3 - POLL_OUT = 2 - POLL_PRI = 5 - PRIO_DARWIN_BG = 0x1000 - PRIO_DARWIN_NONUI = 0x1001 - PRIO_DARWIN_PROCESS = 4 - PRIO_DARWIN_THREAD = 3 - PRIO_MAX = 20 - PRIO_MIN = -20 - PRIO_PGRP = 1 - PRIO_PROCESS = 0 - PRIO_USER = 2 - PTRDIFF_MAX = 9223372036854775807 - PTRDIFF_MIN = -9223372036854775808 - RAND_MAX = 0x7fffffff - RLIMIT_AS = 5 - RLIMIT_CORE = 4 - RLIMIT_CPU = 0 - RLIMIT_CPU_USAGE_MONITOR = 0x2 - RLIMIT_DATA = 2 - RLIMIT_FOOTPRINT_INTERVAL = 0x4 - RLIMIT_FSIZE = 1 - RLIMIT_MEMLOCK = 6 - RLIMIT_NOFILE = 8 - RLIMIT_NPROC = 7 - RLIMIT_RSS = 5 - RLIMIT_STACK = 3 - RLIMIT_THREAD_CPULIMITS = 0x3 - RLIMIT_WAKEUPS_MONITOR = 0x1 - RLIM_NLIMITS = 9 - RSIZE_MAX = 9223372036854775807 - RUSAGE_CHILDREN = -1 - RUSAGE_INFO_CURRENT = 4 - RUSAGE_INFO_V0 = 0 - RUSAGE_INFO_V1 = 1 - RUSAGE_INFO_V2 = 2 - RUSAGE_INFO_V3 = 3 - RUSAGE_INFO_V4 = 4 - RUSAGE_SELF = 0 - SA_64REGSET = 0x0200 - SA_NOCLDSTOP = 0x0008 - SA_NOCLDWAIT = 0x0020 - SA_NODEFER = 0x0010 - SA_ONSTACK = 0x0001 - SA_RESETHAND = 0x0004 - SA_RESTART = 0x0002 - SA_SIGINFO = 0x0040 - SA_USERSPACE_MASK = 127 - SA_USERTRAMP = 0x0100 - SEGV_ACCERR = 2 - SEGV_MAPERR = 1 - SEGV_NOOP = 0 - SIGABRT = 6 - SIGALRM = 14 - SIGBUS = 10 - SIGCHLD = 20 - SIGCONT = 19 - SIGEMT = 7 - SIGEV_NONE = 0 - SIGEV_SIGNAL = 1 - SIGEV_THREAD = 3 - SIGFPE = 8 - SIGHUP = 1 - SIGILL = 4 - SIGINFO = 29 - SIGINT = 2 - SIGIO = 23 - SIGIOT = 6 - SIGKILL = 9 - SIGPIPE = 13 - SIGPROF = 27 - SIGQUIT = 3 - SIGSEGV = 11 - SIGSTKSZ = 131072 - SIGSTOP = 17 - SIGSYS = 12 - SIGTERM = 15 - SIGTRAP = 5 - SIGTSTP = 18 - SIGTTIN = 21 - SIGTTOU = 22 - SIGURG = 16 - SIGUSR1 = 30 - SIGUSR2 = 31 - SIGVTALRM = 26 - SIGWINCH = 28 - SIGXCPU = 24 - SIGXFSZ = 25 - SIG_ATOMIC_MAX = 2147483647 - SIG_ATOMIC_MIN = -2147483648 - SIG_BLOCK = 1 - SIG_SETMASK = 3 - SIG_UNBLOCK = 2 - SIZE_MAX = 18446744073709551615 - SI_ASYNCIO = 0x10004 - SI_MESGQ = 0x10005 - SI_QUEUE = 0x10002 - SI_TIMER = 0x10003 - SI_USER = 0x10001 - SS_DISABLE = 0x0004 - SS_ONSTACK = 0x0001 - SV_INTERRUPT = 2 - SV_NOCLDSTOP = 8 - SV_NODEFER = 16 - SV_ONSTACK = 1 - SV_RESETHAND = 4 - SV_SIGINFO = 64 - TRAP_BRKPT = 1 - TRAP_TRACE = 2 - UINT16_MAX = 65535 - UINT32_MAX = 4294967295 - UINT64_MAX = 18446744073709551615 - UINT8_MAX = 255 - UINTMAX_MAX = 18446744073709551615 - UINTPTR_MAX = 18446744073709551615 - UINT_FAST16_MAX = 65535 - UINT_FAST32_MAX = 4294967295 - UINT_FAST64_MAX = 18446744073709551615 - UINT_FAST8_MAX = 255 - UINT_LEAST16_MAX = 65535 - UINT_LEAST32_MAX = 4294967295 - UINT_LEAST64_MAX = 18446744073709551615 - UINT_LEAST8_MAX = 255 - WAIT_ANY = -1 - WAIT_MYPGRP = 0 - WAKEMON_DISABLE = 0x02 - WAKEMON_ENABLE = 0x01 - WAKEMON_GET_PARAMS = 0x04 - WAKEMON_MAKE_FATAL = 0x10 - WAKEMON_SET_DEFAULTS = 0x08 - WCHAR_MAX = 2147483647 - WCHAR_MIN = -2147483648 - WCONTINUED = 0x00000010 - WCOREFLAG = 0200 - WEXITED = 0x00000004 - WINT_MAX = 2147483647 - WINT_MIN = -2147483648 - WNOHANG = 0x00000001 - WNOWAIT = 0x00000020 - WSTOPPED = 0x00000008 - WUNTRACED = 0x00000002 - X_ALLOCA_H_ = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_SIGNAL_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CT_RUNE_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_I386_SIGNAL_H_ = 1 - X_I386__ENDIAN_H_ = 0 - X_ID_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MACH_I386__STRUCTS_H_ = 0 - X_MACH_MACHINE__STRUCTS_H_ = 0 - X_MALLOC_UNDERSCORE_MALLOC_H_ = 0 - X_MCONTEXT_T = 0 - X_MODE_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RLIMIT_POSIX_FLAG = 0x1000 - X_RUNE_T = 0 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_STDLIB_H_ = 0 - X_SYS_RESOURCE_H_ = 0 - X_SYS_SIGNAL_H_ = 0 - X_SYS_WAIT_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UID_T = 0 - X_UINT32_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_WCHAR_T = 0 - X_WSTOPPED = 0177 + BIG_ENDIAN = 4321 // endian.h:94:1: + BUS_ADRALN = 1 // signal.h:241:1: + BUS_ADRERR = 2 // signal.h:242:1: + BUS_NOOP = 0 // signal.h:239:1: + BUS_OBJERR = 3 // signal.h:243:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CLD_CONTINUED = 6 // signal.h:258:1: + CLD_DUMPED = 3 // signal.h:255:1: + CLD_EXITED = 1 // signal.h:253:1: + CLD_KILLED = 2 // signal.h:254:1: + CLD_NOOP = 0 // signal.h:251:1: + CLD_STOPPED = 5 // signal.h:257:1: + CLD_TRAPPED = 4 // signal.h:256:1: + CPUMON_MAKE_FATAL = 0x1000 // resource.h:393:1: + EXIT_FAILURE = 1 // stdlib.h:102:1: + EXIT_SUCCESS = 0 // stdlib.h:103:1: + FOOTPRINT_INTERVAL_RESET = 0x1 // resource.h:398:1: + FPE_FLTDIV = 1 // signal.h:221:1: + FPE_FLTINV = 5 // signal.h:225:1: + FPE_FLTOVF = 2 // signal.h:222:1: + FPE_FLTRES = 4 // signal.h:224:1: + FPE_FLTSUB = 6 // signal.h:226:1: + FPE_FLTUND = 3 // signal.h:223:1: + FPE_INTDIV = 7 // signal.h:227:1: + FPE_INTOVF = 8 // signal.h:228:1: + FPE_NOOP = 0 // signal.h:219:1: + FP_CHOP = 3 // _structs.h:112:1: + FP_PREC_24B = 0 // _structs.h:103:1: + FP_PREC_53B = 2 // _structs.h:104:1: + FP_PREC_64B = 3 // _structs.h:105:1: + FP_RND_DOWN = 1 // _structs.h:110:1: + FP_RND_NEAR = 0 // _structs.h:109:1: + FP_RND_UP = 2 // _structs.h:111:1: + FP_STATE_BYTES = 512 // _structs.h:276:1: + ILL_BADSTK = 8 // signal.h:215:1: + ILL_COPROC = 7 // signal.h:214:1: + ILL_ILLADR = 5 // signal.h:212:1: + ILL_ILLOPC = 1 // signal.h:208:1: + ILL_ILLOPN = 4 // signal.h:211:1: + ILL_ILLTRP = 2 // signal.h:209:1: + ILL_NOOP = 0 // signal.h:206:1: + ILL_PRVOPC = 3 // signal.h:210:1: + ILL_PRVREG = 6 // signal.h:213:1: + INT16_MAX = 32767 // stdint.h:599:1: + INT16_MIN = -32768 // stdint.h:600:1: + INT32_MAX = 2147483647 // stdint.h:555:1: + INT32_MIN = -2147483648 // stdint.h:556:1: + INT64_MAX = 9223372036854775807 // stdint.h:461:1: + INT64_MIN = -9223372036854775808 // stdint.h:462:1: + INT8_MAX = 127 // stdint.h:621:1: + INT8_MIN = -128 // stdint.h:622:1: + INTMAX_MAX = 9223372036854775807 // stdint.h:663:1: + INTMAX_MIN = -9223372036854775808 // stdint.h:662:1: + INTPTR_MAX = 9223372036854775807 // stdint.h:649:1: + INTPTR_MIN = -9223372036854775808 // stdint.h:648:1: + INT_FAST16_MAX = 32767 // stdint.h:615:1: + INT_FAST16_MIN = -32768 // stdint.h:614:1: + INT_FAST32_MAX = 2147483647 // stdint.h:574:1: + INT_FAST32_MIN = -2147483648 // stdint.h:573:1: + INT_FAST64_MAX = 9223372036854775807 // stdint.h:483:1: + INT_FAST64_MIN = -9223372036854775808 // stdint.h:482:1: + INT_FAST8_MAX = 127 // stdint.h:634:1: + INT_FAST8_MIN = -128 // stdint.h:633:1: + INT_LEAST16_MAX = 32767 // stdint.h:612:1: + INT_LEAST16_MIN = -32768 // stdint.h:611:1: + INT_LEAST32_MAX = 2147483647 // stdint.h:571:1: + INT_LEAST32_MIN = -2147483648 // stdint.h:570:1: + INT_LEAST64_MAX = 9223372036854775807 // stdint.h:480:1: + INT_LEAST64_MIN = -9223372036854775808 // stdint.h:479:1: + INT_LEAST8_MAX = 127 // stdint.h:631:1: + INT_LEAST8_MIN = -128 // stdint.h:630:1: + IOPOL_APPLICATION = 5 // resource.h:427:1: + IOPOL_ATIME_UPDATES_DEFAULT = 0 // resource.h:431:1: + IOPOL_ATIME_UPDATES_OFF = 1 // resource.h:432:1: + IOPOL_DEFAULT = 0 // resource.h:419:1: + IOPOL_IMPORTANT = 1 // resource.h:420:1: + IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0 // resource.h:434:1: + IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1 // resource.h:435:1: + IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2 // resource.h:436:1: + IOPOL_NORMAL = 1 // resource.h:428:1: + IOPOL_PASSIVE = 2 // resource.h:421:1: + IOPOL_SCOPE_DARWIN_BG = 2 // resource.h:416:1: + IOPOL_SCOPE_PROCESS = 0 // resource.h:414:1: + IOPOL_SCOPE_THREAD = 1 // resource.h:415:1: + IOPOL_STANDARD = 5 // resource.h:424:1: + IOPOL_THROTTLE = 3 // resource.h:422:1: + IOPOL_TYPE_DISK = 0 // resource.h:408:1: + IOPOL_TYPE_VFS_ATIME_UPDATES = 2 // resource.h:409:1: + IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 // resource.h:410:1: + IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4 // resource.h:411:1: + IOPOL_UTILITY = 4 // resource.h:423:1: + IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1 // resource.h:439:1: + IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0 // resource.h:438:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MINSIGSTKSZ = 32768 // signal.h:340:1: + NSIG = 32 // signal.h:79:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + POLL_ERR = 4 // signal.h:264:1: + POLL_HUP = 6 // signal.h:266:1: + POLL_IN = 1 // signal.h:261:1: + POLL_MSG = 3 // signal.h:263:1: + POLL_OUT = 2 // signal.h:262:1: + POLL_PRI = 5 // signal.h:265:1: + PRIO_DARWIN_BG = 0x1000 // resource.h:120:1: + PRIO_DARWIN_NONUI = 0x1001 // resource.h:126:1: + PRIO_DARWIN_PROCESS = 4 // resource.h:106:1: + PRIO_DARWIN_THREAD = 3 // resource.h:105:1: + PRIO_MAX = 20 // resource.h:113:1: + PRIO_MIN = -20 // resource.h:112:1: + PRIO_PGRP = 1 // resource.h:101:1: + PRIO_PROCESS = 0 // resource.h:100:1: + PRIO_USER = 2 // resource.h:102:1: + PTRDIFF_MAX = 9223372036854775807 // stdint.h:652:1: + PTRDIFF_MIN = -9223372036854775808 // stdint.h:651:1: + RAND_MAX = 0x7fffffff // stdlib.h:105:1: + RLIMIT_AS = 5 // resource.h:349:1: + RLIMIT_CORE = 4 // resource.h:348:1: + RLIMIT_CPU = 0 // resource.h:344:1: + RLIMIT_CPU_USAGE_MONITOR = 0x2 // resource.h:377:1: + RLIMIT_DATA = 2 // resource.h:346:1: + RLIMIT_FOOTPRINT_INTERVAL = 0x4 // resource.h:379:1: + RLIMIT_FSIZE = 1 // resource.h:345:1: + RLIMIT_MEMLOCK = 6 // resource.h:352:1: + RLIMIT_NOFILE = 8 // resource.h:355:1: + RLIMIT_NPROC = 7 // resource.h:353:1: + RLIMIT_RSS = 5 // resource.h:351:1: + RLIMIT_STACK = 3 // resource.h:347:1: + RLIMIT_THREAD_CPULIMITS = 0x3 // resource.h:378:1: + RLIMIT_WAKEUPS_MONITOR = 0x1 // resource.h:376:1: + RLIM_NLIMITS = 9 // resource.h:357:1: + RSIZE_MAX = 9223372036854775807 // stdint.h:658:1: + RUSAGE_CHILDREN = -1 // resource.h:141:1: + RUSAGE_INFO_CURRENT = 4 // resource.h:191:1: + RUSAGE_INFO_V0 = 0 // resource.h:186:1: + RUSAGE_INFO_V1 = 1 // resource.h:187:1: + RUSAGE_INFO_V2 = 2 // resource.h:188:1: + RUSAGE_INFO_V3 = 3 // resource.h:189:1: + RUSAGE_INFO_V4 = 4 // resource.h:190:1: + RUSAGE_SELF = 0 // resource.h:140:1: + SA_64REGSET = 0x0200 // signal.h:308:1: + SA_NOCLDSTOP = 0x0008 // signal.h:301:1: + SA_NOCLDWAIT = 0x0020 // signal.h:303:1: + SA_NODEFER = 0x0010 // signal.h:302:1: + SA_ONSTACK = 0x0001 // signal.h:298:1: + SA_RESETHAND = 0x0004 // signal.h:300:1: + SA_RESTART = 0x0002 // signal.h:299:1: + SA_SIGINFO = 0x0040 // signal.h:304:1: + SA_USERSPACE_MASK = 127 // signal.h:314:1: + SA_USERTRAMP = 0x0100 // signal.h:306:1: + SEGV_ACCERR = 2 // signal.h:235:1: + SEGV_MAPERR = 1 // signal.h:234:1: + SEGV_NOOP = 0 // signal.h:232:1: + SIGABRT = 6 // signal.h:89:1: + SIGALRM = 14 // signal.h:102:1: + SIGBUS = 10 // signal.h:98:1: + SIGCHLD = 20 // signal.h:108:1: + SIGCONT = 19 // signal.h:107:1: + SIGEMT = 7 // signal.h:94:1: + SIGEV_NONE = 0 // signal.h:164:1: + SIGEV_SIGNAL = 1 // signal.h:165:1: + SIGEV_THREAD = 3 // signal.h:166:1: + SIGFPE = 8 // signal.h:96:1: + SIGHUP = 1 // signal.h:84:1: + SIGILL = 4 // signal.h:87:1: + SIGINFO = 29 // signal.h:120:1: + SIGINT = 2 // signal.h:85:1: + SIGIO = 23 // signal.h:112:1: + SIGIOT = 6 // signal.h:93:1: + SIGKILL = 9 // signal.h:97:1: + SIGPIPE = 13 // signal.h:101:1: + SIGPROF = 27 // signal.h:117:1: + SIGQUIT = 3 // signal.h:86:1: + SIGSEGV = 11 // signal.h:99:1: + SIGSTKSZ = 131072 // signal.h:341:1: + SIGSTOP = 17 // signal.h:105:1: + SIGSYS = 12 // signal.h:100:1: + SIGTERM = 15 // signal.h:103:1: + SIGTRAP = 5 // signal.h:88:1: + SIGTSTP = 18 // signal.h:106:1: + SIGTTIN = 21 // signal.h:109:1: + SIGTTOU = 22 // signal.h:110:1: + SIGURG = 16 // signal.h:104:1: + SIGUSR1 = 30 // signal.h:122:1: + SIGUSR2 = 31 // signal.h:123:1: + SIGVTALRM = 26 // signal.h:116:1: + SIGWINCH = 28 // signal.h:119:1: + SIGXCPU = 24 // signal.h:114:1: + SIGXFSZ = 25 // signal.h:115:1: + SIG_ATOMIC_MAX = 2147483647 // stdint.h:668:1: + SIG_ATOMIC_MIN = -2147483648 // stdint.h:667:1: + SIG_BLOCK = 1 // signal.h:319:1: + SIG_SETMASK = 3 // signal.h:321:1: + SIG_UNBLOCK = 2 // signal.h:320:1: + SIZE_MAX = 18446744073709551615 // stdint.h:653:1: + SI_ASYNCIO = 0x10004 // signal.h:327:1: + SI_MESGQ = 0x10005 // signal.h:328:1: + SI_QUEUE = 0x10002 // signal.h:325:1: + SI_TIMER = 0x10003 // signal.h:326:1: + SI_USER = 0x10001 // signal.h:324:1: + SS_DISABLE = 0x0004 // signal.h:339:1: + SS_ONSTACK = 0x0001 // signal.h:338:1: + SV_INTERRUPT = 2 // signal.h:355:1: + SV_NOCLDSTOP = 8 // signal.h:358:1: + SV_NODEFER = 16 // signal.h:357:1: + SV_ONSTACK = 1 // signal.h:354:1: + SV_RESETHAND = 4 // signal.h:356:1: + SV_SIGINFO = 64 // signal.h:359:1: + TRAP_BRKPT = 1 // signal.h:246:1: + TRAP_TRACE = 2 // signal.h:247:1: + UINT16_MAX = 65535 // stdint.h:601:1: + UINT32_MAX = 4294967295 // stdint.h:557:1: + UINT64_MAX = 18446744073709551615 // stdint.h:463:1: + UINT8_MAX = 255 // stdint.h:623:1: + UINTMAX_MAX = 18446744073709551615 // stdint.h:664:1: + UINTPTR_MAX = 18446744073709551615 // stdint.h:650:1: + UINT_FAST16_MAX = 65535 // stdint.h:616:1: + UINT_FAST32_MAX = 4294967295 // stdint.h:575:1: + UINT_FAST64_MAX = 18446744073709551615 // stdint.h:484:1: + UINT_FAST8_MAX = 255 // stdint.h:635:1: + UINT_LEAST16_MAX = 65535 // stdint.h:613:1: + UINT_LEAST32_MAX = 4294967295 // stdint.h:572:1: + UINT_LEAST64_MAX = 18446744073709551615 // stdint.h:481:1: + UINT_LEAST8_MAX = 255 // stdint.h:632:1: + WAIT_ANY = -1 // wait.h:183:1: + WAIT_MYPGRP = 0 // wait.h:184:1: + WAKEMON_DISABLE = 0x02 // resource.h:385:1: + WAKEMON_ENABLE = 0x01 // resource.h:384:1: + WAKEMON_GET_PARAMS = 0x04 // resource.h:386:1: + WAKEMON_MAKE_FATAL = 0x10 // resource.h:388:1: + WAKEMON_SET_DEFAULTS = 0x08 // resource.h:387:1: + WCHAR_MAX = 2147483647 // stdint.h:678:1: + WCHAR_MIN = -2147483648 // stdint.h:682:1: + WCONTINUED = 0x00000010 // wait.h:173:1: + WCOREFLAG = 0200 // wait.h:132:1: + WEXITED = 0x00000004 // wait.h:168:1: + WINT_MAX = 2147483647 // stdint.h:674:1: + WINT_MIN = -2147483648 // stdint.h:673:1: + WNOHANG = 0x00000001 // wait.h:121:1: + WNOWAIT = 0x00000020 // wait.h:174:1: + WSTOPPED = 0x00000008 // wait.h:171:1: + WUNTRACED = 0x00000002 // wait.h:122:1: + X_ALLOCA_H_ = 0 // alloca.h:25:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_SIGNAL_H_ = 0 // signal.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CT_RUNE_T = 0 // _ct_rune_t.h:30:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_I386_SIGNAL_H_ = 1 // signal.h:34:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MACH_I386__STRUCTS_H_ = 0 // _structs.h:33:1: + X_MACH_MACHINE__STRUCTS_H_ = 0 // _structs.h:30:1: + X_MALLOC_UNDERSCORE_MALLOC_H_ = 0 // _malloc.h:25:1: + X_MCONTEXT_T = 0 // _mcontext.h:202:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RLIMIT_POSIX_FLAG = 0x1000 // resource.h:359:1: + X_RUNE_T = 0 // _rune_t.h:29:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_STDLIB_H_ = 0 // stdlib.h:59:1: + X_SYS_RESOURCE_H_ = 0 // resource.h:65:1: + X_SYS_SIGNAL_H_ = 0 // signal.h:70:1: + X_SYS_WAIT_H_ = 0 // wait.h:65:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINT32_T = 0 // _uint32_t.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_WCHAR_T = 0 // _wchar_t.h:32:1: + X_WSTOPPED = 0177 // wait.h:137:1: ) // Copyright (c) 2000 Apple Computer, Inc. All rights reserved. @@ -5537,8 +5537,9 @@ type Rlim_t = X__uint64_t /* resource.h:89:25 */ // getrusage(). // // Note: All values other than ru_utime and ru_stime are implementaiton -// defined and subject to change in a future release. Their use -// is discouraged for standards compliant programs. +// +// defined and subject to change in a future release. Their use +// is discouraged for standards compliant programs. type Rusage = struct { Fru_utime struct { Ftv_sec X__darwin_time_t diff --git a/vendor/modernc.org/libc/stdlib/stdlib_darwin_arm64.go b/vendor/modernc.org/libc/stdlib/stdlib_darwin_arm64.go index 8ba53c42..903127f6 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_darwin_arm64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_darwin_arm64.go @@ -3891,8 +3891,9 @@ type Rlim_t = X__uint64_t /* resource.h:89:25 */ // getrusage(). // // Note: All values other than ru_utime and ru_stime are implementaiton -// defined and subject to change in a future release. Their use -// is discouraged for standards compliant programs. +// +// defined and subject to change in a future release. Their use +// is discouraged for standards compliant programs. type Rusage = struct { Fru_utime struct { Ftv_sec X__darwin_time_t diff --git a/vendor/modernc.org/libc/stdlib/stdlib_freebsd_386.go b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_386.go index e1260440..81362f61 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_freebsd_386.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_386.go @@ -578,8 +578,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/stdlib/stdlib_freebsd_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_amd64.go index 83c30a54..d545c30e 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_freebsd_amd64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_amd64.go @@ -26,9 +26,9 @@ const ( X_MKDTEMP_DECLARED = 0 // stdlib.h:192:1: X_MKSTEMP_DECLARED = 0 // stdlib.h:196:1: X_MKTEMP_DECLARED = 0 // stdlib.h:221:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_RSIZE_T_DEFINED = 0 // stdlib.h:339:1: X_RUNE_T_DECLARED = 0 // stdlib.h:47:1: X_SIZE_T_DECLARED = 0 // stdlib.h:53:1: @@ -36,7 +36,7 @@ const ( X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_WCHAR_T_DECLARED = 0 // stdlib.h:59:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -306,12 +306,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -583,8 +586,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/stdlib/stdlib_freebsd_arm.go b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_arm.go new file mode 100644 index 00000000..87989f05 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_arm.go @@ -0,0 +1,612 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_freebsd_arm.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + EXIT_FAILURE = 1 // stdlib.h:73:1: + EXIT_SUCCESS = 0 // stdlib.h:74:1: + RAND_MAX = 0x7fffffff // stdlib.h:80:1: + X_ERRNO_T_DEFINED = 0 // stdlib.h:344:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKDTEMP_DECLARED = 0 // stdlib.h:192:1: + X_MKSTEMP_DECLARED = 0 // stdlib.h:196:1: + X_MKTEMP_DECLARED = 0 // stdlib.h:221:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_RSIZE_T_DEFINED = 0 // stdlib.h:339:1: + X_RUNE_T_DECLARED = 0 // stdlib.h:47:1: + X_SIZE_T_DECLARED = 0 // stdlib.h:53:1: + X_STDLIB_H_ = 0 // stdlib.h:36:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_WCHAR_T_DECLARED = 0 // stdlib.h:59:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stdlib.h 8.5 (Berkeley) 5/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Rune_t = X__rune_t /* stdlib.h:46:18 */ + +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:66:3 */ + +type Ldiv_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:71:3 */ + +// Functions added in C99 which we make conditionally available in the +// BSD^C89 namespace if the compiler supports `long long'. +// The #if test is more complicated than it ought to be because +// __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' +// is not supported in the compilation environment (which therefore means +// that it can't really be ISO C99). +// +// (The only other extension made by C99 in thie header is _Exit().) +// LONGLONG +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:142:3 */ // getsubopt(3) external variable + +type Rsize_t = Size_t /* stdlib.h:340:16 */ + +type Errno_t = int32 /* stdlib.h:345:13 */ + +// K.3.6 +type Constraint_handler_t = uintptr /* stdlib.h:349:14 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/stdlib_freebsd_arm64.go b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_arm64.go new file mode 100644 index 00000000..d545c30e --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/stdlib_freebsd_arm64.go @@ -0,0 +1,671 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_freebsd_amd64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + EXIT_FAILURE = 1 // stdlib.h:73:1: + EXIT_SUCCESS = 0 // stdlib.h:74:1: + RAND_MAX = 0x7fffffff // stdlib.h:80:1: + X_ERRNO_T_DEFINED = 0 // stdlib.h:344:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKDTEMP_DECLARED = 0 // stdlib.h:192:1: + X_MKSTEMP_DECLARED = 0 // stdlib.h:196:1: + X_MKTEMP_DECLARED = 0 // stdlib.h:221:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_RSIZE_T_DEFINED = 0 // stdlib.h:339:1: + X_RUNE_T_DECLARED = 0 // stdlib.h:47:1: + X_SIZE_T_DECLARED = 0 // stdlib.h:53:1: + X_STDLIB_H_ = 0 // stdlib.h:36:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_WCHAR_T_DECLARED = 0 // stdlib.h:59:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stdlib.h 8.5 (Berkeley) 5/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Rune_t = X__rune_t /* stdlib.h:46:18 */ + +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:66:3 */ + +type Ldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:71:3 */ + +// Functions added in C99 which we make conditionally available in the +// BSD^C89 namespace if the compiler supports `long long'. +// The #if test is more complicated than it ought to be because +// __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' +// is not supported in the compilation environment (which therefore means +// that it can't really be ISO C99). +// +// (The only other extension made by C99 in thie header is _Exit().) +// LONGLONG +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:142:3 */ // getsubopt(3) external variable + +type Rsize_t = Size_t /* stdlib.h:340:16 */ + +type Errno_t = int32 /* stdlib.h:345:13 */ + +// K.3.6 +type Constraint_handler_t = uintptr /* stdlib.h:349:14 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_386.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_386.go index e31de5fd..b879cc07 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_linux_386.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_386.go @@ -662,7 +662,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -673,13 +674,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1043,7 +1046,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1090,7 +1094,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1404,18 +1409,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1439,7 +1447,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1451,7 +1460,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 @@ -1477,8 +1487,9 @@ type Random_data = struct { } /* stdlib.h:423:1 */ // Data structure for communication with thread safe versions. This -// type is to be regarded as opaque. It's only exported because users -// have to allocate objects of this type. +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. type Drand48_data = struct { F__x [3]uint16 F__old_x [3]uint16 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_amd64.go index 4d27cee8..242876b7 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_linux_amd64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_amd64.go @@ -680,7 +680,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -691,8 +692,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1062,7 +1064,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1109,7 +1112,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1421,18 +1425,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1456,7 +1463,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1468,7 +1476,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 @@ -1495,8 +1504,9 @@ type Random_data = struct { } /* stdlib.h:423:1 */ // Data structure for communication with thread safe versions. This -// type is to be regarded as opaque. It's only exported because users -// have to allocate objects of this type. +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. type Drand48_data = struct { F__x [3]uint16 F__old_x [3]uint16 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_arm.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_arm.go index df68d8e6..a5f79426 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_linux_arm.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_arm.go @@ -670,7 +670,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -681,13 +682,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1052,7 +1055,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1099,7 +1103,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1464,18 +1469,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1499,7 +1507,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1511,7 +1520,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 @@ -1537,8 +1547,9 @@ type Random_data = struct { } /* stdlib.h:423:1 */ // Data structure for communication with thread safe versions. This -// type is to be regarded as opaque. It's only exported because users -// have to allocate objects of this type. +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. type Drand48_data = struct { F__x [3]uint16 F__old_x [3]uint16 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_arm64.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_arm64.go index 9a5d748c..e5e9b686 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_linux_arm64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_arm64.go @@ -721,7 +721,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -732,8 +733,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1102,7 +1104,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1149,7 +1152,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1494,18 +1498,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -1532,7 +1539,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1544,7 +1552,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1571,8 +1580,9 @@ type Random_data = struct { } /* stdlib.h:423:1 */ // Data structure for communication with thread safe versions. This -// type is to be regarded as opaque. It's only exported because users -// have to allocate objects of this type. +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. type Drand48_data = struct { F__x [3]uint16 F__old_x [3]uint16 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_ppc64le.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_ppc64le.go index 980bb6e6..5afac762 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_linux_ppc64le.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_ppc64le.go @@ -702,7 +702,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -713,8 +714,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1083,7 +1085,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1130,7 +1133,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1442,18 +1446,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1477,7 +1484,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1489,7 +1497,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1516,8 +1525,9 @@ type Random_data = struct { } /* stdlib.h:423:1 */ // Data structure for communication with thread safe versions. This -// type is to be regarded as opaque. It's only exported because users -// have to allocate objects of this type. +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. type Drand48_data = struct { F__x [3]uint16 F__old_x [3]uint16 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go index 532565b6..71bc7009 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_riscv64.go @@ -681,7 +681,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -692,8 +693,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1062,7 +1064,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1109,7 +1112,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1427,9 +1431,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -1463,18 +1468,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1498,7 +1506,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1510,7 +1519,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1537,8 +1547,9 @@ type Random_data = struct { } /* stdlib.h:423:1 */ // Data structure for communication with thread safe versions. This -// type is to be regarded as opaque. It's only exported because users -// have to allocate objects of this type. +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. type Drand48_data = struct { F__x [3]uint16 F__old_x [3]uint16 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_s390x.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_s390x.go index 7e5b7e69..6d488592 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_linux_s390x.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_s390x.go @@ -683,7 +683,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -694,8 +695,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1064,7 +1066,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1111,7 +1114,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1422,18 +1426,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1457,7 +1464,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1469,7 +1477,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1496,8 +1505,9 @@ type Random_data = struct { } /* stdlib.h:423:1 */ // Data structure for communication with thread safe versions. This -// type is to be regarded as opaque. It's only exported because users -// have to allocate objects of this type. +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. type Drand48_data = struct { F__x [3]uint16 F__old_x [3]uint16 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_netbsd_arm.go b/vendor/modernc.org/libc/stdlib/stdlib_netbsd_arm.go new file mode 100644 index 00000000..3d7f6759 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/stdlib_netbsd_arm.go @@ -0,0 +1,1593 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_netbsd_arm.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + EXIT_FAILURE = 1 // stdlib.h:87:1: + EXIT_SUCCESS = 0 // stdlib.h:88:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + HN_AUTOSCALE = 0x20 // stdlib.h:301:1: + HN_B = 0x04 // stdlib.h:297:1: + HN_DECIMAL = 0x01 // stdlib.h:295:1: + HN_DIVISOR_1000 = 0x08 // stdlib.h:298:1: + HN_GETSCALE = 0x10 // stdlib.h:300:1: + HN_NOSPACE = 0x02 // stdlib.h:296:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + RANDOM_MAX = 0x7fffffff // stdlib.h:188:1: + RAND_MAX = 0x7fffffff // stdlib.h:90:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_STDLIB_H_ = 0 // stdlib.h:35:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_NULL_H_ = 0 // null.h:9:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:59:3 */ + +type Ldiv_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:64:3 */ + +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:74:3 */ + +type Qdiv_t = struct { + Fquot Quad_t + Frem Quad_t +} /* stdlib.h:81:3 */ + +type Locale_t = uintptr /* stdlib.h:357:25 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_386.go b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_386.go new file mode 100644 index 00000000..07f326fa --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_386.go @@ -0,0 +1,770 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_386.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EXIT_FAILURE = 1 // stdlib.h:80:1: + EXIT_SUCCESS = 0 // stdlib.h:81:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + RAND_MAX = 0x7fffffff // stdlib.h:83:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_STDLIB_H_ = 0 // stdlib.h:36:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_WCHAR_T_DEFINED_ = 0 // stdlib.h:52:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: stdlib.h,v 1.76 2019/05/10 15:03:24 otto Exp $ +// $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc 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. +// +// @(#)stdlib.h 5.13 (Berkeley) 6/4/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:59:3 */ + +type Ldiv_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:64:3 */ + +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:70:3 */ + +type Qdiv_t = struct { + Fquot Quad_t + Frem Quad_t +} /* stdlib.h:77:3 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go index d7b12022..e2f8af44 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_amd64.go @@ -24,8 +24,8 @@ const ( RAND_MAX = 0x7fffffff // stdlib.h:83:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -37,14 +37,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_STDLIB_H_ = 0 // stdlib.h:36:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: @@ -52,14 +52,14 @@ const ( X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: X_WCHAR_T_DEFINED_ = 0 // stdlib.h:52:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -384,7 +384,7 @@ type X__rune_t = int32 /* _types.h:136:15 */ type X__wctrans_t = uintptr /* _types.h:137:14 */ type X__wctype_t = uintptr /* _types.h:138:14 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -554,7 +554,7 @@ type X__wctype_t = uintptr /* _types.h:138:14 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -643,18 +643,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -736,27 +735,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ type Div_t = struct { Fquot int32 diff --git a/vendor/modernc.org/libc/stdlib/stdlib_openbsd_arm64.go b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_arm64.go new file mode 100644 index 00000000..3089ff95 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/stdlib_openbsd_arm64.go @@ -0,0 +1,776 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_openbsd_arm64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + EXIT_FAILURE = 1 // stdlib.h:80:1: + EXIT_SUCCESS = 0 // stdlib.h:81:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + RAND_MAX = 0x7fffffff // stdlib.h:83:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_STDLIB_H_ = 0 // stdlib.h:36:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_WCHAR_T_DEFINED_ = 0 // stdlib.h:52:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: stdlib.h,v 1.76 2019/05/10 15:03:24 otto Exp $ +// $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc 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. +// +// @(#)stdlib.h 5.13 (Berkeley) 6/4/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:59:3 */ + +type Ldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:64:3 */ + +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:70:3 */ + +type Qdiv_t = struct { + Fquot Quad_t + Frem Quad_t +} /* stdlib.h:77:3 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go b/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go index d6e0c8ad..69dee261 100644 --- a/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go +++ b/vendor/modernc.org/libc/stdlib/stdlib_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo stdlib\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o stdlib\stdlib_windows_386.go -pkgname stdlib', DO NOT EDIT. +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_windows_386.go -pkgname stdlib', DO NOT EDIT. package stdlib @@ -15,179 +15,178 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CHAR_BIT = 8 - CHAR_MAX = 127 - CHAR_MIN = -128 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - EXIT_FAILURE = 1 - EXIT_SUCCESS = 0 - INT_MAX = 2147483647 - INT_MIN = -2147483648 - LLONG_MAX = 9223372036854775807 - LLONG_MIN = -9223372036854775808 - LONG_LONG_MAX = 9223372036854775807 - LONG_LONG_MIN = -9223372036854775808 - LONG_MAX = 2147483647 - LONG_MIN = -2147483648 - MB_LEN_MAX = 5 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - PATH_MAX = 260 - RAND_MAX = 0x7fff - SCHAR_MAX = 127 - SCHAR_MIN = -128 - SHRT_MAX = 32767 - SHRT_MIN = -32768 - SIZE_MAX = 4294967295 - SSIZE_MAX = 2147483647 - UCHAR_MAX = 255 - UINT_MAX = 4294967295 - ULLONG_MAX = 18446744073709551615 - ULONG_LONG_MAX = 18446744073709551615 - ULONG_MAX = 4294967295 - UNALIGNED = 0 - USE___UUIDOF = 0 - USHRT_MAX = 65535 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ALLOCA_S_HEAP_MARKER = 0xDDDD - X_ALLOCA_S_MARKER_SIZE = 8 - X_ALLOCA_S_STACK_MARKER = 0xCCCC - X_ALLOCA_S_THRESHOLD = 1024 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CALL_REPORTFAULT = 0x2 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ABS_DEFINED = 0 - X_CRT_ALGO_DEFINED = 0 - X_CRT_ALLOCATION_DEFINED = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_ATOF_DEFINED = 0 - X_CRT_DOUBLE_DEC = 0 - X_CRT_ERRNO_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_PERROR_DEFINED = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_SWAB_DEFINED = 0 - X_CRT_SYSTEM_DEFINED = 0 - X_CRT_TERMINATE_DEFINED = 0 - X_CRT_WPERROR_DEFINED = 0 - X_CRT_WSYSTEM_DEFINED = 0 - X_CVTBUFSIZE = 349 - X_DIV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FREEA_INLINE = 0 - X_FREEENTRY = 0 - X_GCC_LIMITS_H_ = 0 - X_HEAPBADBEGIN = -3 - X_HEAPBADNODE = -4 - X_HEAPBADPTR = -6 - X_HEAPEMPTY = -1 - X_HEAPEND = -5 - X_HEAPINFO_DEFINED = 0 - X_HEAPOK = -2 - X_HEAP_MAXREQ = 0xFFFFFFE0 - X_I16_MAX = 32767 - X_I16_MIN = -32768 - X_I32_MAX = 2147483647 - X_I32_MIN = -2147483648 - X_I64_MAX = 9223372036854775807 - X_I64_MIN = -9223372036854775808 - X_I8_MAX = 127 - X_I8_MIN = -128 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_LIMITS = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STDLIB = 0 - X_INC_STDLIB_S = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LIMITS_H___ = 0 - X_MALLOC_H_ = 0 - X_MAX_DIR = 256 - X_MAX_DRIVE = 3 - X_MAX_ENV = 32767 - X_MAX_EXT = 256 - X_MAX_FNAME = 256 - X_MAX_PATH = 260 - X_MAX_WAIT_MALLOC_CRT = 60000 - X_MM_MALLOC_H_INCLUDED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_ONEXIT_T_DEFINED = 0 - X_OUT_TO_DEFAULT = 0 - X_OUT_TO_MSGBOX = 2 - X_OUT_TO_STDERR = 1 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_QSORT_S_DEFINED = 0 - X_REENTRANT = 1 - X_REPORT_ERRMODE = 3 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UI16_MAX = 0xffff - X_UI32_MAX = 0xffffffff - X_UI64_MAX = 0xffffffffffffffff - X_UI8_MAX = 0xff - X_UINTPTR_T_DEFINED = 0 - X_USEDENTRY = 1 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WRITE_ABORT_MSG = 0x1 - X_WSTDLIBP_DEFINED = 0 - X_WSTDLIBP_S_DEFINED = 0 - X_WSTDLIB_DEFINED = 0 - X_WSTDLIB_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + CHAR_BIT = 8 // limits.h:64:1: + CHAR_MAX = 127 // limits.h:99:1: + CHAR_MIN = -128 // limits.h:97:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + EXIT_FAILURE = 1 // stdlib.h:45:1: + EXIT_SUCCESS = 0 // stdlib.h:44:1: + INT_MAX = 2147483647 // limits.h:120:1: + INT_MIN = -2147483648 // limits.h:118:1: + LLONG_MAX = 9223372036854775807 // limits.h:142:1: + LLONG_MIN = -9223372036854775808 // limits.h:140:1: + LONG_LONG_MAX = 9223372036854775807 // limits.h:154:1: + LONG_LONG_MIN = -9223372036854775808 // limits.h:152:1: + LONG_MAX = 2147483647 // limits.h:131:1: + LONG_MIN = -2147483648 // limits.h:129:1: + MB_LEN_MAX = 5 // limits.h:35:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + PATH_MAX = 260 // limits.h:20:1: + RAND_MAX = 0x7fff // stdlib.h:106:1: + SCHAR_MAX = 127 // limits.h:75:1: + SCHAR_MIN = -128 // limits.h:73:1: + SHRT_MAX = 32767 // limits.h:106:1: + SHRT_MIN = -32768 // limits.h:104:1: + SIZE_MAX = 4294967295 // limits.h:78:1: + SSIZE_MAX = 2147483647 // limits.h:86:1: + UCHAR_MAX = 255 // limits.h:82:1: + UINT_MAX = 4294967295 // limits.h:124:1: + ULLONG_MAX = 18446744073709551615 // limits.h:146:1: + ULONG_LONG_MAX = 18446744073709551615 // limits.h:158:1: + ULONG_MAX = 4294967295 // limits.h:135:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + USHRT_MAX = 65535 // limits.h:113:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ALLOCA_S_HEAP_MARKER = 0xDDDD // malloc.h:137:1: + X_ALLOCA_S_MARKER_SIZE = 8 // malloc.h:140:1: + X_ALLOCA_S_STACK_MARKER = 0xCCCC // malloc.h:136:1: + X_ALLOCA_S_THRESHOLD = 1024 // malloc.h:135:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CALL_REPORTFAULT = 0x2 // stdlib.h:139:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ABS_DEFINED = 0 // stdlib.h:410:1: + X_CRT_ALGO_DEFINED = 0 // stdlib.h:433:1: + X_CRT_ALLOCATION_DEFINED = 0 // stdlib.h:528:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_ATOF_DEFINED = 0 // stdlib.h:424:1: + X_CRT_DOUBLE_DEC = 0 // stdlib.h:72:1: + X_CRT_ERRNO_DEFINED = 0 // stdlib.h:153:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_PERROR_DEFINED = 0 // stdlib.h:648:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_SWAB_DEFINED = 0 // stdlib.h:716:1: + X_CRT_SYSTEM_DEFINED = 0 // stdlib.h:518:1: + X_CRT_TERMINATE_DEFINED = 0 // stdlib.h:387:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WPERROR_DEFINED = 0 // stdlib.h:677:1: + X_CRT_WSYSTEM_DEFINED = 0 // stdlib.h:587:1: + X_CVTBUFSIZE = 349 // stdlib.h:611:1: + X_DIV_T_DEFINED = 0 // stdlib.h:58:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FREEA_INLINE = 0 // malloc.h:161:1: + X_FREEENTRY = 0 // malloc.h:40:1: + X_GCC_LIMITS_H_ = 0 // limits.h:30:1: + X_HEAPBADBEGIN = -3 // malloc.h:34:1: + X_HEAPBADNODE = -4 // malloc.h:35:1: + X_HEAPBADPTR = -6 // malloc.h:37:1: + X_HEAPEMPTY = -1 // malloc.h:32:1: + X_HEAPEND = -5 // malloc.h:36:1: + X_HEAPINFO_DEFINED = 0 // malloc.h:44:1: + X_HEAPOK = -2 // malloc.h:33:1: + X_HEAP_MAXREQ = 0xFFFFFFE0 // malloc.h:20:1: + X_I16_MAX = 32767 // limits.h:54:1: + X_I16_MIN = -32768 // limits.h:53:1: + X_I32_MAX = 2147483647 // limits.h:58:1: + X_I32_MIN = -2147483648 // limits.h:57:1: + X_I64_MAX = 9223372036854775807 // limits.h:71:1: + X_I64_MIN = -9223372036854775808 // limits.h:70:1: + X_I8_MAX = 127 // limits.h:50:1: + X_I8_MIN = -128 // limits.h:49:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CORECRT_WSTDLIB = 0 // corecrt_wstdlib.h:7:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_LIMITS = 0 // limits.h:9:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STDLIB = 0 // stdlib.h:7:1: + X_INC_STDLIB_S = 0 // stdlib_s.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LIMITS_H___ = 0 // limits.h:60:1: + X_MALLOC_H_ = 0 // malloc.h:7:1: + X_MAX_DIR = 256 // stdlib.h:129:1: + X_MAX_DRIVE = 3 // stdlib.h:128:1: + X_MAX_ENV = 32767 // stdlib.h:141:1: + X_MAX_EXT = 256 // stdlib.h:131:1: + X_MAX_FNAME = 256 // stdlib.h:130:1: + X_MAX_PATH = 260 // stdlib.h:127:1: + X_MAX_WAIT_MALLOC_CRT = 60000 // malloc.h:108:1: + X_MM_MALLOC_H_INCLUDED = 0 // malloc.h:61:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_ONEXIT_T_DEFINED = 0 // stdlib.h:48:1: + X_OUT_TO_DEFAULT = 0 // stdlib.h:133:1: + X_OUT_TO_MSGBOX = 2 // stdlib.h:135:1: + X_OUT_TO_STDERR = 1 // stdlib.h:134:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_QSORT_S_DEFINED = 0 // stdlib_s.h:40:1: + X_REPORT_ERRMODE = 3 // stdlib.h:136:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UI16_MAX = 0xffff // limits.h:55:1: + X_UI32_MAX = 0xffffffff // limits.h:59:1: + X_UI64_MAX = 0xffffffffffffffff // limits.h:72:1: + X_UI8_MAX = 0xff // limits.h:51:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USEDENTRY = 1 // malloc.h:41:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WRITE_ABORT_MSG = 0x1 // stdlib.h:138:1: + X_WSTDLIBP_DEFINED = 0 // stdlib.h:673:1: + X_WSTDLIB_DEFINED = 0 // stdlib.h:553:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -241,6 +240,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -281,26 +286,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -326,31 +333,31 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ -// Copyright (C) 1992-2018 Free Software Foundation, Inc. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -394,6 +401,11 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // File system limits // // NOTE: Apparently the actual size of PATH_MAX is 260, but a space is @@ -402,7 +414,7 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // are semantically identical, with a limit of 259 characters for the // path name, plus one for a terminating NUL, for a total of 260. -// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -459,40 +471,40 @@ type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ // This administrivia gets added to the end of limits.h // if the system has its own version of limits.h. -type X_onexit_t = uintptr /* stdlib.h:49:15 */ +type X_onexit_t = uintptr /* stdlib.h:50:15 */ type X_div_t = struct { Fquot int32 Frem int32 -} /* stdlib.h:59:11 */ +} /* stdlib.h:60:11 */ -type Div_t = X_div_t /* stdlib.h:62:5 */ +type Div_t = X_div_t /* stdlib.h:63:5 */ type X_ldiv_t = struct { Fquot int32 Frem int32 -} /* stdlib.h:64:11 */ +} /* stdlib.h:65:11 */ -type Ldiv_t = X_ldiv_t /* stdlib.h:67:5 */ +type Ldiv_t = X_ldiv_t /* stdlib.h:68:5 */ -type X_LDOUBLE = struct{ Fld [10]uint8 } /* stdlib.h:76:5 */ +type X_LDOUBLE = struct{ Fld [10]uint8 } /* stdlib.h:77:5 */ -type X_CRT_DOUBLE = struct{ Fx float64 } /* stdlib.h:83:5 */ +type X_CRT_DOUBLE = struct{ Fx float64 } /* stdlib.h:84:5 */ -type X_CRT_FLOAT = struct{ Ff float32 } /* stdlib.h:87:5 */ +type X_CRT_FLOAT = struct{ Ff float32 } /* stdlib.h:88:5 */ -type X_LONGDOUBLE = struct{ Fx float64 } /* stdlib.h:94:5 */ +type X_LONGDOUBLE = struct{ Fx float64 } /* stdlib.h:95:5 */ -type X_LDBL12 = struct{ Fld12 [12]uint8 } /* stdlib.h:101:5 */ +type X_LDBL12 = struct{ Fld12 [12]uint8 } /* stdlib.h:102:5 */ -type X_purecall_handler = uintptr /* stdlib.h:142:16 */ +type X_purecall_handler = uintptr /* stdlib.h:143:16 */ -type X_invalid_parameter_handler = uintptr /* stdlib.h:147:16 */ +type X_invalid_parameter_handler = uintptr /* stdlib.h:148:16 */ type Lldiv_t = struct { Fquot int64 Frem int64 -} /* stdlib.h:699:61 */ +} /* stdlib.h:727:61 */ // * // This file has no copyright assigned and is placed in the Public Domain. diff --git a/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go b/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go index 30149394..4cfd69b9 100644 --- a/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/socket/socket_darwin_amd64.go -pkgname socket', DO NOT EDIT. +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_darwin_amd64.go -pkgname socket', DO NOT EDIT. package socket diff --git a/vendor/modernc.org/libc/sys/socket/capi_freebsd_arm.go b/vendor/modernc.org/libc/sys/socket/capi_freebsd_arm.go new file mode 100644 index 00000000..469eeaac --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_freebsd_arm.go -pkgname socket', DO NOT EDIT. + +package socket + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/socket/capi_freebsd_arm64.go b/vendor/modernc.org/libc/sys/socket/capi_freebsd_arm64.go new file mode 100644 index 00000000..e002e033 --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_freebsd_amd64.go -pkgname socket', DO NOT EDIT. + +package socket + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/socket/capi_netbsd_arm.go b/vendor/modernc.org/libc/sys/socket/capi_netbsd_arm.go new file mode 100644 index 00000000..734f18e7 --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_netbsd_arm.go -pkgname socket', DO NOT EDIT. + +package socket + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/socket/capi_openbsd_386.go b/vendor/modernc.org/libc/sys/socket/capi_openbsd_386.go new file mode 100644 index 00000000..5f3633e4 --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_386.go -pkgname socket', DO NOT EDIT. + +package socket + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/socket/capi_openbsd_arm64.go b/vendor/modernc.org/libc/sys/socket/capi_openbsd_arm64.go new file mode 100644 index 00000000..a5653ab7 --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_arm64.go -pkgname socket', DO NOT EDIT. + +package socket + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go index a17bddfa..90ffef0c 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/socket/socket_darwin_amd64.go -pkgname socket', DO NOT EDIT. +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_darwin_amd64.go -pkgname socket', DO NOT EDIT. package socket @@ -15,323 +15,323 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 - AF_CCITT = 10 - AF_CHAOS = 5 - AF_CNT = 21 - AF_COIP = 20 - AF_DATAKIT = 9 - AF_DECnet = 12 - AF_DLI = 13 - AF_E164 = 28 - AF_ECMA = 8 - AF_HYLINK = 15 - AF_IEEE80211 = 37 - AF_IMPLINK = 3 - AF_INET = 2 - AF_INET6 = 30 - AF_IPX = 23 - AF_ISDN = 28 - AF_ISO = 7 - AF_LAT = 14 - AF_LINK = 18 - AF_LOCAL = 1 - AF_MAX = 40 - AF_NATM = 31 - AF_NDRV = 27 - AF_NETBIOS = 33 - AF_NS = 6 - AF_OSI = 7 - AF_PPP = 34 - AF_PUP = 4 - AF_RESERVED_36 = 36 - AF_ROUTE = 17 - AF_SIP = 24 - AF_SNA = 11 - AF_SYSTEM = 32 - AF_UNIX = 1 - AF_UNSPEC = 0 - AF_UTUN = 38 - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - CONNECT_DATA_AUTHENTICATED = 0x4 - CONNECT_DATA_IDEMPOTENT = 0x2 - CONNECT_RESUME_ON_READ_WRITE = 0x1 - FD_SETSIZE = 1024 - KEV_DL_ADDMULTI = 7 - KEV_DL_AWDL_RESTRICTED = 26 - KEV_DL_AWDL_UNRESTRICTED = 27 - KEV_DL_DELMULTI = 8 - KEV_DL_IFCAP_CHANGED = 19 - KEV_DL_IFDELEGATE_CHANGED = 25 - KEV_DL_IF_ATTACHED = 9 - KEV_DL_IF_DETACHED = 11 - KEV_DL_IF_DETACHING = 10 - KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 - KEV_DL_ISSUES = 24 - KEV_DL_LINK_ADDRESS_CHANGED = 16 - KEV_DL_LINK_OFF = 12 - KEV_DL_LINK_ON = 13 - KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 - KEV_DL_LOW_POWER_MODE_CHANGED = 30 - KEV_DL_MASTER_ELECTED = 23 - KEV_DL_NODE_ABSENCE = 22 - KEV_DL_NODE_PRESENCE = 21 - KEV_DL_PROTO_ATTACHED = 14 - KEV_DL_PROTO_DETACHED = 15 - KEV_DL_QOS_MODE_CHANGED = 29 - KEV_DL_RRC_STATE_CHANGED = 28 - KEV_DL_SIFFLAGS = 1 - KEV_DL_SIFGENERIC = 6 - KEV_DL_SIFMEDIA = 5 - KEV_DL_SIFMETRICS = 2 - KEV_DL_SIFMTU = 3 - KEV_DL_SIFPHYS = 4 - KEV_DL_SUBCLASS = 2 - KEV_DL_WAKEFLAGS_CHANGED = 17 - KEV_INET6_ADDR_DELETED = 3 - KEV_INET6_CHANGED_ADDR = 2 - KEV_INET6_DEFROUTER = 6 - KEV_INET6_NEW_LL_ADDR = 4 - KEV_INET6_NEW_RTADV_ADDR = 5 - KEV_INET6_NEW_USER_ADDR = 1 - KEV_INET6_REQUEST_NAT64_PREFIX = 7 - KEV_INET6_SUBCLASS = 6 - KEV_INET_ADDR_DELETED = 3 - KEV_INET_ARPCOLLISION = 7 - KEV_INET_ARPRTRALIVE = 10 - KEV_INET_ARPRTRFAILURE = 9 - KEV_INET_CHANGED_ADDR = 2 - KEV_INET_NEW_ADDR = 1 - KEV_INET_PORTINUSE = 8 - KEV_INET_SIFBRDADDR = 5 - KEV_INET_SIFDSTADDR = 4 - KEV_INET_SIFNETMASK = 6 - KEV_INET_SUBCLASS = 1 - LITTLE_ENDIAN = 1234 - MSG_CTRUNC = 0x20 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x80 - MSG_EOF = 0x100 - MSG_EOR = 0x8 - MSG_FLUSH = 0x400 - MSG_HAVEMORE = 0x2000 - MSG_HOLD = 0x800 - MSG_NEEDSA = 0x10000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_RCVMORE = 0x4000 - MSG_SEND = 0x1000 - MSG_TRUNC = 0x10 - MSG_WAITALL = 0x40 - MSG_WAITSTREAM = 0x200 - NBBY = 8 - NETSVC_MRKNG_LVL_L2 = 1 - NETSVC_MRKNG_LVL_L3L2_ALL = 2 - NETSVC_MRKNG_LVL_L3L2_BK = 3 - NETSVC_MRKNG_UNKNOWN = 0 - NET_MAXID = 40 - NET_RT_DUMP = 1 - NET_RT_DUMP2 = 7 - NET_RT_FLAGS = 2 - NET_RT_FLAGS_PRIV = 10 - NET_RT_IFLIST = 3 - NET_RT_IFLIST2 = 6 - NET_RT_MAXID = 11 - NET_RT_STAT = 4 - NET_RT_TRASH = 5 - NET_SERVICE_TYPE_AV = 6 - NET_SERVICE_TYPE_BE = 0 - NET_SERVICE_TYPE_BK = 1 - NET_SERVICE_TYPE_OAM = 7 - NET_SERVICE_TYPE_RD = 8 - NET_SERVICE_TYPE_RV = 5 - NET_SERVICE_TYPE_SIG = 2 - NET_SERVICE_TYPE_VI = 3 - NET_SERVICE_TYPE_VO = 4 - PDP_ENDIAN = 3412 - PF_APPLETALK = 16 - PF_CCITT = 10 - PF_CHAOS = 5 - PF_CNT = 21 - PF_COIP = 20 - PF_DATAKIT = 9 - PF_DECnet = 12 - PF_DLI = 13 - PF_ECMA = 8 - PF_HYLINK = 15 - PF_IMPLINK = 3 - PF_INET = 2 - PF_INET6 = 30 - PF_IPX = 23 - PF_ISDN = 28 - PF_ISO = 7 - PF_KEY = 29 - PF_LAT = 14 - PF_LINK = 18 - PF_LOCAL = 1 - PF_MAX = 40 - PF_NATM = 31 - PF_NDRV = 27 - PF_NETBIOS = 33 - PF_NS = 6 - PF_OSI = 7 - PF_PIP = 25 - PF_PPP = 34 - PF_PUP = 4 - PF_RESERVED_36 = 36 - PF_ROUTE = 17 - PF_RTIP = 22 - PF_SIP = 24 - PF_SNA = 11 - PF_SYSTEM = 32 - PF_UNIX = 1 - PF_UNSPEC = 0 - PF_UTUN = 38 - PF_XTP = 19 - SAE_ASSOCID_ANY = 0 - SAE_CONNID_ANY = 0 - SCM_CREDS = 0x03 - SCM_RIGHTS = 0x01 - SCM_TIMESTAMP = 0x02 - SCM_TIMESTAMP_MONOTONIC = 0x04 - SHUT_RD = 0 - SHUT_RDWR = 2 - SHUT_WR = 1 - SOCK_DGRAM = 2 - SOCK_MAXADDRLEN = 255 - SOCK_RAW = 3 - SOCK_RDM = 4 - SOCK_SEQPACKET = 5 - SOCK_STREAM = 1 - SOL_SOCKET = 0xffff - SOMAXCONN = 128 - SONPX_SETOPTSHUT = 0x000000001 - SO_ACCEPTCONN = 0x0002 - SO_BROADCAST = 0x0020 - SO_DEBUG = 0x0001 - SO_DONTROUTE = 0x0010 - SO_DONTTRUNC = 0x2000 - SO_ERROR = 0x1007 - SO_KEEPALIVE = 0x0008 - SO_LABEL = 0x1010 - SO_LINGER = 0x0080 - SO_LINGER_SEC = 0x1080 - SO_NETSVC_MARKING_LEVEL = 0x1119 - SO_NET_SERVICE_TYPE = 0x1116 - SO_NKE = 0x1021 - SO_NOADDRERR = 0x1023 - SO_NOSIGPIPE = 0x1022 - SO_NOTIFYCONFLICT = 0x1026 - SO_NP_EXTENSIONS = 0x1083 - SO_NREAD = 0x1020 - SO_NUMRCVPKT = 0x1112 - SO_NWRITE = 0x1024 - SO_OOBINLINE = 0x0100 - SO_PEERLABEL = 0x1011 - SO_RANDOMPORT = 0x1082 - SO_RCVBUF = 0x1002 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_REUSEADDR = 0x0004 - SO_REUSEPORT = 0x0200 - SO_REUSESHAREUID = 0x1025 - SO_SNDBUF = 0x1001 - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_TIMESTAMP = 0x0400 - SO_TIMESTAMP_MONOTONIC = 0x0800 - SO_TYPE = 0x1008 - SO_UPCALLCLOSEWAIT = 0x1027 - SO_USELOOPBACK = 0x0040 - SO_WANTMORE = 0x4000 - SO_WANTOOBFLAG = 0x8000 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_I386__PARAM_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NET_NETKEV_H_ = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SA_FAMILY_T = 0 - X_SIZE_T = 0 - X_SOCKLEN_T = 0 - X_SSIZE_T = 0 - X_SS_MAXSIZE = 128 - X_STRUCT_IOVEC = 0 - X_SUSECONDS_T = 0 - X_SYS_SOCKET_H_ = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 - Pseudo_AF_HDRCMPLT = 35 - Pseudo_AF_KEY = 29 - Pseudo_AF_PIP = 25 - Pseudo_AF_RTIP = 22 - Pseudo_AF_XTP = 19 + AF_APPLETALK = 16 // socket.h:375:1: + AF_CCITT = 10 // socket.h:369:1: + AF_CHAOS = 5 // socket.h:363:1: + AF_CNT = 21 // socket.h:380:1: + AF_COIP = 20 // socket.h:379:1: + AF_DATAKIT = 9 // socket.h:368:1: + AF_DECnet = 12 // socket.h:371:1: + AF_DLI = 13 // socket.h:372:1: + AF_E164 = 28 // socket.h:387:1: + AF_ECMA = 8 // socket.h:367:1: + AF_HYLINK = 15 // socket.h:374:1: + AF_IEEE80211 = 37 // socket.h:399:1: + AF_IMPLINK = 3 // socket.h:361:1: + AF_INET = 2 // socket.h:359:1: + AF_INET6 = 30 // socket.h:390:1: + AF_IPX = 23 // socket.h:382:1: + AF_ISDN = 28 // socket.h:386:1: + AF_ISO = 7 // socket.h:365:1: + AF_LAT = 14 // socket.h:373:1: + AF_LINK = 18 // socket.h:377:1: + AF_LOCAL = 1 // socket.h:357:1: + AF_MAX = 40 // socket.h:401:1: + AF_NATM = 31 // socket.h:392:1: + AF_NDRV = 27 // socket.h:385:1: + AF_NETBIOS = 33 // socket.h:394:1: + AF_NS = 6 // socket.h:364:1: + AF_OSI = 7 // socket.h:366:1: + AF_PPP = 34 // socket.h:395:1: + AF_PUP = 4 // socket.h:362:1: + AF_RESERVED_36 = 36 // socket.h:398:1: + AF_ROUTE = 17 // socket.h:376:1: + AF_SIP = 24 // socket.h:383:1: + AF_SNA = 11 // socket.h:370:1: + AF_SYSTEM = 32 // socket.h:393:1: + AF_UNIX = 1 // socket.h:355:1: + AF_UNSPEC = 0 // socket.h:354:1: + AF_UTUN = 38 // socket.h:400:1: + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + CONNECT_DATA_AUTHENTICATED = 0x4 // socket.h:300:1: + CONNECT_DATA_IDEMPOTENT = 0x2 // socket.h:299:1: + CONNECT_RESUME_ON_READ_WRITE = 0x1 // socket.h:298:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + KEV_DL_ADDMULTI = 7 // net_kev.h:61:1: + KEV_DL_AWDL_RESTRICTED = 26 // net_kev.h:80:1: + KEV_DL_AWDL_UNRESTRICTED = 27 // net_kev.h:81:1: + KEV_DL_DELMULTI = 8 // net_kev.h:62:1: + KEV_DL_IFCAP_CHANGED = 19 // net_kev.h:73:1: + KEV_DL_IFDELEGATE_CHANGED = 25 // net_kev.h:79:1: + KEV_DL_IF_ATTACHED = 9 // net_kev.h:63:1: + KEV_DL_IF_DETACHED = 11 // net_kev.h:65:1: + KEV_DL_IF_DETACHING = 10 // net_kev.h:64:1: + KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 // net_kev.h:72:1: + KEV_DL_ISSUES = 24 // net_kev.h:78:1: + KEV_DL_LINK_ADDRESS_CHANGED = 16 // net_kev.h:70:1: + KEV_DL_LINK_OFF = 12 // net_kev.h:66:1: + KEV_DL_LINK_ON = 13 // net_kev.h:67:1: + KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 // net_kev.h:74:1: + KEV_DL_LOW_POWER_MODE_CHANGED = 30 // net_kev.h:84:1: + KEV_DL_MASTER_ELECTED = 23 // net_kev.h:77:1: + KEV_DL_NODE_ABSENCE = 22 // net_kev.h:76:1: + KEV_DL_NODE_PRESENCE = 21 // net_kev.h:75:1: + KEV_DL_PROTO_ATTACHED = 14 // net_kev.h:68:1: + KEV_DL_PROTO_DETACHED = 15 // net_kev.h:69:1: + KEV_DL_QOS_MODE_CHANGED = 29 // net_kev.h:83:1: + KEV_DL_RRC_STATE_CHANGED = 28 // net_kev.h:82:1: + KEV_DL_SIFFLAGS = 1 // net_kev.h:55:1: + KEV_DL_SIFGENERIC = 6 // net_kev.h:60:1: + KEV_DL_SIFMEDIA = 5 // net_kev.h:59:1: + KEV_DL_SIFMETRICS = 2 // net_kev.h:56:1: + KEV_DL_SIFMTU = 3 // net_kev.h:57:1: + KEV_DL_SIFPHYS = 4 // net_kev.h:58:1: + KEV_DL_SUBCLASS = 2 // net_kev.h:50:1: + KEV_DL_WAKEFLAGS_CHANGED = 17 // net_kev.h:71:1: + KEV_INET6_ADDR_DELETED = 3 // net_kev.h:91:1: + KEV_INET6_CHANGED_ADDR = 2 // net_kev.h:90:1: + KEV_INET6_DEFROUTER = 6 // net_kev.h:94:1: + KEV_INET6_NEW_LL_ADDR = 4 // net_kev.h:92:1: + KEV_INET6_NEW_RTADV_ADDR = 5 // net_kev.h:93:1: + KEV_INET6_NEW_USER_ADDR = 1 // net_kev.h:89:1: + KEV_INET6_REQUEST_NAT64_PREFIX = 7 // net_kev.h:95:1: + KEV_INET6_SUBCLASS = 6 // net_kev.h:87:1: + KEV_INET_ADDR_DELETED = 3 // net_kev.h:39:1: + KEV_INET_ARPCOLLISION = 7 // net_kev.h:43:1: + KEV_INET_ARPRTRALIVE = 10 // net_kev.h:48:1: + KEV_INET_ARPRTRFAILURE = 9 // net_kev.h:47:1: + KEV_INET_CHANGED_ADDR = 2 // net_kev.h:38:1: + KEV_INET_NEW_ADDR = 1 // net_kev.h:37:1: + KEV_INET_PORTINUSE = 8 // net_kev.h:45:1: + KEV_INET_SIFBRDADDR = 5 // net_kev.h:41:1: + KEV_INET_SIFDSTADDR = 4 // net_kev.h:40:1: + KEV_INET_SIFNETMASK = 6 // net_kev.h:42:1: + KEV_INET_SUBCLASS = 1 // net_kev.h:35:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + MSG_CTRUNC = 0x20 // socket.h:563:1: + MSG_DONTROUTE = 0x4 // socket.h:560:1: + MSG_DONTWAIT = 0x80 // socket.h:566:1: + MSG_EOF = 0x100 // socket.h:567:1: + MSG_EOR = 0x8 // socket.h:561:1: + MSG_FLUSH = 0x400 // socket.h:572:1: + MSG_HAVEMORE = 0x2000 // socket.h:575:1: + MSG_HOLD = 0x800 // socket.h:573:1: + MSG_NEEDSA = 0x10000 // socket.h:578:1: + MSG_OOB = 0x1 // socket.h:558:1: + MSG_PEEK = 0x2 // socket.h:559:1: + MSG_RCVMORE = 0x4000 // socket.h:576:1: + MSG_SEND = 0x1000 // socket.h:574:1: + MSG_TRUNC = 0x10 // socket.h:562:1: + MSG_WAITALL = 0x40 // socket.h:564:1: + MSG_WAITSTREAM = 0x200 // socket.h:570:1: + NBBY = 8 // types.h:186:1: + NETSVC_MRKNG_LVL_L2 = 1 // socket.h:283:1: + NETSVC_MRKNG_LVL_L3L2_ALL = 2 // socket.h:284:1: + NETSVC_MRKNG_LVL_L3L2_BK = 3 // socket.h:285:1: + NETSVC_MRKNG_UNKNOWN = 0 // socket.h:282:1: + NET_MAXID = 40 // socket.h:506:1: + NET_RT_DUMP = 1 // socket.h:519:1: + NET_RT_DUMP2 = 7 // socket.h:525:1: + NET_RT_FLAGS = 2 // socket.h:520:1: + NET_RT_FLAGS_PRIV = 10 // socket.h:530:1: + NET_RT_IFLIST = 3 // socket.h:521:1: + NET_RT_IFLIST2 = 6 // socket.h:524:1: + NET_RT_MAXID = 11 // socket.h:531:1: + NET_RT_STAT = 4 // socket.h:522:1: + NET_RT_TRASH = 5 // socket.h:523:1: + NET_SERVICE_TYPE_AV = 6 // socket.h:276:1: + NET_SERVICE_TYPE_BE = 0 // socket.h:270:1: + NET_SERVICE_TYPE_BK = 1 // socket.h:271:1: + NET_SERVICE_TYPE_OAM = 7 // socket.h:277:1: + NET_SERVICE_TYPE_RD = 8 // socket.h:278:1: + NET_SERVICE_TYPE_RV = 5 // socket.h:275:1: + NET_SERVICE_TYPE_SIG = 2 // socket.h:272:1: + NET_SERVICE_TYPE_VI = 3 // socket.h:273:1: + NET_SERVICE_TYPE_VO = 4 // socket.h:274:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + PF_APPLETALK = 16 // socket.h:469:1: + PF_CCITT = 10 // socket.h:463:1: + PF_CHAOS = 5 // socket.h:457:1: + PF_CNT = 21 // socket.h:474:1: + PF_COIP = 20 // socket.h:473:1: + PF_DATAKIT = 9 // socket.h:462:1: + PF_DECnet = 12 // socket.h:465:1: + PF_DLI = 13 // socket.h:466:1: + PF_ECMA = 8 // socket.h:461:1: + PF_HYLINK = 15 // socket.h:468:1: + PF_IMPLINK = 3 // socket.h:455:1: + PF_INET = 2 // socket.h:454:1: + PF_INET6 = 30 // socket.h:482:1: + PF_IPX = 23 // socket.h:476:1: + PF_ISDN = 28 // socket.h:480:1: + PF_ISO = 7 // socket.h:459:1: + PF_KEY = 29 // socket.h:481:1: + PF_LAT = 14 // socket.h:467:1: + PF_LINK = 18 // socket.h:471:1: + PF_LOCAL = 1 // socket.h:452:1: + PF_MAX = 40 // socket.h:489:1: + PF_NATM = 31 // socket.h:483:1: + PF_NDRV = 27 // socket.h:479:1: + PF_NETBIOS = 33 // socket.h:485:1: + PF_NS = 6 // socket.h:458:1: + PF_OSI = 7 // socket.h:460:1: + PF_PIP = 25 // socket.h:478:1: + PF_PPP = 34 // socket.h:486:1: + PF_PUP = 4 // socket.h:456:1: + PF_RESERVED_36 = 36 // socket.h:487:1: + PF_ROUTE = 17 // socket.h:470:1: + PF_RTIP = 22 // socket.h:477:1: + PF_SIP = 24 // socket.h:475:1: + PF_SNA = 11 // socket.h:464:1: + PF_SYSTEM = 32 // socket.h:484:1: + PF_UNIX = 1 // socket.h:453:1: + PF_UNSPEC = 0 // socket.h:451:1: + PF_UTUN = 38 // socket.h:488:1: + PF_XTP = 19 // socket.h:472:1: + SAE_ASSOCID_ANY = 0 // socket.h:290:1: + SAE_CONNID_ANY = 0 // socket.h:294:1: + SCM_CREDS = 0x03 // socket.h:661:1: + SCM_RIGHTS = 0x01 // socket.h:658:1: + SCM_TIMESTAMP = 0x02 // socket.h:660:1: + SCM_TIMESTAMP_MONOTONIC = 0x04 // socket.h:662:1: + SHUT_RD = 0 // socket.h:670:1: + SHUT_RDWR = 2 // socket.h:672:1: + SHUT_WR = 1 // socket.h:671:1: + SOCK_DGRAM = 2 // socket.h:112:1: + SOCK_MAXADDRLEN = 255 // socket.h:414:1: + SOCK_RAW = 3 // socket.h:113:1: + SOCK_RDM = 4 // socket.h:115:1: + SOCK_SEQPACKET = 5 // socket.h:117:1: + SOCK_STREAM = 1 // socket.h:111:1: + SOL_SOCKET = 0xffff // socket.h:348:1: + SOMAXCONN = 128 // socket.h:540:1: + SONPX_SETOPTSHUT = 0x000000001 // socket.h:338:1: + SO_ACCEPTCONN = 0x0002 // socket.h:123:1: + SO_BROADCAST = 0x0020 // socket.h:127:1: + SO_DEBUG = 0x0001 // socket.h:122:1: + SO_DONTROUTE = 0x0010 // socket.h:126:1: + SO_DONTTRUNC = 0x2000 // socket.h:142:1: + SO_ERROR = 0x1007 // socket.h:160:1: + SO_KEEPALIVE = 0x0008 // socket.h:125:1: + SO_LABEL = 0x1010 // socket.h:163:1: + SO_LINGER = 0x0080 // socket.h:130:1: + SO_LINGER_SEC = 0x1080 // socket.h:176:1: + SO_NETSVC_MARKING_LEVEL = 0x1119 // socket.h:185:1: + SO_NET_SERVICE_TYPE = 0x1116 // socket.h:182:1: + SO_NKE = 0x1021 // socket.h:167:1: + SO_NOADDRERR = 0x1023 // socket.h:169:1: + SO_NOSIGPIPE = 0x1022 // socket.h:168:1: + SO_NOTIFYCONFLICT = 0x1026 // socket.h:173:1: + SO_NP_EXTENSIONS = 0x1083 // socket.h:178:1: + SO_NREAD = 0x1020 // socket.h:166:1: + SO_NUMRCVPKT = 0x1112 // socket.h:181:1: + SO_NWRITE = 0x1024 // socket.h:170:1: + SO_OOBINLINE = 0x0100 // socket.h:134:1: + SO_PEERLABEL = 0x1011 // socket.h:164:1: + SO_RANDOMPORT = 0x1082 // socket.h:177:1: + SO_RCVBUF = 0x1002 // socket.h:155:1: + SO_RCVLOWAT = 0x1004 // socket.h:157:1: + SO_RCVTIMEO = 0x1006 // socket.h:159:1: + SO_REUSEADDR = 0x0004 // socket.h:124:1: + SO_REUSEPORT = 0x0200 // socket.h:136:1: + SO_REUSESHAREUID = 0x1025 // socket.h:171:1: + SO_SNDBUF = 0x1001 // socket.h:154:1: + SO_SNDLOWAT = 0x1003 // socket.h:156:1: + SO_SNDTIMEO = 0x1005 // socket.h:158:1: + SO_TIMESTAMP = 0x0400 // socket.h:137:1: + SO_TIMESTAMP_MONOTONIC = 0x0800 // socket.h:138:1: + SO_TYPE = 0x1008 // socket.h:161:1: + SO_UPCALLCLOSEWAIT = 0x1027 // socket.h:174:1: + SO_USELOOPBACK = 0x0040 // socket.h:129:1: + SO_WANTMORE = 0x4000 // socket.h:144:1: + SO_WANTOOBFLAG = 0x8000 // socket.h:145:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_I386__PARAM_H_ = 0 // _param.h:30:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NET_NETKEV_H_ = 0 // net_kev.h:30:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SA_FAMILY_T = 0 // _sa_family_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SOCKLEN_T = 0 // _socklen_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SS_MAXSIZE = 128 // socket.h:429:1: + X_STRUCT_IOVEC = 0 // _iovec_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SOCKET_H_ = 0 // socket.h:73:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: + Pseudo_AF_HDRCMPLT = 35 // socket.h:396:1: + Pseudo_AF_KEY = 29 // socket.h:388:1: + Pseudo_AF_PIP = 25 // socket.h:384:1: + Pseudo_AF_RTIP = 22 // socket.h:381:1: + Pseudo_AF_XTP = 19 // socket.h:378:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_freebsd_386.go b/vendor/modernc.org/libc/sys/socket/socket_freebsd_386.go index d3243502..626e2b6b 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_freebsd_386.go +++ b/vendor/modernc.org/libc/sys/socket/socket_freebsd_386.go @@ -785,8 +785,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/sys/socket/socket_freebsd_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_freebsd_amd64.go index 9dbcd875..6dccfc7b 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_freebsd_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_freebsd_amd64.go @@ -15,241 +15,242 @@ var _ atomic.Value var _ unsafe.Pointer const ( - AF_APPLETALK = 16 // socket.h:239:1: - AF_ARP = 35 // socket.h:263:1: - AF_ATM = 30 // socket.h:256:1: - AF_BLUETOOTH = 36 // socket.h:264:1: - AF_CCITT = 10 // socket.h:233:1: - AF_CHAOS = 5 // socket.h:227:1: - AF_CNT = 21 // socket.h:244:1: - AF_COIP = 20 // socket.h:243:1: - AF_DATAKIT = 9 // socket.h:232:1: - AF_DECnet = 12 // socket.h:235:1: - AF_DLI = 13 // socket.h:236:1: - AF_E164 = 26 // socket.h:250:1: - AF_ECMA = 8 // socket.h:231:1: - AF_HYLINK = 15 // socket.h:238:1: - AF_HYPERV = 43 // socket.h:268:1: - AF_IEEE80211 = 37 // socket.h:265:1: - AF_IMPLINK = 3 // socket.h:225:1: - AF_INET = 2 // socket.h:223:1: - AF_INET6 = 28 // socket.h:253:1: - AF_INET6_SDP = 42 // socket.h:267:1: - AF_INET_SDP = 40 // socket.h:266:1: - AF_IPX = 23 // socket.h:246:1: - AF_ISDN = 26 // socket.h:249:1: - AF_ISO = 7 // socket.h:229:1: - AF_LAT = 14 // socket.h:237:1: - AF_LINK = 18 // socket.h:241:1: - AF_LOCAL = 1 // socket.h:220:1: - AF_MAX = 43 // socket.h:269:1: - AF_NATM = 29 // socket.h:255:1: - AF_NETBIOS = 6 // socket.h:228:1: - AF_NETGRAPH = 32 // socket.h:260:1: - AF_OSI = 7 // socket.h:230:1: - AF_PUP = 4 // socket.h:226:1: - AF_ROUTE = 17 // socket.h:240:1: - AF_SCLUSTER = 34 // socket.h:262:1: - AF_SIP = 24 // socket.h:247:1: - AF_SLOW = 33 // socket.h:261:1: - AF_SNA = 11 // socket.h:234:1: - AF_UNIX = 1 // socket.h:222:1: - AF_UNSPEC = 0 // socket.h:218:1: - AF_VENDOR00 = 39 // socket.h:275:1: - AF_VENDOR01 = 41 // socket.h:276:1: - AF_VENDOR03 = 45 // socket.h:277:1: - AF_VENDOR04 = 47 // socket.h:278:1: - AF_VENDOR05 = 49 // socket.h:279:1: - AF_VENDOR06 = 51 // socket.h:280:1: - AF_VENDOR07 = 53 // socket.h:281:1: - AF_VENDOR08 = 55 // socket.h:282:1: - AF_VENDOR09 = 57 // socket.h:283:1: - AF_VENDOR10 = 59 // socket.h:284:1: - AF_VENDOR11 = 61 // socket.h:285:1: - AF_VENDOR12 = 63 // socket.h:286:1: - AF_VENDOR13 = 65 // socket.h:287:1: - AF_VENDOR14 = 67 // socket.h:288:1: - AF_VENDOR15 = 69 // socket.h:289:1: - AF_VENDOR16 = 71 // socket.h:290:1: - AF_VENDOR17 = 73 // socket.h:291:1: - AF_VENDOR18 = 75 // socket.h:292:1: - AF_VENDOR19 = 77 // socket.h:293:1: - AF_VENDOR20 = 79 // socket.h:294:1: - AF_VENDOR21 = 81 // socket.h:295:1: - AF_VENDOR22 = 83 // socket.h:296:1: - AF_VENDOR23 = 85 // socket.h:297:1: - AF_VENDOR24 = 87 // socket.h:298:1: - AF_VENDOR25 = 89 // socket.h:299:1: - AF_VENDOR26 = 91 // socket.h:300:1: - AF_VENDOR27 = 93 // socket.h:301:1: - AF_VENDOR28 = 95 // socket.h:302:1: - AF_VENDOR29 = 97 // socket.h:303:1: - AF_VENDOR30 = 99 // socket.h:304:1: - AF_VENDOR31 = 101 // socket.h:305:1: - AF_VENDOR32 = 103 // socket.h:306:1: - AF_VENDOR33 = 105 // socket.h:307:1: - AF_VENDOR34 = 107 // socket.h:308:1: - AF_VENDOR35 = 109 // socket.h:309:1: - AF_VENDOR36 = 111 // socket.h:310:1: - AF_VENDOR37 = 113 // socket.h:311:1: - AF_VENDOR38 = 115 // socket.h:312:1: - AF_VENDOR39 = 117 // socket.h:313:1: - AF_VENDOR40 = 119 // socket.h:314:1: - AF_VENDOR41 = 121 // socket.h:315:1: - AF_VENDOR42 = 123 // socket.h:316:1: - AF_VENDOR43 = 125 // socket.h:317:1: - AF_VENDOR44 = 127 // socket.h:318:1: - AF_VENDOR45 = 129 // socket.h:319:1: - AF_VENDOR46 = 131 // socket.h:320:1: - AF_VENDOR47 = 133 // socket.h:321:1: - CMGROUP_MAX = 16 // socket.h:494:1: - MSG_CMSG_CLOEXEC = 0x00040000 // socket.h:467:1: - MSG_COMPAT = 0x00008000 // socket.h:458:1: - MSG_CTRUNC = 0x00000020 // socket.h:447:1: - MSG_DONTROUTE = 0x00000004 // socket.h:444:1: - MSG_DONTWAIT = 0x00000080 // socket.h:450:1: - MSG_EOF = 0x00000100 // socket.h:451:1: - MSG_EOR = 0x00000008 // socket.h:445:1: - MSG_NBIO = 0x00004000 // socket.h:457:1: - MSG_NOSIGNAL = 0x00020000 // socket.h:464:1: - MSG_NOTIFICATION = 0x00002000 // socket.h:456:1: - MSG_OOB = 0x00000001 // socket.h:442:1: - MSG_PEEK = 0x00000002 // socket.h:443:1: - MSG_TRUNC = 0x00000010 // socket.h:446:1: - MSG_WAITALL = 0x00000040 // socket.h:448:1: - MSG_WAITFORONE = 0x00080000 // socket.h:468:1: - NET_RT_DUMP = 1 // socket.h:413:1: - NET_RT_FLAGS = 2 // socket.h:414:1: - NET_RT_IFLIST = 3 // socket.h:415:1: - NET_RT_IFLISTL = 5 // socket.h:417:1: - NET_RT_IFMALIST = 4 // socket.h:416:1: - NET_RT_NHGRP = 7 // socket.h:420:1: - NET_RT_NHOP = 6 // socket.h:419:1: - PF_APPLETALK = 16 // socket.h:370:1: - PF_ARP = 35 // socket.h:388:1: - PF_ATM = 30 // socket.h:384:1: - PF_BLUETOOTH = 36 // socket.h:389:1: - PF_CCITT = 10 // socket.h:364:1: - PF_CHAOS = 5 // socket.h:358:1: - PF_CNT = 21 // socket.h:375:1: - PF_COIP = 20 // socket.h:374:1: - PF_DATAKIT = 9 // socket.h:363:1: - PF_DECnet = 12 // socket.h:366:1: - PF_DLI = 13 // socket.h:367:1: - PF_ECMA = 8 // socket.h:362:1: - PF_HYLINK = 15 // socket.h:369:1: - PF_IEEE80211 = 37 // socket.h:390:1: - PF_IMPLINK = 3 // socket.h:356:1: - PF_INET = 2 // socket.h:355:1: - PF_INET6 = 28 // socket.h:382:1: - PF_INET6_SDP = 42 // socket.h:392:1: - PF_INET_SDP = 40 // socket.h:391:1: - PF_IPX = 23 // socket.h:377:1: - PF_ISDN = 26 // socket.h:380:1: - PF_ISO = 7 // socket.h:360:1: - PF_KEY = 27 // socket.h:381:1: - PF_LAT = 14 // socket.h:368:1: - PF_LINK = 18 // socket.h:372:1: - PF_LOCAL = 1 // socket.h:353:1: - PF_MAX = 43 // socket.h:394:1: - PF_NATM = 29 // socket.h:383:1: - PF_NETBIOS = 6 // socket.h:359:1: - PF_NETGRAPH = 32 // socket.h:385:1: - PF_OSI = 7 // socket.h:361:1: - PF_PIP = 25 // socket.h:379:1: - PF_PUP = 4 // socket.h:357:1: - PF_ROUTE = 17 // socket.h:371:1: - PF_RTIP = 22 // socket.h:378:1: - PF_SCLUSTER = 34 // socket.h:387:1: - PF_SIP = 24 // socket.h:376:1: - PF_SLOW = 33 // socket.h:386:1: - PF_SNA = 11 // socket.h:365:1: - PF_UNIX = 1 // socket.h:354:1: - PF_UNSPEC = 0 // socket.h:352:1: - PF_XTP = 19 // socket.h:373:1: - PRU_FLUSH_RD = 0 // socket.h:635:1: - PRU_FLUSH_RDWR = 2 // socket.h:637:1: - PRU_FLUSH_WR = 1 // socket.h:636:1: - SCM_BINTIME = 0x04 // socket.h:586:1: - SCM_CREDS = 0x03 // socket.h:585:1: - SCM_CREDS2 = 0x08 // socket.h:590:1: - SCM_MONOTONIC = 0x06 // socket.h:588:1: - SCM_REALTIME = 0x05 // socket.h:587:1: - SCM_RIGHTS = 0x01 // socket.h:582:1: - SCM_TIMESTAMP = 0x02 // socket.h:584:1: - SCM_TIME_INFO = 0x07 // socket.h:589:1: - SF_MNOWAIT = 0x00000002 // socket.h:655:1: - SF_NOCACHE = 0x00000010 // socket.h:658:1: - SF_NODISKIO = 0x00000001 // socket.h:654:1: - SF_SYNC = 0x00000004 // socket.h:656:1: - SF_USER_READAHEAD = 0x00000008 // socket.h:657:1: - SHUT_RD = 0 // socket.h:628:1: - SHUT_RDWR = 2 // socket.h:630:1: - SHUT_WR = 1 // socket.h:629:1: + AF_APPLETALK = 16 // socket.h:240:1: + AF_ARP = 35 // socket.h:264:1: + AF_ATM = 30 // socket.h:257:1: + AF_BLUETOOTH = 36 // socket.h:265:1: + AF_CCITT = 10 // socket.h:234:1: + AF_CHAOS = 5 // socket.h:228:1: + AF_CNT = 21 // socket.h:245:1: + AF_COIP = 20 // socket.h:244:1: + AF_DATAKIT = 9 // socket.h:233:1: + AF_DECnet = 12 // socket.h:236:1: + AF_DLI = 13 // socket.h:237:1: + AF_E164 = 26 // socket.h:251:1: + AF_ECMA = 8 // socket.h:232:1: + AF_HYLINK = 15 // socket.h:239:1: + AF_HYPERV = 43 // socket.h:269:1: + AF_IEEE80211 = 37 // socket.h:266:1: + AF_IMPLINK = 3 // socket.h:226:1: + AF_INET = 2 // socket.h:224:1: + AF_INET6 = 28 // socket.h:254:1: + AF_INET6_SDP = 42 // socket.h:268:1: + AF_INET_SDP = 40 // socket.h:267:1: + AF_IPX = 23 // socket.h:247:1: + AF_ISDN = 26 // socket.h:250:1: + AF_ISO = 7 // socket.h:230:1: + AF_LAT = 14 // socket.h:238:1: + AF_LINK = 18 // socket.h:242:1: + AF_LOCAL = 1 // socket.h:221:1: + AF_MAX = 43 // socket.h:270:1: + AF_NATM = 29 // socket.h:256:1: + AF_NETBIOS = 6 // socket.h:229:1: + AF_NETGRAPH = 32 // socket.h:261:1: + AF_OSI = 7 // socket.h:231:1: + AF_PUP = 4 // socket.h:227:1: + AF_ROUTE = 17 // socket.h:241:1: + AF_SCLUSTER = 34 // socket.h:263:1: + AF_SIP = 24 // socket.h:248:1: + AF_SLOW = 33 // socket.h:262:1: + AF_SNA = 11 // socket.h:235:1: + AF_UNIX = 1 // socket.h:223:1: + AF_UNSPEC = 0 // socket.h:219:1: + AF_VENDOR00 = 39 // socket.h:276:1: + AF_VENDOR01 = 41 // socket.h:277:1: + AF_VENDOR03 = 45 // socket.h:278:1: + AF_VENDOR04 = 47 // socket.h:279:1: + AF_VENDOR05 = 49 // socket.h:280:1: + AF_VENDOR06 = 51 // socket.h:281:1: + AF_VENDOR07 = 53 // socket.h:282:1: + AF_VENDOR08 = 55 // socket.h:283:1: + AF_VENDOR09 = 57 // socket.h:284:1: + AF_VENDOR10 = 59 // socket.h:285:1: + AF_VENDOR11 = 61 // socket.h:286:1: + AF_VENDOR12 = 63 // socket.h:287:1: + AF_VENDOR13 = 65 // socket.h:288:1: + AF_VENDOR14 = 67 // socket.h:289:1: + AF_VENDOR15 = 69 // socket.h:290:1: + AF_VENDOR16 = 71 // socket.h:291:1: + AF_VENDOR17 = 73 // socket.h:292:1: + AF_VENDOR18 = 75 // socket.h:293:1: + AF_VENDOR19 = 77 // socket.h:294:1: + AF_VENDOR20 = 79 // socket.h:295:1: + AF_VENDOR21 = 81 // socket.h:296:1: + AF_VENDOR22 = 83 // socket.h:297:1: + AF_VENDOR23 = 85 // socket.h:298:1: + AF_VENDOR24 = 87 // socket.h:299:1: + AF_VENDOR25 = 89 // socket.h:300:1: + AF_VENDOR26 = 91 // socket.h:301:1: + AF_VENDOR27 = 93 // socket.h:302:1: + AF_VENDOR28 = 95 // socket.h:303:1: + AF_VENDOR29 = 97 // socket.h:304:1: + AF_VENDOR30 = 99 // socket.h:305:1: + AF_VENDOR31 = 101 // socket.h:306:1: + AF_VENDOR32 = 103 // socket.h:307:1: + AF_VENDOR33 = 105 // socket.h:308:1: + AF_VENDOR34 = 107 // socket.h:309:1: + AF_VENDOR35 = 109 // socket.h:310:1: + AF_VENDOR36 = 111 // socket.h:311:1: + AF_VENDOR37 = 113 // socket.h:312:1: + AF_VENDOR38 = 115 // socket.h:313:1: + AF_VENDOR39 = 117 // socket.h:314:1: + AF_VENDOR40 = 119 // socket.h:315:1: + AF_VENDOR41 = 121 // socket.h:316:1: + AF_VENDOR42 = 123 // socket.h:317:1: + AF_VENDOR43 = 125 // socket.h:318:1: + AF_VENDOR44 = 127 // socket.h:319:1: + AF_VENDOR45 = 129 // socket.h:320:1: + AF_VENDOR46 = 131 // socket.h:321:1: + AF_VENDOR47 = 133 // socket.h:322:1: + CMGROUP_MAX = 16 // socket.h:495:1: + MSG_CMSG_CLOEXEC = 0x00040000 // socket.h:468:1: + MSG_COMPAT = 0x00008000 // socket.h:459:1: + MSG_CTRUNC = 0x00000020 // socket.h:448:1: + MSG_DONTROUTE = 0x00000004 // socket.h:445:1: + MSG_DONTWAIT = 0x00000080 // socket.h:451:1: + MSG_EOF = 0x00000100 // socket.h:452:1: + MSG_EOR = 0x00000008 // socket.h:446:1: + MSG_NBIO = 0x00004000 // socket.h:458:1: + MSG_NOSIGNAL = 0x00020000 // socket.h:465:1: + MSG_NOTIFICATION = 0x00002000 // socket.h:457:1: + MSG_OOB = 0x00000001 // socket.h:443:1: + MSG_PEEK = 0x00000002 // socket.h:444:1: + MSG_TRUNC = 0x00000010 // socket.h:447:1: + MSG_WAITALL = 0x00000040 // socket.h:449:1: + MSG_WAITFORONE = 0x00080000 // socket.h:469:1: + NET_RT_DUMP = 1 // socket.h:414:1: + NET_RT_FLAGS = 2 // socket.h:415:1: + NET_RT_IFLIST = 3 // socket.h:416:1: + NET_RT_IFLISTL = 5 // socket.h:418:1: + NET_RT_IFMALIST = 4 // socket.h:417:1: + NET_RT_NHGRP = 7 // socket.h:421:1: + NET_RT_NHOP = 6 // socket.h:420:1: + PF_APPLETALK = 16 // socket.h:371:1: + PF_ARP = 35 // socket.h:389:1: + PF_ATM = 30 // socket.h:385:1: + PF_BLUETOOTH = 36 // socket.h:390:1: + PF_CCITT = 10 // socket.h:365:1: + PF_CHAOS = 5 // socket.h:359:1: + PF_CNT = 21 // socket.h:376:1: + PF_COIP = 20 // socket.h:375:1: + PF_DATAKIT = 9 // socket.h:364:1: + PF_DECnet = 12 // socket.h:367:1: + PF_DLI = 13 // socket.h:368:1: + PF_ECMA = 8 // socket.h:363:1: + PF_HYLINK = 15 // socket.h:370:1: + PF_IEEE80211 = 37 // socket.h:391:1: + PF_IMPLINK = 3 // socket.h:357:1: + PF_INET = 2 // socket.h:356:1: + PF_INET6 = 28 // socket.h:383:1: + PF_INET6_SDP = 42 // socket.h:393:1: + PF_INET_SDP = 40 // socket.h:392:1: + PF_IPX = 23 // socket.h:378:1: + PF_ISDN = 26 // socket.h:381:1: + PF_ISO = 7 // socket.h:361:1: + PF_KEY = 27 // socket.h:382:1: + PF_LAT = 14 // socket.h:369:1: + PF_LINK = 18 // socket.h:373:1: + PF_LOCAL = 1 // socket.h:354:1: + PF_MAX = 43 // socket.h:395:1: + PF_NATM = 29 // socket.h:384:1: + PF_NETBIOS = 6 // socket.h:360:1: + PF_NETGRAPH = 32 // socket.h:386:1: + PF_OSI = 7 // socket.h:362:1: + PF_PIP = 25 // socket.h:380:1: + PF_PUP = 4 // socket.h:358:1: + PF_ROUTE = 17 // socket.h:372:1: + PF_RTIP = 22 // socket.h:379:1: + PF_SCLUSTER = 34 // socket.h:388:1: + PF_SIP = 24 // socket.h:377:1: + PF_SLOW = 33 // socket.h:387:1: + PF_SNA = 11 // socket.h:366:1: + PF_UNIX = 1 // socket.h:355:1: + PF_UNSPEC = 0 // socket.h:353:1: + PF_XTP = 19 // socket.h:374:1: + PRU_FLUSH_RD = 0 // socket.h:636:1: + PRU_FLUSH_RDWR = 2 // socket.h:638:1: + PRU_FLUSH_WR = 1 // socket.h:637:1: + SCM_BINTIME = 0x04 // socket.h:587:1: + SCM_CREDS = 0x03 // socket.h:586:1: + SCM_CREDS2 = 0x08 // socket.h:591:1: + SCM_MONOTONIC = 0x06 // socket.h:589:1: + SCM_REALTIME = 0x05 // socket.h:588:1: + SCM_RIGHTS = 0x01 // socket.h:583:1: + SCM_TIMESTAMP = 0x02 // socket.h:585:1: + SCM_TIME_INFO = 0x07 // socket.h:590:1: + SF_MNOWAIT = 0x00000002 // socket.h:656:1: + SF_NOCACHE = 0x00000010 // socket.h:659:1: + SF_NODISKIO = 0x00000001 // socket.h:655:1: + SF_SYNC = 0x00000004 // socket.h:657:1: + SF_USER_READAHEAD = 0x00000008 // socket.h:658:1: + SHUT_RD = 0 // socket.h:629:1: + SHUT_RDWR = 2 // socket.h:631:1: + SHUT_WR = 1 // socket.h:630:1: SOCK_CLOEXEC = 0x10000000 // socket.h:114:1: SOCK_DGRAM = 2 // socket.h:103:1: - SOCK_MAXADDRLEN = 255 // socket.h:334:1: + SOCK_MAXADDRLEN = 255 // socket.h:335:1: SOCK_NONBLOCK = 0x20000000 // socket.h:115:1: SOCK_RAW = 3 // socket.h:104:1: SOCK_RDM = 4 // socket.h:106:1: SOCK_SEQPACKET = 5 // socket.h:108:1: SOCK_STREAM = 1 // socket.h:102:1: - SOL_SOCKET = 0xffff // socket.h:213:1: - SOMAXCONN = 128 // socket.h:426:1: + SOL_SOCKET = 0xffff // socket.h:214:1: + SOMAXCONN = 128 // socket.h:427:1: SO_ACCEPTCONN = 0x00000002 // socket.h:130:1: SO_ACCEPTFILTER = 0x00001000 // socket.h:144:1: SO_BINTIME = 0x00002000 // socket.h:145:1: SO_BROADCAST = 0x00000020 // socket.h:134:1: SO_DEBUG = 0x00000001 // socket.h:129:1: - SO_DOMAIN = 0x1019 // socket.h:174:1: + SO_DOMAIN = 0x1019 // socket.h:175:1: SO_DONTROUTE = 0x00000010 // socket.h:133:1: - SO_ERROR = 0x1007 // socket.h:160:1: + SO_ERROR = 0x1007 // socket.h:161:1: SO_KEEPALIVE = 0x00000008 // socket.h:132:1: - SO_LABEL = 0x1009 // socket.h:163:1: + SO_LABEL = 0x1009 // socket.h:164:1: SO_LINGER = 0x00000080 // socket.h:138:1: - SO_LISTENINCQLEN = 0x1013 // socket.h:167:1: - SO_LISTENQLEN = 0x1012 // socket.h:166:1: - SO_LISTENQLIMIT = 0x1011 // socket.h:165:1: - SO_MAX_PACING_RATE = 0x1018 // socket.h:173:1: + SO_LISTENINCQLEN = 0x1013 // socket.h:168:1: + SO_LISTENQLEN = 0x1012 // socket.h:167:1: + SO_LISTENQLIMIT = 0x1011 // socket.h:166:1: + SO_MAX_PACING_RATE = 0x1018 // socket.h:174:1: SO_NOSIGPIPE = 0x00000800 // socket.h:143:1: SO_NO_DDP = 0x00008000 // socket.h:148:1: SO_NO_OFFLOAD = 0x00004000 // socket.h:147:1: SO_OOBINLINE = 0x00000100 // socket.h:139:1: - SO_PEERLABEL = 0x1010 // socket.h:164:1: - SO_PROTOCOL = 0x1016 // socket.h:170:1: - SO_PROTOTYPE = 4118 // socket.h:171:1: - SO_RCVBUF = 0x1002 // socket.h:155:1: - SO_RCVLOWAT = 0x1004 // socket.h:157:1: - SO_RCVTIMEO = 0x1006 // socket.h:159:1: + SO_PEERLABEL = 0x1010 // socket.h:165:1: + SO_PROTOCOL = 0x1016 // socket.h:171:1: + SO_PROTOTYPE = 4118 // socket.h:172:1: + SO_RCVBUF = 0x1002 // socket.h:156:1: + SO_RCVLOWAT = 0x1004 // socket.h:158:1: + SO_RCVTIMEO = 0x1006 // socket.h:160:1: + SO_RERROR = 0x00020000 // socket.h:150:1: SO_REUSEADDR = 0x00000004 // socket.h:131:1: SO_REUSEPORT = 0x00000200 // socket.h:141:1: SO_REUSEPORT_LB = 0x00010000 // socket.h:149:1: - SO_SETFIB = 0x1014 // socket.h:168:1: - SO_SNDBUF = 0x1001 // socket.h:154:1: - SO_SNDLOWAT = 0x1003 // socket.h:156:1: - SO_SNDTIMEO = 0x1005 // socket.h:158:1: + SO_SETFIB = 0x1014 // socket.h:169:1: + SO_SNDBUF = 0x1001 // socket.h:155:1: + SO_SNDLOWAT = 0x1003 // socket.h:157:1: + SO_SNDTIMEO = 0x1005 // socket.h:159:1: SO_TIMESTAMP = 0x00000400 // socket.h:142:1: - SO_TS_BINTIME = 1 // socket.h:179:1: - SO_TS_CLOCK = 0x1017 // socket.h:172:1: - SO_TS_CLOCK_MAX = 3 // socket.h:183:1: - SO_TS_DEFAULT = 0 // socket.h:182:1: - SO_TS_MONOTONIC = 3 // socket.h:181:1: - SO_TS_REALTIME = 2 // socket.h:180:1: - SO_TS_REALTIME_MICRO = 0 // socket.h:178:1: - SO_TYPE = 0x1008 // socket.h:161:1: + SO_TS_BINTIME = 1 // socket.h:180:1: + SO_TS_CLOCK = 0x1017 // socket.h:173:1: + SO_TS_CLOCK_MAX = 3 // socket.h:184:1: + SO_TS_DEFAULT = 0 // socket.h:183:1: + SO_TS_MONOTONIC = 3 // socket.h:182:1: + SO_TS_REALTIME = 2 // socket.h:181:1: + SO_TS_REALTIME_MICRO = 0 // socket.h:179:1: + SO_TYPE = 0x1008 // socket.h:162:1: SO_USELOOPBACK = 0x00000040 // socket.h:136:1: - SO_USER_COOKIE = 0x1015 // socket.h:169:1: - SO_VENDOR = 0x80000000 // socket.h:192:1: - ST_INFO_HW = 0x0001 // socket.h:598:1: - ST_INFO_HW_HPREC = 0x0002 // socket.h:599:1: + SO_USER_COOKIE = 0x1015 // socket.h:170:1: + SO_VENDOR = 0x80000000 // socket.h:193:1: + ST_INFO_HW = 0x0001 // socket.h:599:1: + ST_INFO_HW_HPREC = 0x0002 // socket.h:600:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_GID_T_DECLARED = 0 // socket.h:53:1: X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF_T_DECLARED = 0 // socket.h:58:1: X_PID_T_DECLARED = 0 // socket.h:63:1: X_SA_FAMILY_T_DECLARED = 0 // socket.h:69:1: @@ -266,12 +267,12 @@ const ( X_UINT32_T_DECLARED = 0 // socket.h:91:1: X_UINTPTR_T_DECLARED = 0 // socket.h:96:1: X_X86_INCLUDE__ALIGN_H_ = 0 // _align.h:44:1: - Pseudo_AF_HDRCMPLT = 31 // socket.h:257:1: - Pseudo_AF_KEY = 27 // socket.h:251:1: - Pseudo_AF_PIP = 25 // socket.h:248:1: - Pseudo_AF_RTIP = 22 // socket.h:245:1: - Pseudo_AF_XTP = 19 // socket.h:242:1: - Unix = 1 // <predefined>:337:1: + Pseudo_AF_HDRCMPLT = 31 // socket.h:258:1: + Pseudo_AF_KEY = 27 // socket.h:252:1: + Pseudo_AF_PIP = 25 // socket.h:249:1: + Pseudo_AF_RTIP = 22 // socket.h:246:1: + Pseudo_AF_XTP = 19 // socket.h:243:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -541,12 +542,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -789,8 +793,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -925,12 +929,12 @@ type Uintptr_t = X__uintptr_t /* socket.h:95:21 */ type Linger = struct { Fl_onoff int32 Fl_linger int32 -} /* socket.h:198:1 */ +} /* socket.h:199:1 */ type Accept_filter_arg = struct { Faf_name [16]int8 Faf_arg [240]int8 -} /* socket.h:204:1 */ +} /* socket.h:205:1 */ // Level number for (get/set)sockopt() to apply to socket itself. @@ -945,14 +949,14 @@ type Sockaddr = struct { Fsa_len uint8 Fsa_family Sa_family_t Fsa_data [14]int8 -} /* socket.h:328:1 */ +} /* socket.h:329:1 */ // Structure used by kernel to pass protocol // information in raw sockets. type Sockproto = struct { Fsp_family uint16 Fsp_protocol uint16 -} /* socket.h:340:1 */ +} /* socket.h:341:1 */ // - // SPDX-License-Identifier: BSD-3-Clause @@ -1027,7 +1031,7 @@ type Msghdr = struct { Fmsg_control uintptr Fmsg_controllen Socklen_t Fmsg_flags int32 -} /* socket.h:432:1 */ +} /* socket.h:433:1 */ // 0x00000200 unused // 0x00000400 unused @@ -1042,7 +1046,7 @@ type Cmsghdr = struct { Fcmsg_len Socklen_t Fcmsg_level int32 Fcmsg_type int32 -} /* socket.h:481:1 */ +} /* socket.h:482:1 */ // While we may have more groups than this, the cmsgcred struct must // be able to fit in an mbuf and we have historically supported a @@ -1061,7 +1065,7 @@ type Cmsgcred = struct { Fcmcred_ngroups int16 F__ccgo_pad1 [2]byte Fcmcred_groups [16]Gid_t -} /* socket.h:503:1 */ +} /* socket.h:504:1 */ // Socket credentials (LOCAL_CREDS). type Sockcred = struct { @@ -1071,7 +1075,7 @@ type Sockcred = struct { Fsc_egid Gid_t Fsc_ngroups int32 Fsc_groups [1]Gid_t -} /* socket.h:515:1 */ +} /* socket.h:516:1 */ // Compute size of a sockcred structure with groups. @@ -1085,7 +1089,7 @@ type Sockcred2 = struct { Fsc_egid Gid_t Fsc_ngroups int32 Fsc_groups [1]Gid_t -} /* socket.h:533:1 */ +} /* socket.h:534:1 */ // given pointer to struct cmsghdr, return pointer to data @@ -1102,13 +1106,13 @@ type Sock_timestamp_info = struct { Fst_info_flags X__uint32_t Fst_info_pad0 X__uint32_t Fst_info_rsv [7]X__uint64_t -} /* socket.h:592:1 */ +} /* socket.h:593:1 */ // 4.3 compat sockaddr, move to compat file later type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]int8 -} /* socket.h:607:1 */ +} /* socket.h:608:1 */ // 4.3-compat message header (move to compat file later). type Omsghdr = struct { @@ -1121,7 +1125,7 @@ type Omsghdr = struct { Fmsg_accrights uintptr Fmsg_accrightslen int32 F__ccgo_pad3 [4]byte -} /* socket.h:615:1 */ +} /* socket.h:616:1 */ // howto arguments for shutdown(2), specified by Posix.1g. @@ -1136,7 +1140,7 @@ type Sf_hdtr = struct { Ftrailers uintptr Ftrl_cnt int32 F__ccgo_pad2 [4]byte -} /* socket.h:644:1 */ +} /* socket.h:645:1 */ // Sendfile-specific flag(s) @@ -1154,6 +1158,6 @@ type Mmsghdr = struct { Fmsg_flags int32 } Fmsg_len Ssize_t -} /* socket.h:668:1 */ +} /* socket.h:669:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_freebsd_arm.go b/vendor/modernc.org/libc/sys/socket/socket_freebsd_arm.go new file mode 100644 index 00000000..38c5691f --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/socket_freebsd_arm.go @@ -0,0 +1,1091 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_freebsd_arm.go -pkgname socket', DO NOT EDIT. + +package socket + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_APPLETALK = 16 // socket.h:240:1: + AF_ARP = 35 // socket.h:264:1: + AF_ATM = 30 // socket.h:257:1: + AF_BLUETOOTH = 36 // socket.h:265:1: + AF_CCITT = 10 // socket.h:234:1: + AF_CHAOS = 5 // socket.h:228:1: + AF_CNT = 21 // socket.h:245:1: + AF_COIP = 20 // socket.h:244:1: + AF_DATAKIT = 9 // socket.h:233:1: + AF_DECnet = 12 // socket.h:236:1: + AF_DLI = 13 // socket.h:237:1: + AF_E164 = 26 // socket.h:251:1: + AF_ECMA = 8 // socket.h:232:1: + AF_HYLINK = 15 // socket.h:239:1: + AF_HYPERV = 43 // socket.h:269:1: + AF_IEEE80211 = 37 // socket.h:266:1: + AF_IMPLINK = 3 // socket.h:226:1: + AF_INET = 2 // socket.h:224:1: + AF_INET6 = 28 // socket.h:254:1: + AF_INET6_SDP = 42 // socket.h:268:1: + AF_INET_SDP = 40 // socket.h:267:1: + AF_IPX = 23 // socket.h:247:1: + AF_ISDN = 26 // socket.h:250:1: + AF_ISO = 7 // socket.h:230:1: + AF_LAT = 14 // socket.h:238:1: + AF_LINK = 18 // socket.h:242:1: + AF_LOCAL = 1 // socket.h:221:1: + AF_MAX = 43 // socket.h:270:1: + AF_NATM = 29 // socket.h:256:1: + AF_NETBIOS = 6 // socket.h:229:1: + AF_NETGRAPH = 32 // socket.h:261:1: + AF_OSI = 7 // socket.h:231:1: + AF_PUP = 4 // socket.h:227:1: + AF_ROUTE = 17 // socket.h:241:1: + AF_SCLUSTER = 34 // socket.h:263:1: + AF_SIP = 24 // socket.h:248:1: + AF_SLOW = 33 // socket.h:262:1: + AF_SNA = 11 // socket.h:235:1: + AF_UNIX = 1 // socket.h:223:1: + AF_UNSPEC = 0 // socket.h:219:1: + AF_VENDOR00 = 39 // socket.h:276:1: + AF_VENDOR01 = 41 // socket.h:277:1: + AF_VENDOR03 = 45 // socket.h:278:1: + AF_VENDOR04 = 47 // socket.h:279:1: + AF_VENDOR05 = 49 // socket.h:280:1: + AF_VENDOR06 = 51 // socket.h:281:1: + AF_VENDOR07 = 53 // socket.h:282:1: + AF_VENDOR08 = 55 // socket.h:283:1: + AF_VENDOR09 = 57 // socket.h:284:1: + AF_VENDOR10 = 59 // socket.h:285:1: + AF_VENDOR11 = 61 // socket.h:286:1: + AF_VENDOR12 = 63 // socket.h:287:1: + AF_VENDOR13 = 65 // socket.h:288:1: + AF_VENDOR14 = 67 // socket.h:289:1: + AF_VENDOR15 = 69 // socket.h:290:1: + AF_VENDOR16 = 71 // socket.h:291:1: + AF_VENDOR17 = 73 // socket.h:292:1: + AF_VENDOR18 = 75 // socket.h:293:1: + AF_VENDOR19 = 77 // socket.h:294:1: + AF_VENDOR20 = 79 // socket.h:295:1: + AF_VENDOR21 = 81 // socket.h:296:1: + AF_VENDOR22 = 83 // socket.h:297:1: + AF_VENDOR23 = 85 // socket.h:298:1: + AF_VENDOR24 = 87 // socket.h:299:1: + AF_VENDOR25 = 89 // socket.h:300:1: + AF_VENDOR26 = 91 // socket.h:301:1: + AF_VENDOR27 = 93 // socket.h:302:1: + AF_VENDOR28 = 95 // socket.h:303:1: + AF_VENDOR29 = 97 // socket.h:304:1: + AF_VENDOR30 = 99 // socket.h:305:1: + AF_VENDOR31 = 101 // socket.h:306:1: + AF_VENDOR32 = 103 // socket.h:307:1: + AF_VENDOR33 = 105 // socket.h:308:1: + AF_VENDOR34 = 107 // socket.h:309:1: + AF_VENDOR35 = 109 // socket.h:310:1: + AF_VENDOR36 = 111 // socket.h:311:1: + AF_VENDOR37 = 113 // socket.h:312:1: + AF_VENDOR38 = 115 // socket.h:313:1: + AF_VENDOR39 = 117 // socket.h:314:1: + AF_VENDOR40 = 119 // socket.h:315:1: + AF_VENDOR41 = 121 // socket.h:316:1: + AF_VENDOR42 = 123 // socket.h:317:1: + AF_VENDOR43 = 125 // socket.h:318:1: + AF_VENDOR44 = 127 // socket.h:319:1: + AF_VENDOR45 = 129 // socket.h:320:1: + AF_VENDOR46 = 131 // socket.h:321:1: + AF_VENDOR47 = 133 // socket.h:322:1: + CMGROUP_MAX = 16 // socket.h:495:1: + MSG_CMSG_CLOEXEC = 0x00040000 // socket.h:468:1: + MSG_COMPAT = 0x00008000 // socket.h:459:1: + MSG_CTRUNC = 0x00000020 // socket.h:448:1: + MSG_DONTROUTE = 0x00000004 // socket.h:445:1: + MSG_DONTWAIT = 0x00000080 // socket.h:451:1: + MSG_EOF = 0x00000100 // socket.h:452:1: + MSG_EOR = 0x00000008 // socket.h:446:1: + MSG_NBIO = 0x00004000 // socket.h:458:1: + MSG_NOSIGNAL = 0x00020000 // socket.h:465:1: + MSG_NOTIFICATION = 0x00002000 // socket.h:457:1: + MSG_OOB = 0x00000001 // socket.h:443:1: + MSG_PEEK = 0x00000002 // socket.h:444:1: + MSG_TRUNC = 0x00000010 // socket.h:447:1: + MSG_WAITALL = 0x00000040 // socket.h:449:1: + MSG_WAITFORONE = 0x00080000 // socket.h:469:1: + NET_RT_DUMP = 1 // socket.h:414:1: + NET_RT_FLAGS = 2 // socket.h:415:1: + NET_RT_IFLIST = 3 // socket.h:416:1: + NET_RT_IFLISTL = 5 // socket.h:418:1: + NET_RT_IFMALIST = 4 // socket.h:417:1: + NET_RT_NHGRP = 7 // socket.h:421:1: + NET_RT_NHOP = 6 // socket.h:420:1: + PF_APPLETALK = 16 // socket.h:371:1: + PF_ARP = 35 // socket.h:389:1: + PF_ATM = 30 // socket.h:385:1: + PF_BLUETOOTH = 36 // socket.h:390:1: + PF_CCITT = 10 // socket.h:365:1: + PF_CHAOS = 5 // socket.h:359:1: + PF_CNT = 21 // socket.h:376:1: + PF_COIP = 20 // socket.h:375:1: + PF_DATAKIT = 9 // socket.h:364:1: + PF_DECnet = 12 // socket.h:367:1: + PF_DLI = 13 // socket.h:368:1: + PF_ECMA = 8 // socket.h:363:1: + PF_HYLINK = 15 // socket.h:370:1: + PF_IEEE80211 = 37 // socket.h:391:1: + PF_IMPLINK = 3 // socket.h:357:1: + PF_INET = 2 // socket.h:356:1: + PF_INET6 = 28 // socket.h:383:1: + PF_INET6_SDP = 42 // socket.h:393:1: + PF_INET_SDP = 40 // socket.h:392:1: + PF_IPX = 23 // socket.h:378:1: + PF_ISDN = 26 // socket.h:381:1: + PF_ISO = 7 // socket.h:361:1: + PF_KEY = 27 // socket.h:382:1: + PF_LAT = 14 // socket.h:369:1: + PF_LINK = 18 // socket.h:373:1: + PF_LOCAL = 1 // socket.h:354:1: + PF_MAX = 43 // socket.h:395:1: + PF_NATM = 29 // socket.h:384:1: + PF_NETBIOS = 6 // socket.h:360:1: + PF_NETGRAPH = 32 // socket.h:386:1: + PF_OSI = 7 // socket.h:362:1: + PF_PIP = 25 // socket.h:380:1: + PF_PUP = 4 // socket.h:358:1: + PF_ROUTE = 17 // socket.h:372:1: + PF_RTIP = 22 // socket.h:379:1: + PF_SCLUSTER = 34 // socket.h:388:1: + PF_SIP = 24 // socket.h:377:1: + PF_SLOW = 33 // socket.h:387:1: + PF_SNA = 11 // socket.h:366:1: + PF_UNIX = 1 // socket.h:355:1: + PF_UNSPEC = 0 // socket.h:353:1: + PF_XTP = 19 // socket.h:374:1: + PRU_FLUSH_RD = 0 // socket.h:636:1: + PRU_FLUSH_RDWR = 2 // socket.h:638:1: + PRU_FLUSH_WR = 1 // socket.h:637:1: + SCM_BINTIME = 0x04 // socket.h:587:1: + SCM_CREDS = 0x03 // socket.h:586:1: + SCM_CREDS2 = 0x08 // socket.h:591:1: + SCM_MONOTONIC = 0x06 // socket.h:589:1: + SCM_REALTIME = 0x05 // socket.h:588:1: + SCM_RIGHTS = 0x01 // socket.h:583:1: + SCM_TIMESTAMP = 0x02 // socket.h:585:1: + SCM_TIME_INFO = 0x07 // socket.h:590:1: + SF_MNOWAIT = 0x00000002 // socket.h:656:1: + SF_NOCACHE = 0x00000010 // socket.h:659:1: + SF_NODISKIO = 0x00000001 // socket.h:655:1: + SF_SYNC = 0x00000004 // socket.h:657:1: + SF_USER_READAHEAD = 0x00000008 // socket.h:658:1: + SHUT_RD = 0 // socket.h:629:1: + SHUT_RDWR = 2 // socket.h:631:1: + SHUT_WR = 1 // socket.h:630:1: + SOCK_CLOEXEC = 0x10000000 // socket.h:114:1: + SOCK_DGRAM = 2 // socket.h:103:1: + SOCK_MAXADDRLEN = 255 // socket.h:335:1: + SOCK_NONBLOCK = 0x20000000 // socket.h:115:1: + SOCK_RAW = 3 // socket.h:104:1: + SOCK_RDM = 4 // socket.h:106:1: + SOCK_SEQPACKET = 5 // socket.h:108:1: + SOCK_STREAM = 1 // socket.h:102:1: + SOL_SOCKET = 0xffff // socket.h:214:1: + SOMAXCONN = 128 // socket.h:427:1: + SO_ACCEPTCONN = 0x00000002 // socket.h:130:1: + SO_ACCEPTFILTER = 0x00001000 // socket.h:144:1: + SO_BINTIME = 0x00002000 // socket.h:145:1: + SO_BROADCAST = 0x00000020 // socket.h:134:1: + SO_DEBUG = 0x00000001 // socket.h:129:1: + SO_DOMAIN = 0x1019 // socket.h:175:1: + SO_DONTROUTE = 0x00000010 // socket.h:133:1: + SO_ERROR = 0x1007 // socket.h:161:1: + SO_KEEPALIVE = 0x00000008 // socket.h:132:1: + SO_LABEL = 0x1009 // socket.h:164:1: + SO_LINGER = 0x00000080 // socket.h:138:1: + SO_LISTENINCQLEN = 0x1013 // socket.h:168:1: + SO_LISTENQLEN = 0x1012 // socket.h:167:1: + SO_LISTENQLIMIT = 0x1011 // socket.h:166:1: + SO_MAX_PACING_RATE = 0x1018 // socket.h:174:1: + SO_NOSIGPIPE = 0x00000800 // socket.h:143:1: + SO_NO_DDP = 0x00008000 // socket.h:148:1: + SO_NO_OFFLOAD = 0x00004000 // socket.h:147:1: + SO_OOBINLINE = 0x00000100 // socket.h:139:1: + SO_PEERLABEL = 0x1010 // socket.h:165:1: + SO_PROTOCOL = 0x1016 // socket.h:171:1: + SO_PROTOTYPE = 4118 // socket.h:172:1: + SO_RCVBUF = 0x1002 // socket.h:156:1: + SO_RCVLOWAT = 0x1004 // socket.h:158:1: + SO_RCVTIMEO = 0x1006 // socket.h:160:1: + SO_RERROR = 0x00020000 // socket.h:150:1: + SO_REUSEADDR = 0x00000004 // socket.h:131:1: + SO_REUSEPORT = 0x00000200 // socket.h:141:1: + SO_REUSEPORT_LB = 0x00010000 // socket.h:149:1: + SO_SETFIB = 0x1014 // socket.h:169:1: + SO_SNDBUF = 0x1001 // socket.h:155:1: + SO_SNDLOWAT = 0x1003 // socket.h:157:1: + SO_SNDTIMEO = 0x1005 // socket.h:159:1: + SO_TIMESTAMP = 0x00000400 // socket.h:142:1: + SO_TS_BINTIME = 1 // socket.h:180:1: + SO_TS_CLOCK = 0x1017 // socket.h:173:1: + SO_TS_CLOCK_MAX = 3 // socket.h:184:1: + SO_TS_DEFAULT = 0 // socket.h:183:1: + SO_TS_MONOTONIC = 3 // socket.h:182:1: + SO_TS_REALTIME = 2 // socket.h:181:1: + SO_TS_REALTIME_MICRO = 0 // socket.h:179:1: + SO_TYPE = 0x1008 // socket.h:162:1: + SO_USELOOPBACK = 0x00000040 // socket.h:136:1: + SO_USER_COOKIE = 0x1015 // socket.h:170:1: + SO_VENDOR = 0x80000000 // socket.h:193:1: + ST_INFO_HW = 0x0001 // socket.h:599:1: + ST_INFO_HW_HPREC = 0x0002 // socket.h:600:1: + X_ARM_INCLUDE__ALIGN_H_ = 0 // _align.h:44:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GID_T_DECLARED = 0 // socket.h:53:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF_T_DECLARED = 0 // socket.h:58:1: + X_PID_T_DECLARED = 0 // socket.h:63:1: + X_SA_FAMILY_T_DECLARED = 0 // socket.h:69:1: + X_SIZE_T_DECLARED = 0 // _iovec.h:42:1: + X_SOCKLEN_T_DECLARED = 0 // socket.h:74:1: + X_SSIZE_T_DECLARED = 0 // socket.h:79:1: + X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SOCKET_H_ = 0 // socket.h:36:1: + X_SYS__IOVEC_H_ = 0 // _iovec.h:36:1: + X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_UID_T_DECLARED = 0 // socket.h:85:1: + X_UINT32_T_DECLARED = 0 // socket.h:91:1: + X_UINTPTR_T_DECLARED = 0 // socket.h:96:1: + Pseudo_AF_HDRCMPLT = 31 // socket.h:258:1: + Pseudo_AF_KEY = 27 // socket.h:252:1: + Pseudo_AF_PIP = 25 // socket.h:249:1: + Pseudo_AF_RTIP = 22 // socket.h:246:1: + Pseudo_AF_XTP = 19 // socket.h:243:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ + +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* _iovec.h:45:1 */ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2001 David E. O'Brien +// Copyright (c) 1990 The Regents of the University of California. +// All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// William Jolitz. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// from: @(#)param.h 5.8 (Berkeley) 6/28/91 +// $FreeBSD$ + +// Round p (pointer or byte index) up to the hardware-required alignment which +// is sufficient for any data type, pointer or numeric. The resulting type +// is equivelent to arm's uintptr_t (but is purposely spelled "unsigned" here). + +// Definitions related to sockets: types, address families, options. + +// Data types. +type Gid_t = X__gid_t /* socket.h:52:18 */ + +type Off_t = X__off_t /* socket.h:57:18 */ + +type Pid_t = X__pid_t /* socket.h:62:18 */ + +type Sa_family_t = X__sa_family_t /* socket.h:68:23 */ + +type Socklen_t = X__socklen_t /* socket.h:73:21 */ + +type Ssize_t = X__ssize_t /* socket.h:78:19 */ + +type Uid_t = X__uid_t /* socket.h:84:18 */ + +type Uint32_t = X__uint32_t /* socket.h:90:20 */ + +type Uintptr_t = X__uintptr_t /* socket.h:95:21 */ + +// Types + +// Creation flags, OR'ed into socket() and socketpair() type argument. + +// Option flags per-socket. + +// Additional options, not kept in so_options. + +// Space reserved for new socket options added by third-party vendors. +// This range applies to all socket option levels. New socket options +// in FreeBSD should always use an option value less than SO_VENDOR. + +// Structure used for manipulating linger option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:199:1 */ + +type Accept_filter_arg = struct { + Faf_name [16]uint8 + Faf_arg [240]uint8 +} /* socket.h:205:1 */ + +// Level number for (get/set)sockopt() to apply to socket itself. + +// Address families. +// When allocating a new AF_ constant, please only allocate +// even numbered constants for FreeBSD until 134 as odd numbered AF_ +// constants 39-133 are now reserved for vendors. + +// Structure used by kernel to store most +// addresses. +type Sockaddr = struct { + Fsa_len uint8 + Fsa_family Sa_family_t + Fsa_data [14]uint8 +} /* socket.h:329:1 */ + +// Structure used by kernel to pass protocol +// information in raw sockets. +type Sockproto = struct { + Fsp_family uint16 + Fsp_protocol uint16 +} /* socket.h:341:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 +// $FreeBSD$ + +// RFC 2553: protocol-independent placeholder for socket addresses + +type Sockaddr_storage = struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 +} /* _sockaddr_storage.h:48:1 */ + +// Protocol families, same as address families for now. + +// Definitions for network related sysctl, CTL_NET. +// +// Second level is protocol family. +// Third level is protocol number. +// +// Further levels are defined by the individual families. + +// PF_ROUTE - Routing table +// +// Three additional levels are defined: +// Fourth: address family, 0 is wildcard +// Fifth: type of info, defined below +// Sixth: flag(s) to mask with for NET_RT_FLAGS + +// Maximum queue length specifiable by listen. + +// Message header for recvmsg and sendmsg calls. +// Used value-result for recvmsg, value only for sendmsg. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 +} /* socket.h:433:1 */ + +// 0x00000200 unused +// 0x00000400 unused +// 0x00000800 unused +// 0x00001000 unused + +// Header for ancillary data objects in msg_control buffer. +// Used for additional information with/about a datagram +// not expressible by flags. The format is a sequence +// of message elements headed by cmsghdr structures. +type Cmsghdr = struct { + Fcmsg_len Socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:482:1 */ + +// While we may have more groups than this, the cmsgcred struct must +// be able to fit in an mbuf and we have historically supported a +// maximum of 16 groups. + +// Credentials structure, used to verify the identity of a peer +// process that has sent us a message. This is allocated by the +// peer process but filled in by the kernel. This prevents the +// peer from lying about its identity. (Note that cmcred_groups[0] +// is the effective GID.) +type Cmsgcred = struct { + Fcmcred_pid Pid_t + Fcmcred_uid Uid_t + Fcmcred_euid Uid_t + Fcmcred_gid Gid_t + Fcmcred_ngroups int16 + F__ccgo_pad1 [2]byte + Fcmcred_groups [16]Gid_t +} /* socket.h:504:1 */ + +// Socket credentials (LOCAL_CREDS). +type Sockcred = struct { + Fsc_uid Uid_t + Fsc_euid Uid_t + Fsc_gid Gid_t + Fsc_egid Gid_t + Fsc_ngroups int32 + Fsc_groups [1]Gid_t +} /* socket.h:516:1 */ + +// Compute size of a sockcred structure with groups. + +// Socket credentials (LOCAL_CREDS_PERSISTENT). +type Sockcred2 = struct { + Fsc_version int32 + Fsc_pid Pid_t + Fsc_uid Uid_t + Fsc_euid Uid_t + Fsc_gid Gid_t + Fsc_egid Gid_t + Fsc_ngroups int32 + Fsc_groups [1]Gid_t +} /* socket.h:534:1 */ + +// given pointer to struct cmsghdr, return pointer to data + +// given pointer to struct cmsghdr, return pointer to next cmsghdr + +// RFC 2292 requires to check msg_controllen, in case that the kernel returns +// an empty list for some reasons. + +// RFC 2292 additions + +// "Socket"-level control message types: + +type Sock_timestamp_info = struct { + Fst_info_flags X__uint32_t + Fst_info_pad0 X__uint32_t + Fst_info_rsv [7]X__uint64_t +} /* socket.h:593:1 */ + +// 4.3 compat sockaddr, move to compat file later +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]uint8 +} /* socket.h:608:1 */ + +// 4.3-compat message header (move to compat file later). +type Omsghdr = struct { + Fmsg_name uintptr + Fmsg_namelen int32 + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_accrights uintptr + Fmsg_accrightslen int32 +} /* socket.h:616:1 */ + +// howto arguments for shutdown(2), specified by Posix.1g. + +// for SCTP +// we cheat and use the SHUT_XX defines for these + +// sendfile(2) header/trailer struct +type Sf_hdtr = struct { + Fheaders uintptr + Fhdr_cnt int32 + Ftrailers uintptr + Ftrl_cnt int32 +} /* socket.h:645:1 */ + +// Sendfile-specific flag(s) + +// Sendmmsg/recvmmsg specific structure(s) +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 + } + Fmsg_len Ssize_t +} /* socket.h:669:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_freebsd_arm64.go b/vendor/modernc.org/libc/sys/socket/socket_freebsd_arm64.go new file mode 100644 index 00000000..6dccfc7b --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/socket_freebsd_arm64.go @@ -0,0 +1,1163 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_freebsd_amd64.go -pkgname socket', DO NOT EDIT. + +package socket + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_APPLETALK = 16 // socket.h:240:1: + AF_ARP = 35 // socket.h:264:1: + AF_ATM = 30 // socket.h:257:1: + AF_BLUETOOTH = 36 // socket.h:265:1: + AF_CCITT = 10 // socket.h:234:1: + AF_CHAOS = 5 // socket.h:228:1: + AF_CNT = 21 // socket.h:245:1: + AF_COIP = 20 // socket.h:244:1: + AF_DATAKIT = 9 // socket.h:233:1: + AF_DECnet = 12 // socket.h:236:1: + AF_DLI = 13 // socket.h:237:1: + AF_E164 = 26 // socket.h:251:1: + AF_ECMA = 8 // socket.h:232:1: + AF_HYLINK = 15 // socket.h:239:1: + AF_HYPERV = 43 // socket.h:269:1: + AF_IEEE80211 = 37 // socket.h:266:1: + AF_IMPLINK = 3 // socket.h:226:1: + AF_INET = 2 // socket.h:224:1: + AF_INET6 = 28 // socket.h:254:1: + AF_INET6_SDP = 42 // socket.h:268:1: + AF_INET_SDP = 40 // socket.h:267:1: + AF_IPX = 23 // socket.h:247:1: + AF_ISDN = 26 // socket.h:250:1: + AF_ISO = 7 // socket.h:230:1: + AF_LAT = 14 // socket.h:238:1: + AF_LINK = 18 // socket.h:242:1: + AF_LOCAL = 1 // socket.h:221:1: + AF_MAX = 43 // socket.h:270:1: + AF_NATM = 29 // socket.h:256:1: + AF_NETBIOS = 6 // socket.h:229:1: + AF_NETGRAPH = 32 // socket.h:261:1: + AF_OSI = 7 // socket.h:231:1: + AF_PUP = 4 // socket.h:227:1: + AF_ROUTE = 17 // socket.h:241:1: + AF_SCLUSTER = 34 // socket.h:263:1: + AF_SIP = 24 // socket.h:248:1: + AF_SLOW = 33 // socket.h:262:1: + AF_SNA = 11 // socket.h:235:1: + AF_UNIX = 1 // socket.h:223:1: + AF_UNSPEC = 0 // socket.h:219:1: + AF_VENDOR00 = 39 // socket.h:276:1: + AF_VENDOR01 = 41 // socket.h:277:1: + AF_VENDOR03 = 45 // socket.h:278:1: + AF_VENDOR04 = 47 // socket.h:279:1: + AF_VENDOR05 = 49 // socket.h:280:1: + AF_VENDOR06 = 51 // socket.h:281:1: + AF_VENDOR07 = 53 // socket.h:282:1: + AF_VENDOR08 = 55 // socket.h:283:1: + AF_VENDOR09 = 57 // socket.h:284:1: + AF_VENDOR10 = 59 // socket.h:285:1: + AF_VENDOR11 = 61 // socket.h:286:1: + AF_VENDOR12 = 63 // socket.h:287:1: + AF_VENDOR13 = 65 // socket.h:288:1: + AF_VENDOR14 = 67 // socket.h:289:1: + AF_VENDOR15 = 69 // socket.h:290:1: + AF_VENDOR16 = 71 // socket.h:291:1: + AF_VENDOR17 = 73 // socket.h:292:1: + AF_VENDOR18 = 75 // socket.h:293:1: + AF_VENDOR19 = 77 // socket.h:294:1: + AF_VENDOR20 = 79 // socket.h:295:1: + AF_VENDOR21 = 81 // socket.h:296:1: + AF_VENDOR22 = 83 // socket.h:297:1: + AF_VENDOR23 = 85 // socket.h:298:1: + AF_VENDOR24 = 87 // socket.h:299:1: + AF_VENDOR25 = 89 // socket.h:300:1: + AF_VENDOR26 = 91 // socket.h:301:1: + AF_VENDOR27 = 93 // socket.h:302:1: + AF_VENDOR28 = 95 // socket.h:303:1: + AF_VENDOR29 = 97 // socket.h:304:1: + AF_VENDOR30 = 99 // socket.h:305:1: + AF_VENDOR31 = 101 // socket.h:306:1: + AF_VENDOR32 = 103 // socket.h:307:1: + AF_VENDOR33 = 105 // socket.h:308:1: + AF_VENDOR34 = 107 // socket.h:309:1: + AF_VENDOR35 = 109 // socket.h:310:1: + AF_VENDOR36 = 111 // socket.h:311:1: + AF_VENDOR37 = 113 // socket.h:312:1: + AF_VENDOR38 = 115 // socket.h:313:1: + AF_VENDOR39 = 117 // socket.h:314:1: + AF_VENDOR40 = 119 // socket.h:315:1: + AF_VENDOR41 = 121 // socket.h:316:1: + AF_VENDOR42 = 123 // socket.h:317:1: + AF_VENDOR43 = 125 // socket.h:318:1: + AF_VENDOR44 = 127 // socket.h:319:1: + AF_VENDOR45 = 129 // socket.h:320:1: + AF_VENDOR46 = 131 // socket.h:321:1: + AF_VENDOR47 = 133 // socket.h:322:1: + CMGROUP_MAX = 16 // socket.h:495:1: + MSG_CMSG_CLOEXEC = 0x00040000 // socket.h:468:1: + MSG_COMPAT = 0x00008000 // socket.h:459:1: + MSG_CTRUNC = 0x00000020 // socket.h:448:1: + MSG_DONTROUTE = 0x00000004 // socket.h:445:1: + MSG_DONTWAIT = 0x00000080 // socket.h:451:1: + MSG_EOF = 0x00000100 // socket.h:452:1: + MSG_EOR = 0x00000008 // socket.h:446:1: + MSG_NBIO = 0x00004000 // socket.h:458:1: + MSG_NOSIGNAL = 0x00020000 // socket.h:465:1: + MSG_NOTIFICATION = 0x00002000 // socket.h:457:1: + MSG_OOB = 0x00000001 // socket.h:443:1: + MSG_PEEK = 0x00000002 // socket.h:444:1: + MSG_TRUNC = 0x00000010 // socket.h:447:1: + MSG_WAITALL = 0x00000040 // socket.h:449:1: + MSG_WAITFORONE = 0x00080000 // socket.h:469:1: + NET_RT_DUMP = 1 // socket.h:414:1: + NET_RT_FLAGS = 2 // socket.h:415:1: + NET_RT_IFLIST = 3 // socket.h:416:1: + NET_RT_IFLISTL = 5 // socket.h:418:1: + NET_RT_IFMALIST = 4 // socket.h:417:1: + NET_RT_NHGRP = 7 // socket.h:421:1: + NET_RT_NHOP = 6 // socket.h:420:1: + PF_APPLETALK = 16 // socket.h:371:1: + PF_ARP = 35 // socket.h:389:1: + PF_ATM = 30 // socket.h:385:1: + PF_BLUETOOTH = 36 // socket.h:390:1: + PF_CCITT = 10 // socket.h:365:1: + PF_CHAOS = 5 // socket.h:359:1: + PF_CNT = 21 // socket.h:376:1: + PF_COIP = 20 // socket.h:375:1: + PF_DATAKIT = 9 // socket.h:364:1: + PF_DECnet = 12 // socket.h:367:1: + PF_DLI = 13 // socket.h:368:1: + PF_ECMA = 8 // socket.h:363:1: + PF_HYLINK = 15 // socket.h:370:1: + PF_IEEE80211 = 37 // socket.h:391:1: + PF_IMPLINK = 3 // socket.h:357:1: + PF_INET = 2 // socket.h:356:1: + PF_INET6 = 28 // socket.h:383:1: + PF_INET6_SDP = 42 // socket.h:393:1: + PF_INET_SDP = 40 // socket.h:392:1: + PF_IPX = 23 // socket.h:378:1: + PF_ISDN = 26 // socket.h:381:1: + PF_ISO = 7 // socket.h:361:1: + PF_KEY = 27 // socket.h:382:1: + PF_LAT = 14 // socket.h:369:1: + PF_LINK = 18 // socket.h:373:1: + PF_LOCAL = 1 // socket.h:354:1: + PF_MAX = 43 // socket.h:395:1: + PF_NATM = 29 // socket.h:384:1: + PF_NETBIOS = 6 // socket.h:360:1: + PF_NETGRAPH = 32 // socket.h:386:1: + PF_OSI = 7 // socket.h:362:1: + PF_PIP = 25 // socket.h:380:1: + PF_PUP = 4 // socket.h:358:1: + PF_ROUTE = 17 // socket.h:372:1: + PF_RTIP = 22 // socket.h:379:1: + PF_SCLUSTER = 34 // socket.h:388:1: + PF_SIP = 24 // socket.h:377:1: + PF_SLOW = 33 // socket.h:387:1: + PF_SNA = 11 // socket.h:366:1: + PF_UNIX = 1 // socket.h:355:1: + PF_UNSPEC = 0 // socket.h:353:1: + PF_XTP = 19 // socket.h:374:1: + PRU_FLUSH_RD = 0 // socket.h:636:1: + PRU_FLUSH_RDWR = 2 // socket.h:638:1: + PRU_FLUSH_WR = 1 // socket.h:637:1: + SCM_BINTIME = 0x04 // socket.h:587:1: + SCM_CREDS = 0x03 // socket.h:586:1: + SCM_CREDS2 = 0x08 // socket.h:591:1: + SCM_MONOTONIC = 0x06 // socket.h:589:1: + SCM_REALTIME = 0x05 // socket.h:588:1: + SCM_RIGHTS = 0x01 // socket.h:583:1: + SCM_TIMESTAMP = 0x02 // socket.h:585:1: + SCM_TIME_INFO = 0x07 // socket.h:590:1: + SF_MNOWAIT = 0x00000002 // socket.h:656:1: + SF_NOCACHE = 0x00000010 // socket.h:659:1: + SF_NODISKIO = 0x00000001 // socket.h:655:1: + SF_SYNC = 0x00000004 // socket.h:657:1: + SF_USER_READAHEAD = 0x00000008 // socket.h:658:1: + SHUT_RD = 0 // socket.h:629:1: + SHUT_RDWR = 2 // socket.h:631:1: + SHUT_WR = 1 // socket.h:630:1: + SOCK_CLOEXEC = 0x10000000 // socket.h:114:1: + SOCK_DGRAM = 2 // socket.h:103:1: + SOCK_MAXADDRLEN = 255 // socket.h:335:1: + SOCK_NONBLOCK = 0x20000000 // socket.h:115:1: + SOCK_RAW = 3 // socket.h:104:1: + SOCK_RDM = 4 // socket.h:106:1: + SOCK_SEQPACKET = 5 // socket.h:108:1: + SOCK_STREAM = 1 // socket.h:102:1: + SOL_SOCKET = 0xffff // socket.h:214:1: + SOMAXCONN = 128 // socket.h:427:1: + SO_ACCEPTCONN = 0x00000002 // socket.h:130:1: + SO_ACCEPTFILTER = 0x00001000 // socket.h:144:1: + SO_BINTIME = 0x00002000 // socket.h:145:1: + SO_BROADCAST = 0x00000020 // socket.h:134:1: + SO_DEBUG = 0x00000001 // socket.h:129:1: + SO_DOMAIN = 0x1019 // socket.h:175:1: + SO_DONTROUTE = 0x00000010 // socket.h:133:1: + SO_ERROR = 0x1007 // socket.h:161:1: + SO_KEEPALIVE = 0x00000008 // socket.h:132:1: + SO_LABEL = 0x1009 // socket.h:164:1: + SO_LINGER = 0x00000080 // socket.h:138:1: + SO_LISTENINCQLEN = 0x1013 // socket.h:168:1: + SO_LISTENQLEN = 0x1012 // socket.h:167:1: + SO_LISTENQLIMIT = 0x1011 // socket.h:166:1: + SO_MAX_PACING_RATE = 0x1018 // socket.h:174:1: + SO_NOSIGPIPE = 0x00000800 // socket.h:143:1: + SO_NO_DDP = 0x00008000 // socket.h:148:1: + SO_NO_OFFLOAD = 0x00004000 // socket.h:147:1: + SO_OOBINLINE = 0x00000100 // socket.h:139:1: + SO_PEERLABEL = 0x1010 // socket.h:165:1: + SO_PROTOCOL = 0x1016 // socket.h:171:1: + SO_PROTOTYPE = 4118 // socket.h:172:1: + SO_RCVBUF = 0x1002 // socket.h:156:1: + SO_RCVLOWAT = 0x1004 // socket.h:158:1: + SO_RCVTIMEO = 0x1006 // socket.h:160:1: + SO_RERROR = 0x00020000 // socket.h:150:1: + SO_REUSEADDR = 0x00000004 // socket.h:131:1: + SO_REUSEPORT = 0x00000200 // socket.h:141:1: + SO_REUSEPORT_LB = 0x00010000 // socket.h:149:1: + SO_SETFIB = 0x1014 // socket.h:169:1: + SO_SNDBUF = 0x1001 // socket.h:155:1: + SO_SNDLOWAT = 0x1003 // socket.h:157:1: + SO_SNDTIMEO = 0x1005 // socket.h:159:1: + SO_TIMESTAMP = 0x00000400 // socket.h:142:1: + SO_TS_BINTIME = 1 // socket.h:180:1: + SO_TS_CLOCK = 0x1017 // socket.h:173:1: + SO_TS_CLOCK_MAX = 3 // socket.h:184:1: + SO_TS_DEFAULT = 0 // socket.h:183:1: + SO_TS_MONOTONIC = 3 // socket.h:182:1: + SO_TS_REALTIME = 2 // socket.h:181:1: + SO_TS_REALTIME_MICRO = 0 // socket.h:179:1: + SO_TYPE = 0x1008 // socket.h:162:1: + SO_USELOOPBACK = 0x00000040 // socket.h:136:1: + SO_USER_COOKIE = 0x1015 // socket.h:170:1: + SO_VENDOR = 0x80000000 // socket.h:193:1: + ST_INFO_HW = 0x0001 // socket.h:599:1: + ST_INFO_HW_HPREC = 0x0002 // socket.h:600:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GID_T_DECLARED = 0 // socket.h:53:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF_T_DECLARED = 0 // socket.h:58:1: + X_PID_T_DECLARED = 0 // socket.h:63:1: + X_SA_FAMILY_T_DECLARED = 0 // socket.h:69:1: + X_SIZE_T_DECLARED = 0 // _iovec.h:42:1: + X_SOCKLEN_T_DECLARED = 0 // socket.h:74:1: + X_SSIZE_T_DECLARED = 0 // socket.h:79:1: + X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SOCKET_H_ = 0 // socket.h:36:1: + X_SYS__IOVEC_H_ = 0 // _iovec.h:36:1: + X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_UID_T_DECLARED = 0 // socket.h:85:1: + X_UINT32_T_DECLARED = 0 // socket.h:91:1: + X_UINTPTR_T_DECLARED = 0 // socket.h:96:1: + X_X86_INCLUDE__ALIGN_H_ = 0 // _align.h:44:1: + Pseudo_AF_HDRCMPLT = 31 // socket.h:258:1: + Pseudo_AF_KEY = 27 // socket.h:252:1: + Pseudo_AF_PIP = 25 // socket.h:249:1: + Pseudo_AF_RTIP = 22 // socket.h:246:1: + Pseudo_AF_XTP = 19 // socket.h:243:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ + +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* _iovec.h:45:1 */ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2001 David E. O'Brien +// Copyright (c) 1990 The Regents of the University of California. +// All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// William Jolitz. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// from: @(#)param.h 5.8 (Berkeley) 6/28/91 +// $FreeBSD$ + +// Round p (pointer or byte index) up to a correctly-aligned value +// for all data types (int, long, ...). The result is unsigned int +// and must be cast to any desired pointer type. + +// Definitions related to sockets: types, address families, options. + +// Data types. +type Gid_t = X__gid_t /* socket.h:52:18 */ + +type Off_t = X__off_t /* socket.h:57:18 */ + +type Pid_t = X__pid_t /* socket.h:62:18 */ + +type Sa_family_t = X__sa_family_t /* socket.h:68:23 */ + +type Socklen_t = X__socklen_t /* socket.h:73:21 */ + +type Ssize_t = X__ssize_t /* socket.h:78:19 */ + +type Uid_t = X__uid_t /* socket.h:84:18 */ + +type Uint32_t = X__uint32_t /* socket.h:90:20 */ + +type Uintptr_t = X__uintptr_t /* socket.h:95:21 */ + +// Types + +// Creation flags, OR'ed into socket() and socketpair() type argument. + +// Option flags per-socket. + +// Additional options, not kept in so_options. + +// Space reserved for new socket options added by third-party vendors. +// This range applies to all socket option levels. New socket options +// in FreeBSD should always use an option value less than SO_VENDOR. + +// Structure used for manipulating linger option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:199:1 */ + +type Accept_filter_arg = struct { + Faf_name [16]int8 + Faf_arg [240]int8 +} /* socket.h:205:1 */ + +// Level number for (get/set)sockopt() to apply to socket itself. + +// Address families. +// When allocating a new AF_ constant, please only allocate +// even numbered constants for FreeBSD until 134 as odd numbered AF_ +// constants 39-133 are now reserved for vendors. + +// Structure used by kernel to store most +// addresses. +type Sockaddr = struct { + Fsa_len uint8 + Fsa_family Sa_family_t + Fsa_data [14]int8 +} /* socket.h:329:1 */ + +// Structure used by kernel to pass protocol +// information in raw sockets. +type Sockproto = struct { + Fsp_family uint16 + Fsp_protocol uint16 +} /* socket.h:341:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 +// $FreeBSD$ + +// RFC 2553: protocol-independent placeholder for socket addresses + +type Sockaddr_storage = struct { + Fss_len uint8 + Fss_family Sa_family_t + F__ss_pad1 [6]int8 + F__ss_align X__int64_t + F__ss_pad2 [112]int8 +} /* _sockaddr_storage.h:48:1 */ + +// Protocol families, same as address families for now. + +// Definitions for network related sysctl, CTL_NET. +// +// Second level is protocol family. +// Third level is protocol number. +// +// Further levels are defined by the individual families. + +// PF_ROUTE - Routing table +// +// Three additional levels are defined: +// Fourth: address family, 0 is wildcard +// Fifth: type of info, defined below +// Sixth: flag(s) to mask with for NET_RT_FLAGS + +// Maximum queue length specifiable by listen. + +// Message header for recvmsg and sendmsg calls. +// Used value-result for recvmsg, value only for sendmsg. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__ccgo_pad2 [4]byte + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 +} /* socket.h:433:1 */ + +// 0x00000200 unused +// 0x00000400 unused +// 0x00000800 unused +// 0x00001000 unused + +// Header for ancillary data objects in msg_control buffer. +// Used for additional information with/about a datagram +// not expressible by flags. The format is a sequence +// of message elements headed by cmsghdr structures. +type Cmsghdr = struct { + Fcmsg_len Socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:482:1 */ + +// While we may have more groups than this, the cmsgcred struct must +// be able to fit in an mbuf and we have historically supported a +// maximum of 16 groups. + +// Credentials structure, used to verify the identity of a peer +// process that has sent us a message. This is allocated by the +// peer process but filled in by the kernel. This prevents the +// peer from lying about its identity. (Note that cmcred_groups[0] +// is the effective GID.) +type Cmsgcred = struct { + Fcmcred_pid Pid_t + Fcmcred_uid Uid_t + Fcmcred_euid Uid_t + Fcmcred_gid Gid_t + Fcmcred_ngroups int16 + F__ccgo_pad1 [2]byte + Fcmcred_groups [16]Gid_t +} /* socket.h:504:1 */ + +// Socket credentials (LOCAL_CREDS). +type Sockcred = struct { + Fsc_uid Uid_t + Fsc_euid Uid_t + Fsc_gid Gid_t + Fsc_egid Gid_t + Fsc_ngroups int32 + Fsc_groups [1]Gid_t +} /* socket.h:516:1 */ + +// Compute size of a sockcred structure with groups. + +// Socket credentials (LOCAL_CREDS_PERSISTENT). +type Sockcred2 = struct { + Fsc_version int32 + Fsc_pid Pid_t + Fsc_uid Uid_t + Fsc_euid Uid_t + Fsc_gid Gid_t + Fsc_egid Gid_t + Fsc_ngroups int32 + Fsc_groups [1]Gid_t +} /* socket.h:534:1 */ + +// given pointer to struct cmsghdr, return pointer to data + +// given pointer to struct cmsghdr, return pointer to next cmsghdr + +// RFC 2292 requires to check msg_controllen, in case that the kernel returns +// an empty list for some reasons. + +// RFC 2292 additions + +// "Socket"-level control message types: + +type Sock_timestamp_info = struct { + Fst_info_flags X__uint32_t + Fst_info_pad0 X__uint32_t + Fst_info_rsv [7]X__uint64_t +} /* socket.h:593:1 */ + +// 4.3 compat sockaddr, move to compat file later +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]int8 +} /* socket.h:608:1 */ + +// 4.3-compat message header (move to compat file later). +type Omsghdr = struct { + Fmsg_name uintptr + Fmsg_namelen int32 + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__ccgo_pad2 [4]byte + Fmsg_accrights uintptr + Fmsg_accrightslen int32 + F__ccgo_pad3 [4]byte +} /* socket.h:616:1 */ + +// howto arguments for shutdown(2), specified by Posix.1g. + +// for SCTP +// we cheat and use the SHUT_XX defines for these + +// sendfile(2) header/trailer struct +type Sf_hdtr = struct { + Fheaders uintptr + Fhdr_cnt int32 + F__ccgo_pad1 [4]byte + Ftrailers uintptr + Ftrl_cnt int32 + F__ccgo_pad2 [4]byte +} /* socket.h:645:1 */ + +// Sendfile-specific flag(s) + +// Sendmmsg/recvmmsg specific structure(s) +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen int32 + F__ccgo_pad2 [4]byte + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 + } + Fmsg_len Ssize_t +} /* socket.h:669:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_386.go b/vendor/modernc.org/libc/sys/socket/socket_linux_386.go index 999c4683..28b80207 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_linux_386.go +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_386.go @@ -298,7 +298,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -346,7 +347,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -798,7 +800,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -809,13 +812,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1179,7 +1184,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1226,7 +1232,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1540,18 +1547,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1575,7 +1585,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1587,7 +1598,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 @@ -1658,7 +1670,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -1795,7 +1808,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_linux_amd64.go index aab68539..c5ca270f 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_linux_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_amd64.go @@ -305,7 +305,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -353,7 +354,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -824,7 +826,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -835,8 +838,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1206,7 +1210,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1253,7 +1258,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1565,18 +1571,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1600,7 +1609,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1612,7 +1622,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 @@ -1683,7 +1694,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -1824,7 +1836,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_arm.go b/vendor/modernc.org/libc/sys/socket/socket_linux_arm.go index 97233cfc..70c9c772 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_linux_arm.go +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_arm.go @@ -294,7 +294,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -342,7 +343,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -824,7 +826,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -835,13 +838,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1206,7 +1211,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1253,7 +1259,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1618,18 +1625,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1653,7 +1663,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1665,7 +1676,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 @@ -1736,7 +1748,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -1880,7 +1893,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_arm64.go b/vendor/modernc.org/libc/sys/socket/socket_linux_arm64.go index b9f96dbf..bdf8280c 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_linux_arm64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_arm64.go @@ -304,7 +304,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -352,7 +353,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -856,7 +858,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -867,8 +870,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1237,7 +1241,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1284,7 +1289,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1629,18 +1635,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -1667,7 +1676,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1679,7 +1689,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1750,7 +1761,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -1899,7 +1911,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_ppc64le.go b/vendor/modernc.org/libc/sys/socket/socket_linux_ppc64le.go index 0f13cd41..004c8514 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_linux_ppc64le.go +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_ppc64le.go @@ -319,7 +319,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -367,7 +368,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -837,7 +839,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -848,8 +851,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1218,7 +1222,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1265,7 +1270,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1577,18 +1583,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1612,7 +1621,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1624,7 +1634,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1695,7 +1706,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -1842,7 +1854,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go b/vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go index c685bf6d..17dd7556 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_riscv64.go @@ -308,7 +308,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -356,7 +357,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -862,7 +864,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -873,8 +876,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1243,7 +1247,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1290,7 +1295,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1608,9 +1614,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -1644,18 +1651,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1679,7 +1689,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1691,7 +1702,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1762,7 +1774,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -1898,7 +1911,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_s390x.go b/vendor/modernc.org/libc/sys/socket/socket_linux_s390x.go index 42056c4d..2cd5397f 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_linux_s390x.go +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_s390x.go @@ -304,7 +304,8 @@ const ( /* socket.h:200:1: */ ) // Socket level message types. This must match the definitions in -// <linux/socket.h>. +// +// <linux/socket.h>. const ( /* socket.h:332:1: */ SCM_RIGHTS = 1 ) @@ -352,7 +353,8 @@ const ( /* socket_type.h:24:1: */ ) // The following constants should be used for the second parameter of -// `shutdown'. +// +// `shutdown'. const ( /* socket.h:41:1: */ SHUT_RD = 0 // No more receptions. SHUT_WR = 1 // No more transmissions. @@ -824,7 +826,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -835,8 +838,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1205,7 +1209,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1252,7 +1257,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1563,18 +1569,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1598,7 +1607,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1610,7 +1620,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1681,7 +1692,8 @@ type Sockaddr_storage = struct { } /* socket.h:191:1 */ // Structure describing messages sent by -// `sendmsg' and received by `recvmsg'. +// +// `sendmsg' and received by `recvmsg'. type Msghdr = struct { Fmsg_name uintptr Fmsg_namelen Socklen_t @@ -1822,7 +1834,8 @@ type Linger = struct { } /* socket.h:361:1 */ // This is the 4.3 BSD `struct sockaddr' format, which is used as wire -// format in the grotty old 4.3 `talk' protocol. +// +// format in the grotty old 4.3 `talk' protocol. type Osockaddr = struct { Fsa_family uint16 Fsa_data [14]uint8 diff --git a/vendor/modernc.org/libc/sys/socket/socket_netbsd_arm.go b/vendor/modernc.org/libc/sys/socket/socket_netbsd_arm.go new file mode 100644 index 00000000..6143183b --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/socket_netbsd_arm.go @@ -0,0 +1,850 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_netbsd_arm.go -pkgname socket', DO NOT EDIT. + +package socket + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_APPLETALK = 16 // socket.h:218:1: + AF_ARP = 28 // socket.h:237:1: + AF_BLUETOOTH = 31 // socket.h:243:1: + AF_CAN = 35 // socket.h:247:1: + AF_CCITT = 10 // socket.h:212:1: + AF_CHAOS = 5 // socket.h:206:1: + AF_CNT = 21 // socket.h:225:1: + AF_COIP = 20 // socket.h:224:1: + AF_DATAKIT = 9 // socket.h:211:1: + AF_DECnet = 12 // socket.h:214:1: + AF_DLI = 13 // socket.h:215:1: + AF_E164 = 26 // socket.h:235:1: + AF_ECMA = 8 // socket.h:210:1: + AF_ETHER = 36 // socket.h:248:1: + AF_HYLINK = 15 // socket.h:217:1: + AF_IEEE80211 = 32 // socket.h:244:1: + AF_IMPLINK = 3 // socket.h:204:1: + AF_INET = 2 // socket.h:203:1: + AF_INET6 = 24 // socket.h:230:1: + AF_IPX = 23 // socket.h:229:1: + AF_ISDN = 26 // socket.h:234:1: + AF_ISO = 7 // socket.h:208:1: + AF_LAT = 14 // socket.h:216:1: + AF_LINK = 18 // socket.h:220:1: + AF_LOCAL = 1 // socket.h:201:1: + AF_MAX = 37 // socket.h:249:1: + AF_MPLS = 33 // socket.h:245:1: + AF_NATM = 27 // socket.h:236:1: + AF_NS = 6 // socket.h:207:1: + AF_OROUTE = 17 // socket.h:219:1: + AF_OSI = 7 // socket.h:209:1: + AF_PUP = 4 // socket.h:205:1: + AF_ROUTE = 34 // socket.h:246:1: + AF_SNA = 11 // socket.h:213:1: + AF_UNIX = 1 // socket.h:202:1: + AF_UNSPEC = 0 // socket.h:200:1: + MSG_BCAST = 0x0100 // socket.h:497:1: + MSG_CMSG_CLOEXEC = 0x0800 // socket.h:501:1: + MSG_CONTROLMBUF = 0x2000000 // socket.h:515:1: + MSG_CTRUNC = 0x0020 // socket.h:494:1: + MSG_DONTROUTE = 0x0004 // socket.h:491:1: + MSG_DONTWAIT = 0x0080 // socket.h:496:1: + MSG_EOR = 0x0008 // socket.h:492:1: + MSG_IOVUSRSPACE = 0x4000000 // socket.h:516:1: + MSG_LENUSRSPACE = 0x8000000 // socket.h:517:1: + MSG_MCAST = 0x0200 // socket.h:498:1: + MSG_NAMEMBUF = 0x1000000 // socket.h:514:1: + MSG_NBIO = 0x1000 // socket.h:502:1: + MSG_NOSIGNAL = 0x0400 // socket.h:499:1: + MSG_NOTIFICATION = 0x4000 // socket.h:504:1: + MSG_OOB = 0x0001 // socket.h:489:1: + MSG_PEEK = 0x0002 // socket.h:490:1: + MSG_TRUNC = 0x0010 // socket.h:493:1: + MSG_USERFLAGS = 0x0ffffff // socket.h:513:1: + MSG_WAITALL = 0x0040 // socket.h:495:1: + MSG_WAITFORONE = 0x2000 // socket.h:503:1: + NET_RT_DUMP = 1 // socket.h:457:1: + NET_RT_FLAGS = 2 // socket.h:458:1: + NET_RT_IFLIST = 6 // socket.h:462:1: + NET_RT_OIFLIST = 5 // socket.h:461:1: + NET_RT_OOIFLIST = 4 // socket.h:460:1: + NET_RT_OOOIFLIST = 3 // socket.h:459:1: + PCB_ALL = 0 // socket.h:444:1: + PCB_SLOP = 20 // socket.h:443:1: + PF_APPLETALK = 16 // socket.h:334:1: + PF_ARP = 28 // socket.h:351:1: + PF_BLUETOOTH = 31 // socket.h:355:1: + PF_CAN = 35 // socket.h:358:1: + PF_CCITT = 10 // socket.h:328:1: + PF_CHAOS = 5 // socket.h:322:1: + PF_CNT = 21 // socket.h:341:1: + PF_COIP = 20 // socket.h:340:1: + PF_DATAKIT = 9 // socket.h:327:1: + PF_DECnet = 12 // socket.h:330:1: + PF_DLI = 13 // socket.h:331:1: + PF_E164 = 26 // socket.h:349:1: + PF_ECMA = 8 // socket.h:326:1: + PF_ETHER = 36 // socket.h:359:1: + PF_HYLINK = 15 // socket.h:333:1: + PF_IMPLINK = 3 // socket.h:320:1: + PF_INET = 2 // socket.h:319:1: + PF_INET6 = 24 // socket.h:342:1: + PF_IPX = 23 // socket.h:343:1: + PF_ISDN = 26 // socket.h:348:1: + PF_ISO = 7 // socket.h:324:1: + PF_KEY = 29 // socket.h:353:1: + PF_LAT = 14 // socket.h:332:1: + PF_LINK = 18 // socket.h:336:1: + PF_LOCAL = 1 // socket.h:317:1: + PF_MAX = 37 // socket.h:361:1: + PF_MPLS = 33 // socket.h:356:1: + PF_NATM = 27 // socket.h:350:1: + PF_NS = 6 // socket.h:323:1: + PF_OROUTE = 17 // socket.h:335:1: + PF_OSI = 7 // socket.h:325:1: + PF_PIP = 25 // socket.h:346:1: + PF_PUP = 4 // socket.h:321:1: + PF_ROUTE = 34 // socket.h:357:1: + PF_RTIP = 22 // socket.h:345:1: + PF_SNA = 11 // socket.h:329:1: + PF_UNIX = 1 // socket.h:318:1: + PF_UNSPEC = 0 // socket.h:316:1: + PF_XTP = 19 // socket.h:338:1: + SCM_CREDS = 0x10 // socket.h:581:1: + SCM_RIGHTS = 0x01 // socket.h:576:1: + SCM_TIMESTAMP = 0x08 // socket.h:580:1: + SHUT_RD = 0 // socket.h:587:1: + SHUT_RDWR = 2 // socket.h:589:1: + SHUT_WR = 1 // socket.h:588:1: + SOCK_CLOEXEC = 0x10000000 // socket.h:113:1: + SOCK_CONN_DGRAM = 6 // socket.h:110:1: + SOCK_DCCP = 6 // socket.h:111:1: + SOCK_DGRAM = 2 // socket.h:106:1: + SOCK_FLAGS_MASK = 0xf0000000 // socket.h:116:1: + SOCK_NONBLOCK = 0x20000000 // socket.h:114:1: + SOCK_NOSIGPIPE = 0x40000000 // socket.h:115:1: + SOCK_RAW = 3 // socket.h:107:1: + SOCK_RDM = 4 // socket.h:108:1: + SOCK_SEQPACKET = 5 // socket.h:109:1: + SOCK_STREAM = 1 // socket.h:105:1: + SOL_SOCKET = 0xffff // socket.h:195:1: + SOMAXCONN = 128 // socket.h:470:1: + SO_ACCEPTCONN = 0x0002 // socket.h:122:1: + SO_ACCEPTFILTER = 0x1000 // socket.h:133:1: + SO_BROADCAST = 0x0020 // socket.h:126:1: + SO_DEBUG = 0x0001 // socket.h:121:1: + SO_DEFOPTS = 27645 // socket.h:138:1: + SO_DONTROUTE = 0x0010 // socket.h:125:1: + SO_ERROR = 0x1007 // socket.h:169:1: + SO_KEEPALIVE = 0x0008 // socket.h:124:1: + SO_LINGER = 0x0080 // socket.h:128:1: + SO_NOHEADER = 0x100a // socket.h:173:1: + SO_NOSIGPIPE = 0x0800 // socket.h:132:1: + SO_OOBINLINE = 0x0100 // socket.h:129:1: + SO_OVERFLOWED = 0x1009 // socket.h:171:1: + SO_RCVBUF = 0x1002 // socket.h:164:1: + SO_RCVLOWAT = 0x1004 // socket.h:166:1: + SO_RCVTIMEO = 0x100c // socket.h:178:1: + SO_RERROR = 0x4000 // socket.h:135:1: + SO_REUSEADDR = 0x0004 // socket.h:123:1: + SO_REUSEPORT = 0x0200 // socket.h:130:1: + SO_SNDBUF = 0x1001 // socket.h:163:1: + SO_SNDLOWAT = 0x1003 // socket.h:165:1: + SO_SNDTIMEO = 0x100b // socket.h:177:1: + SO_TIMESTAMP = 0x2000 // socket.h:134:1: + SO_TYPE = 0x1008 // socket.h:170:1: + SO_USELOOPBACK = 0x0040 // socket.h:127:1: + UIO_MAXIOV = 1024 // uio.h:97:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_SS_MAXSIZE = 128 // socket.h:294:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: + X_SYS_SOCKET_H_ = 0 // socket.h:64:1: + X_SYS_UIO_H_ = 0 // uio.h:35:1: + Pseudo_AF_HDRCMPLT = 30 // socket.h:240:1: + Pseudo_AF_KEY = 29 // socket.h:239:1: + Pseudo_AF_PIP = 25 // socket.h:232:1: + Pseudo_AF_RTIP = 22 // socket.h:227:1: + Pseudo_AF_XTP = 19 // socket.h:222:1: +) + +// file offset + +const ( /* uio.h:69:1: */ + UIO_READ = 0 + UIO_WRITE = 1 +) + +// Segment flag values. +const ( /* uio.h:72:1: */ + UIO_USERSPACE = 0 // from user data space + UIO_SYSSPACE = 1 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Sa_family_t = X__sa_family_t /* socket.h:78:23 */ + +type Socklen_t = X__socklen_t /* socket.h:83:21 */ + +type Ssize_t = int32 /* socket.h:95:23 */ + +// $NetBSD: uio.h,v 1.36 2011/07/27 13:20:07 uebayasi Exp $ + +// Copyright (c) 1982, 1986, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)uio.h 8.5 (Berkeley) 2/22/94 + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* uio.h:56:1 */ + +// $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. + +type Off_t = X__off_t /* uio.h:65:18 */ + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ + +// Socket types. + +// Option flags per-socket. +// SO_OTIMESTAMP 0x0400 + +// Allowed default option flags + +// Additional options, not kept in so_options. +// SO_OSNDTIMEO 0x1005 +// SO_ORCVTIMEO 0x1006 + +// Structure used for manipulating linger option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:182:1 */ + +type Accept_filter_arg = struct { + Faf_name [16]uint8 + Faf_arg [240]uint8 +} /* socket.h:187:1 */ + +// Level number for (get/set)sockopt() to apply to socket itself. + +// Address families. + +// Structure used by kernel to store most +// addresses. +type Sockaddr = struct { + Fsa_len X__uint8_t + Fsa_family X__sa_family_t + Fsa_data [14]uint8 +} /* socket.h:255:1 */ + +// RFC 2553: protocol-independent placeholder for socket addresses + +type Sockaddr_storage = struct { + Fss_len X__uint8_t + Fss_family X__sa_family_t + F__ss_pad1 [6]uint8 + F__ss_align X__int64_t + F__ss_pad2 [112]uint8 +} /* socket.h:301:1 */ + +// Protocol families, same as address families for now. + +type Pid_t = X__pid_t /* socket.h:366:18 */ // process id + +type Gid_t = X__gid_t /* socket.h:371:18 */ // group id + +type Uid_t = X__uid_t /* socket.h:376:18 */ // user id + +// Socket credentials. +type Sockcred = struct { + Fsc_pid X__pid_t + Fsc_uid X__uid_t + Fsc_euid X__uid_t + Fsc_gid X__gid_t + Fsc_egid X__gid_t + Fsc_ngroups int32 + Fsc_groups [1]X__gid_t +} /* socket.h:383:1 */ + +// Compute size of a sockcred structure with groups. + +// Definition for CTL_NET PCB fetching sysctls +type Kinfo_pcb = struct { + Fki_pcbaddr X__uint64_t + Fki_ppcbaddr X__uint64_t + Fki_sockaddr X__uint64_t + Fki_family X__uint32_t + Fki_type X__uint32_t + Fki_protocol X__uint32_t + Fki_pflags X__uint32_t + Fki_sostate X__uint32_t + Fki_prstate X__uint32_t + Fki_tstate X__int32_t + Fki_tflags X__uint32_t + Fki_rcvq X__uint64_t + Fki_sndq X__uint64_t + Fki_s struct { + F_kis_src struct { + Fsa_len X__uint8_t + Fsa_family X__sa_family_t + Fsa_data [14]uint8 + } + F__ccgo_pad1 [248]byte + } + Fki_d struct { + F_kid_dst struct { + Fsa_len X__uint8_t + Fsa_family X__sa_family_t + Fsa_data [14]uint8 + } + F__ccgo_pad1 [248]byte + } + Fki_inode X__uint64_t + Fki_vnode X__uint64_t + Fki_conn X__uint64_t + Fki_refs X__uint64_t + Fki_nextref X__uint64_t +} /* socket.h:404:1 */ + +// PF_ROUTE - Routing table +// +// Three additional levels are defined: +// Fourth: address family, 0 is wildcard +// Fifth: type of info, defined below +// Sixth: flag(s) to mask with for NET_RT_FLAGS + +// Maximum queue length specifiable by listen(2). + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// Message header for recvmsg and sendmsg calls. +// Used value-result for recvmsg, value only for sendmsg. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen X__socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen X__socklen_t + Fmsg_flags int32 +} /* socket.h:479:1 */ + +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen X__socklen_t + Fmsg_iov uintptr + Fmsg_iovlen int32 + Fmsg_control uintptr + Fmsg_controllen X__socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 +} /* socket.h:506:1 */ + +// Extra flags used internally only + +// Header for ancillary data objects in msg_control buffer. +// Used for additional information with/about a datagram +// not expressible by flags. The format is a sequence +// of message elements headed by cmsghdr structures. +type Cmsghdr = struct { + Fcmsg_len X__socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:525:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_openbsd_386.go b/vendor/modernc.org/libc/sys/socket/socket_openbsd_386.go new file mode 100644 index 00000000..2cc5f032 --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/socket_openbsd_386.go @@ -0,0 +1,899 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_386.go -pkgname socket', DO NOT EDIT. + +package socket + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_APPLETALK = 16 // socket.h:181:1: + AF_BLUETOOTH = 32 // socket.h:199:1: + AF_CCITT = 10 // socket.h:175:1: + AF_CHAOS = 5 // socket.h:169:1: + AF_CNT = 21 // socket.h:186:1: + AF_COIP = 20 // socket.h:185:1: + AF_DATAKIT = 9 // socket.h:174:1: + AF_DECnet = 12 // socket.h:177:1: + AF_DLI = 13 // socket.h:178:1: + AF_E164 = 26 // socket.h:192:1: + AF_ECMA = 8 // socket.h:173:1: + AF_ENCAP = 28 // socket.h:194:1: + AF_HYLINK = 15 // socket.h:180:1: + AF_IMPLINK = 3 // socket.h:167:1: + AF_INET = 2 // socket.h:166:1: + AF_INET6 = 24 // socket.h:189:1: + AF_IPX = 23 // socket.h:188:1: + AF_ISDN = 26 // socket.h:191:1: + AF_ISO = 7 // socket.h:171:1: + AF_KEY = 30 // socket.h:196:1: + AF_LAT = 14 // socket.h:179:1: + AF_LINK = 18 // socket.h:183:1: + AF_LOCAL = 1 // socket.h:165:1: + AF_MAX = 36 // socket.h:203:1: + AF_MPLS = 33 // socket.h:200:1: + AF_NATM = 27 // socket.h:193:1: + AF_NS = 6 // socket.h:170:1: + AF_OSI = 7 // socket.h:172:1: + AF_PUP = 4 // socket.h:168:1: + AF_ROUTE = 17 // socket.h:182:1: + AF_SIP = 29 // socket.h:195:1: + AF_SNA = 11 // socket.h:176:1: + AF_UNIX = 1 // socket.h:164:1: + AF_UNSPEC = 0 // socket.h:163:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + MSG_BCAST = 0x100 // socket.h:508:1: + MSG_CMSG_CLOEXEC = 0x800 // socket.h:511:1: + MSG_CTRUNC = 0x20 // socket.h:505:1: + MSG_DONTROUTE = 0x4 // socket.h:502:1: + MSG_DONTWAIT = 0x80 // socket.h:507:1: + MSG_EOR = 0x8 // socket.h:503:1: + MSG_MCAST = 0x200 // socket.h:509:1: + MSG_NOSIGNAL = 0x400 // socket.h:510:1: + MSG_OOB = 0x1 // socket.h:500:1: + MSG_PEEK = 0x2 // socket.h:501:1: + MSG_TRUNC = 0x10 // socket.h:504:1: + MSG_WAITALL = 0x40 // socket.h:506:1: + MSG_WAITFORONE = 0x1000 // socket.h:512:1: + NET_BPF_BUFSIZE = 1 // socket.h:452:1: + NET_BPF_MAXBUFSIZE = 2 // socket.h:453:1: + NET_BPF_MAXID = 3 // socket.h:454:1: + NET_KEY_MAXID = 3 // socket.h:441:1: + NET_KEY_SADB_DUMP = 1 // socket.h:439:1: + NET_KEY_SPD_DUMP = 2 // socket.h:440:1: + NET_LINK_IFRXQ = 1 // socket.h:416:1: + NET_LINK_IFRXQ_MAXID = 3 // socket.h:428:1: + NET_LINK_IFRXQ_PRESSURE_DROP = 2 // socket.h:426:1: + NET_LINK_IFRXQ_PRESSURE_RETURN = 1 // socket.h:424:1: + NET_LINK_MAXID = 2 // socket.h:417:1: + NET_MAXID = 36 // socket.h:314:1: + NET_PFLOW_MAXID = 2 // socket.h:466:1: + NET_PFLOW_STATS = 1 // socket.h:465:1: + NET_RT_DUMP = 1 // socket.h:365:1: + NET_RT_FLAGS = 2 // socket.h:366:1: + NET_RT_IFLIST = 3 // socket.h:367:1: + NET_RT_IFNAMES = 6 // socket.h:370:1: + NET_RT_MAXID = 8 // socket.h:372:1: + NET_RT_SOURCE = 7 // socket.h:371:1: + NET_RT_STATS = 4 // socket.h:368:1: + NET_RT_TABLE = 5 // socket.h:369:1: + NET_UNIX_DEFERRED = 7 // socket.h:389:1: + NET_UNIX_INFLIGHT = 6 // socket.h:388:1: + NET_UNIX_MAXID = 8 // socket.h:390:1: + NET_UNIX_PROTO_MAXID = 3 // socket.h:405:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + PF_APPLETALK = 16 // socket.h:267:1: + PF_BLUETOOTH = 32 // socket.h:283:1: + PF_BPF = 31 // socket.h:282:1: + PF_CCITT = 10 // socket.h:261:1: + PF_CHAOS = 5 // socket.h:255:1: + PF_CNT = 21 // socket.h:272:1: + PF_COIP = 20 // socket.h:271:1: + PF_DATAKIT = 9 // socket.h:260:1: + PF_DECnet = 12 // socket.h:263:1: + PF_DLI = 13 // socket.h:264:1: + PF_ECMA = 8 // socket.h:259:1: + PF_ENCAP = 28 // socket.h:279:1: + PF_HYLINK = 15 // socket.h:266:1: + PF_IMPLINK = 3 // socket.h:253:1: + PF_INET = 2 // socket.h:252:1: + PF_INET6 = 24 // socket.h:274:1: + PF_IPX = 23 // socket.h:273:1: + PF_ISDN = 26 // socket.h:277:1: + PF_ISO = 7 // socket.h:257:1: + PF_KEY = 30 // socket.h:281:1: + PF_LAT = 14 // socket.h:265:1: + PF_LINK = 18 // socket.h:269:1: + PF_LOCAL = 1 // socket.h:250:1: + PF_MAX = 36 // socket.h:287:1: + PF_MPLS = 33 // socket.h:284:1: + PF_NATM = 27 // socket.h:278:1: + PF_NS = 6 // socket.h:256:1: + PF_OSI = 7 // socket.h:258:1: + PF_PFLOW = 34 // socket.h:285:1: + PF_PIP = 25 // socket.h:276:1: + PF_PIPEX = 35 // socket.h:286:1: + PF_PUP = 4 // socket.h:254:1: + PF_ROUTE = 17 // socket.h:268:1: + PF_RTIP = 22 // socket.h:275:1: + PF_SIP = 29 // socket.h:280:1: + PF_SNA = 11 // socket.h:262:1: + PF_UNIX = 1 // socket.h:251:1: + PF_UNSPEC = 0 // socket.h:249:1: + PF_XTP = 19 // socket.h:270:1: + RT_TABLEID_BITS = 8 // socket.h:150:1: + RT_TABLEID_MASK = 0xff // socket.h:151:1: + RT_TABLEID_MAX = 255 // socket.h:149:1: + SCM_RIGHTS = 0x01 // socket.h:560:1: + SCM_TIMESTAMP = 0x04 // socket.h:561:1: + SHUT_RD = 0 // socket.h:292:1: + SHUT_RDWR = 2 // socket.h:294:1: + SHUT_WR = 1 // socket.h:293:1: + SOCK_CLOEXEC = 0x8000 // socket.h:76:1: + SOCK_DGRAM = 2 // socket.h:64:1: + SOCK_DNS = 0x1000 // socket.h:81:1: + SOCK_NONBLOCK = 0x4000 // socket.h:77:1: + SOCK_RAW = 3 // socket.h:65:1: + SOCK_RDM = 4 // socket.h:66:1: + SOCK_SEQPACKET = 5 // socket.h:67:1: + SOCK_STREAM = 1 // socket.h:63:1: + SOL_SOCKET = 0xffff // socket.h:158:1: + SOMAXCONN = 128 // socket.h:477:1: + SO_ACCEPTCONN = 0x0002 // socket.h:88:1: + SO_BINDANY = 0x1000 // socket.h:98:1: + SO_BROADCAST = 0x0020 // socket.h:92:1: + SO_DEBUG = 0x0001 // socket.h:87:1: + SO_DOMAIN = 0x1024 // socket.h:116:1: + SO_DONTROUTE = 0x0010 // socket.h:91:1: + SO_ERROR = 0x1007 // socket.h:110:1: + SO_KEEPALIVE = 0x0008 // socket.h:90:1: + SO_LINGER = 0x0080 // socket.h:94:1: + SO_NETPROC = 0x1020 // socket.h:112:1: + SO_OOBINLINE = 0x0100 // socket.h:95:1: + SO_PEERCRED = 0x1022 // socket.h:114:1: + SO_PROTOCOL = 0x1025 // socket.h:117:1: + SO_RCVBUF = 0x1002 // socket.h:105:1: + SO_RCVLOWAT = 0x1004 // socket.h:107:1: + SO_RCVTIMEO = 0x1006 // socket.h:109:1: + SO_REUSEADDR = 0x0004 // socket.h:89:1: + SO_REUSEPORT = 0x0200 // socket.h:96:1: + SO_RTABLE = 0x1021 // socket.h:113:1: + SO_SNDBUF = 0x1001 // socket.h:104:1: + SO_SNDLOWAT = 0x1003 // socket.h:106:1: + SO_SNDTIMEO = 0x1005 // socket.h:108:1: + SO_SPLICE = 0x1023 // socket.h:115:1: + SO_TIMESTAMP = 0x0800 // socket.h:97:1: + SO_TYPE = 0x1008 // socket.h:111:1: + SO_USELOOPBACK = 0x0040 // socket.h:93:1: + SO_ZEROIZE = 0x2000 // socket.h:99:1: + UIO_MAXIOV = 1024 // uio.h:84:1: + UNPCTL_RECVSPACE = 1 // socket.h:403:1: + UNPCTL_SENDSPACE = 2 // socket.h:404:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SA_FAMILY_T_DEFINED_ = 0 // socket.h:51:1: + X_SIZE_T_DEFINED_ = 0 // uio.h:42:1: + X_SOCKLEN_T_DEFINED_ = 0 // socket.h:46:1: + X_SSIZE_T_DEFINED_ = 0 // uio.h:47:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SOCKET_H_ = 0 // socket.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UIO_H_ = 0 // uio.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMEVAL_DECLARED = 0 // socket.h:130:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Pseudo_AF_HDRCMPLT = 31 // socket.h:197:1: + Pseudo_AF_PFLOW = 34 // socket.h:201:1: + Pseudo_AF_PIP = 25 // socket.h:190:1: + Pseudo_AF_PIPEX = 35 // socket.h:202:1: + Pseudo_AF_RTIP = 22 // socket.h:187:1: + Pseudo_AF_XTP = 19 // socket.h:184:1: + Unix = 1 // <predefined>:340:1: +) + +const ( /* uio.h:57:1: */ + UIO_READ = 0 + UIO_WRITE = 1 +) + +// Segment flag values. +const ( /* uio.h:60:1: */ + UIO_USERSPACE = 0 // from user data space + UIO_SYSSPACE = 1 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: socket.h,v 1.105 2022/09/03 21:13:48 mbuhl Exp $ +// $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ + +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 + +// get the definitions for struct iovec, size_t, ssize_t, and <sys/cdefs.h> +// $OpenBSD: uio.h,v 1.19 2018/08/20 16:00:22 mpi Exp $ +// $NetBSD: uio.h,v 1.12 1996/02/09 18:25:45 christos Exp $ + +// Copyright (c) 1982, 1986, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)uio.h 8.5 (Berkeley) 2/22/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Ssize_t = X__ssize_t /* uio.h:48:19 */ + +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* uio.h:51:1 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Socklen_t = X__socklen_t /* socket.h:47:21 */ // length type for network syscalls + +type Sa_family_t = X__sa_family_t /* socket.h:52:23 */ // sockaddr address family type + +// Definitions related to sockets: types, address families, options. + +// Types + +// Socket creation flags + +// Option flags per-socket. + +// Additional options, not kept in so_options. + +// Structure used for manipulating linger option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:122:1 */ + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* socket.h:131:1 */ + +// Structure used for manipulating splice option. +type Splice = struct { + Fsp_fd int32 + Fsp_max Off_t + Fsp_idle struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* socket.h:140:1 */ + +// Maximum number of alternate routing tables + +// Level number for (get/set)sockopt() to apply to socket itself. + +// Address families. + +// Structure used by kernel to store most +// addresses. +type Sockaddr = struct { + Fsa_len X__uint8_t + Fsa_family Sa_family_t + Fsa_data [14]int8 +} /* socket.h:209:1 */ + +// Sockaddr type which can hold any sockaddr type available +// in the system. +// +// Note: __ss_{len,family} is defined in RFC2553. During RFC2553 discussion +// the field name went back and forth between ss_len and __ss_len, +// and RFC2553 specifies it to be __ss_len. openbsd picked ss_len. +// For maximum portability, userland programmer would need to +// (1) make the code never touch ss_len portion (cast it into sockaddr and +// touch sa_len), or (2) add "-Dss_len=__ss_len" into CFLAGS to unify all +// occurrences (including header file) to __ss_len. +type Sockaddr_storage = struct { + Fss_len X__uint8_t + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_pad2 X__uint64_t + F__ss_pad3 [240]uint8 +} /* socket.h:227:1 */ + +// Protocol families, same as address families for now. + +// These are the valid values for the "how" field used by shutdown(2). + +// Read using getsockopt() with SOL_SOCKET, SO_PEERCRED +type Sockpeercred = struct { + Fuid Uid_t + Fgid Gid_t + Fpid Pid_t +} /* socket.h:300:1 */ + +// Definitions for network related sysctl, CTL_NET. +// +// Second level is protocol family. +// Third level is protocol number. +// +// Further levels are defined by the individual families below. + +// PF_ROUTE - Routing table +// +// Four additional levels are defined: +// Fourth: address family, 0 is wildcard +// Fifth: type of info, defined below +// Sixth: flag(s) to mask with for NET_RT_FLAGS +// Seventh: routing table to use (facultative, defaults to 0) +// NET_RT_TABLE has the table id as sixth element. + +// PF_UNIX - unix socket tunables + +// PF_LINK - link layer or device tunables + +// PF_KEY - Key Management + +// PF_BPF not really a family, but connected under CTL_NET + +// PF_PFLOW not really a family, but connected under CTL_NET + +// Maximum queue length specifiable by listen(2). + +// Message header for recvmsg and sendmsg calls. +// Used value-result for recvmsg, value only for sendmsg. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + Fmsg_iov uintptr + Fmsg_iovlen uint32 + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 +} /* socket.h:483:1 */ + +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + Fmsg_iov uintptr + Fmsg_iovlen uint32 + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 +} /* socket.h:493:1 */ + +// Header for ancillary data objects in msg_control buffer. +// Used for additional information with/about a datagram +// not expressible by flags. The format is a sequence +// of message elements headed by cmsghdr structures. +type Cmsghdr = struct { + Fcmsg_len Socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:520:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go index cd779132..c5271729 100644 --- a/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/socket/socket_openbsd_amd64.go @@ -52,18 +52,19 @@ const ( BIG_ENDIAN = 4321 // endian.h:45:1: BYTE_ORDER = 1234 // endian.h:47:1: LITTLE_ENDIAN = 1234 // endian.h:44:1: - MSG_BCAST = 0x100 // socket.h:501:1: - MSG_CMSG_CLOEXEC = 0x800 // socket.h:504:1: - MSG_CTRUNC = 0x20 // socket.h:498:1: - MSG_DONTROUTE = 0x4 // socket.h:495:1: - MSG_DONTWAIT = 0x80 // socket.h:500:1: - MSG_EOR = 0x8 // socket.h:496:1: - MSG_MCAST = 0x200 // socket.h:502:1: - MSG_NOSIGNAL = 0x400 // socket.h:503:1: - MSG_OOB = 0x1 // socket.h:493:1: - MSG_PEEK = 0x2 // socket.h:494:1: - MSG_TRUNC = 0x10 // socket.h:497:1: - MSG_WAITALL = 0x40 // socket.h:499:1: + MSG_BCAST = 0x100 // socket.h:508:1: + MSG_CMSG_CLOEXEC = 0x800 // socket.h:511:1: + MSG_CTRUNC = 0x20 // socket.h:505:1: + MSG_DONTROUTE = 0x4 // socket.h:502:1: + MSG_DONTWAIT = 0x80 // socket.h:507:1: + MSG_EOR = 0x8 // socket.h:503:1: + MSG_MCAST = 0x200 // socket.h:509:1: + MSG_NOSIGNAL = 0x400 // socket.h:510:1: + MSG_OOB = 0x1 // socket.h:500:1: + MSG_PEEK = 0x2 // socket.h:501:1: + MSG_TRUNC = 0x10 // socket.h:504:1: + MSG_WAITALL = 0x40 // socket.h:506:1: + MSG_WAITFORONE = 0x1000 // socket.h:512:1: NET_BPF_BUFSIZE = 1 // socket.h:452:1: NET_BPF_MAXBUFSIZE = 2 // socket.h:453:1: NET_BPF_MAXID = 3 // socket.h:454:1: @@ -133,8 +134,8 @@ const ( RT_TABLEID_BITS = 8 // socket.h:150:1: RT_TABLEID_MASK = 0xff // socket.h:151:1: RT_TABLEID_MAX = 255 // socket.h:149:1: - SCM_RIGHTS = 0x01 // socket.h:552:1: - SCM_TIMESTAMP = 0x04 // socket.h:553:1: + SCM_RIGHTS = 0x01 // socket.h:560:1: + SCM_TIMESTAMP = 0x04 // socket.h:561:1: SHUT_RD = 0 // socket.h:292:1: SHUT_RDWR = 2 // socket.h:294:1: SHUT_WR = 1 // socket.h:293:1: @@ -180,8 +181,8 @@ const ( UNPCTL_SENDSPACE = 2 // socket.h:404:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -193,9 +194,9 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: @@ -211,9 +212,9 @@ const ( X_SYS_UIO_H_ = 0 // uio.h:36:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMEVAL_DECLARED = 0 // socket.h:130:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -224,7 +225,7 @@ const ( Pseudo_AF_PIPEX = 35 // socket.h:202:1: Pseudo_AF_RTIP = 22 // socket.h:187:1: Pseudo_AF_XTP = 19 // socket.h:184:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) const ( /* uio.h:57:1: */ @@ -256,7 +257,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* <builtin>:46:14 */ type X__float128 = float64 /* <builtin>:47:21 */ -// $OpenBSD: socket.h,v 1.100 2021/05/17 17:54:31 claudio Exp $ +// $OpenBSD: socket.h,v 1.105 2022/09/03 21:13:48 mbuhl Exp $ // $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ // Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 @@ -483,7 +484,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -643,18 +644,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Ssize_t = X__ssize_t /* uio.h:48:19 */ @@ -743,25 +743,24 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -886,6 +885,22 @@ type Msghdr = struct { Fmsg_flags int32 } /* socket.h:483:1 */ +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen uint32 + F__ccgo_pad2 [4]byte + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte +} /* socket.h:493:1 */ + // Header for ancillary data objects in msg_control buffer. // Used for additional information with/about a datagram // not expressible by flags. The format is a sequence @@ -894,6 +909,6 @@ type Cmsghdr = struct { Fcmsg_len Socklen_t Fcmsg_level int32 Fcmsg_type int32 -} /* socket.h:512:1 */ +} /* socket.h:520:1 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/socket_openbsd_arm64.go b/vendor/modernc.org/libc/sys/socket/socket_openbsd_arm64.go new file mode 100644 index 00000000..39dc282b --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/socket_openbsd_arm64.go @@ -0,0 +1,912 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_openbsd_arm64.go -pkgname socket', DO NOT EDIT. + +package socket + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_APPLETALK = 16 // socket.h:181:1: + AF_BLUETOOTH = 32 // socket.h:199:1: + AF_CCITT = 10 // socket.h:175:1: + AF_CHAOS = 5 // socket.h:169:1: + AF_CNT = 21 // socket.h:186:1: + AF_COIP = 20 // socket.h:185:1: + AF_DATAKIT = 9 // socket.h:174:1: + AF_DECnet = 12 // socket.h:177:1: + AF_DLI = 13 // socket.h:178:1: + AF_E164 = 26 // socket.h:192:1: + AF_ECMA = 8 // socket.h:173:1: + AF_ENCAP = 28 // socket.h:194:1: + AF_HYLINK = 15 // socket.h:180:1: + AF_IMPLINK = 3 // socket.h:167:1: + AF_INET = 2 // socket.h:166:1: + AF_INET6 = 24 // socket.h:189:1: + AF_IPX = 23 // socket.h:188:1: + AF_ISDN = 26 // socket.h:191:1: + AF_ISO = 7 // socket.h:171:1: + AF_KEY = 30 // socket.h:196:1: + AF_LAT = 14 // socket.h:179:1: + AF_LINK = 18 // socket.h:183:1: + AF_LOCAL = 1 // socket.h:165:1: + AF_MAX = 36 // socket.h:203:1: + AF_MPLS = 33 // socket.h:200:1: + AF_NATM = 27 // socket.h:193:1: + AF_NS = 6 // socket.h:170:1: + AF_OSI = 7 // socket.h:172:1: + AF_PUP = 4 // socket.h:168:1: + AF_ROUTE = 17 // socket.h:182:1: + AF_SIP = 29 // socket.h:195:1: + AF_SNA = 11 // socket.h:176:1: + AF_UNIX = 1 // socket.h:164:1: + AF_UNSPEC = 0 // socket.h:163:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + MSG_BCAST = 0x100 // socket.h:508:1: + MSG_CMSG_CLOEXEC = 0x800 // socket.h:511:1: + MSG_CTRUNC = 0x20 // socket.h:505:1: + MSG_DONTROUTE = 0x4 // socket.h:502:1: + MSG_DONTWAIT = 0x80 // socket.h:507:1: + MSG_EOR = 0x8 // socket.h:503:1: + MSG_MCAST = 0x200 // socket.h:509:1: + MSG_NOSIGNAL = 0x400 // socket.h:510:1: + MSG_OOB = 0x1 // socket.h:500:1: + MSG_PEEK = 0x2 // socket.h:501:1: + MSG_TRUNC = 0x10 // socket.h:504:1: + MSG_WAITALL = 0x40 // socket.h:506:1: + MSG_WAITFORONE = 0x1000 // socket.h:512:1: + NET_BPF_BUFSIZE = 1 // socket.h:452:1: + NET_BPF_MAXBUFSIZE = 2 // socket.h:453:1: + NET_BPF_MAXID = 3 // socket.h:454:1: + NET_KEY_MAXID = 3 // socket.h:441:1: + NET_KEY_SADB_DUMP = 1 // socket.h:439:1: + NET_KEY_SPD_DUMP = 2 // socket.h:440:1: + NET_LINK_IFRXQ = 1 // socket.h:416:1: + NET_LINK_IFRXQ_MAXID = 3 // socket.h:428:1: + NET_LINK_IFRXQ_PRESSURE_DROP = 2 // socket.h:426:1: + NET_LINK_IFRXQ_PRESSURE_RETURN = 1 // socket.h:424:1: + NET_LINK_MAXID = 2 // socket.h:417:1: + NET_MAXID = 36 // socket.h:314:1: + NET_PFLOW_MAXID = 2 // socket.h:466:1: + NET_PFLOW_STATS = 1 // socket.h:465:1: + NET_RT_DUMP = 1 // socket.h:365:1: + NET_RT_FLAGS = 2 // socket.h:366:1: + NET_RT_IFLIST = 3 // socket.h:367:1: + NET_RT_IFNAMES = 6 // socket.h:370:1: + NET_RT_MAXID = 8 // socket.h:372:1: + NET_RT_SOURCE = 7 // socket.h:371:1: + NET_RT_STATS = 4 // socket.h:368:1: + NET_RT_TABLE = 5 // socket.h:369:1: + NET_UNIX_DEFERRED = 7 // socket.h:389:1: + NET_UNIX_INFLIGHT = 6 // socket.h:388:1: + NET_UNIX_MAXID = 8 // socket.h:390:1: + NET_UNIX_PROTO_MAXID = 3 // socket.h:405:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + PF_APPLETALK = 16 // socket.h:267:1: + PF_BLUETOOTH = 32 // socket.h:283:1: + PF_BPF = 31 // socket.h:282:1: + PF_CCITT = 10 // socket.h:261:1: + PF_CHAOS = 5 // socket.h:255:1: + PF_CNT = 21 // socket.h:272:1: + PF_COIP = 20 // socket.h:271:1: + PF_DATAKIT = 9 // socket.h:260:1: + PF_DECnet = 12 // socket.h:263:1: + PF_DLI = 13 // socket.h:264:1: + PF_ECMA = 8 // socket.h:259:1: + PF_ENCAP = 28 // socket.h:279:1: + PF_HYLINK = 15 // socket.h:266:1: + PF_IMPLINK = 3 // socket.h:253:1: + PF_INET = 2 // socket.h:252:1: + PF_INET6 = 24 // socket.h:274:1: + PF_IPX = 23 // socket.h:273:1: + PF_ISDN = 26 // socket.h:277:1: + PF_ISO = 7 // socket.h:257:1: + PF_KEY = 30 // socket.h:281:1: + PF_LAT = 14 // socket.h:265:1: + PF_LINK = 18 // socket.h:269:1: + PF_LOCAL = 1 // socket.h:250:1: + PF_MAX = 36 // socket.h:287:1: + PF_MPLS = 33 // socket.h:284:1: + PF_NATM = 27 // socket.h:278:1: + PF_NS = 6 // socket.h:256:1: + PF_OSI = 7 // socket.h:258:1: + PF_PFLOW = 34 // socket.h:285:1: + PF_PIP = 25 // socket.h:276:1: + PF_PIPEX = 35 // socket.h:286:1: + PF_PUP = 4 // socket.h:254:1: + PF_ROUTE = 17 // socket.h:268:1: + PF_RTIP = 22 // socket.h:275:1: + PF_SIP = 29 // socket.h:280:1: + PF_SNA = 11 // socket.h:262:1: + PF_UNIX = 1 // socket.h:251:1: + PF_UNSPEC = 0 // socket.h:249:1: + PF_XTP = 19 // socket.h:270:1: + RT_TABLEID_BITS = 8 // socket.h:150:1: + RT_TABLEID_MASK = 0xff // socket.h:151:1: + RT_TABLEID_MAX = 255 // socket.h:149:1: + SCM_RIGHTS = 0x01 // socket.h:560:1: + SCM_TIMESTAMP = 0x04 // socket.h:561:1: + SHUT_RD = 0 // socket.h:292:1: + SHUT_RDWR = 2 // socket.h:294:1: + SHUT_WR = 1 // socket.h:293:1: + SOCK_CLOEXEC = 0x8000 // socket.h:76:1: + SOCK_DGRAM = 2 // socket.h:64:1: + SOCK_DNS = 0x1000 // socket.h:81:1: + SOCK_NONBLOCK = 0x4000 // socket.h:77:1: + SOCK_RAW = 3 // socket.h:65:1: + SOCK_RDM = 4 // socket.h:66:1: + SOCK_SEQPACKET = 5 // socket.h:67:1: + SOCK_STREAM = 1 // socket.h:63:1: + SOL_SOCKET = 0xffff // socket.h:158:1: + SOMAXCONN = 128 // socket.h:477:1: + SO_ACCEPTCONN = 0x0002 // socket.h:88:1: + SO_BINDANY = 0x1000 // socket.h:98:1: + SO_BROADCAST = 0x0020 // socket.h:92:1: + SO_DEBUG = 0x0001 // socket.h:87:1: + SO_DOMAIN = 0x1024 // socket.h:116:1: + SO_DONTROUTE = 0x0010 // socket.h:91:1: + SO_ERROR = 0x1007 // socket.h:110:1: + SO_KEEPALIVE = 0x0008 // socket.h:90:1: + SO_LINGER = 0x0080 // socket.h:94:1: + SO_NETPROC = 0x1020 // socket.h:112:1: + SO_OOBINLINE = 0x0100 // socket.h:95:1: + SO_PEERCRED = 0x1022 // socket.h:114:1: + SO_PROTOCOL = 0x1025 // socket.h:117:1: + SO_RCVBUF = 0x1002 // socket.h:105:1: + SO_RCVLOWAT = 0x1004 // socket.h:107:1: + SO_RCVTIMEO = 0x1006 // socket.h:109:1: + SO_REUSEADDR = 0x0004 // socket.h:89:1: + SO_REUSEPORT = 0x0200 // socket.h:96:1: + SO_RTABLE = 0x1021 // socket.h:113:1: + SO_SNDBUF = 0x1001 // socket.h:104:1: + SO_SNDLOWAT = 0x1003 // socket.h:106:1: + SO_SNDTIMEO = 0x1005 // socket.h:108:1: + SO_SPLICE = 0x1023 // socket.h:115:1: + SO_TIMESTAMP = 0x0800 // socket.h:97:1: + SO_TYPE = 0x1008 // socket.h:111:1: + SO_USELOOPBACK = 0x0040 // socket.h:93:1: + SO_ZEROIZE = 0x2000 // socket.h:99:1: + UIO_MAXIOV = 1024 // uio.h:84:1: + UNPCTL_RECVSPACE = 1 // socket.h:403:1: + UNPCTL_SENDSPACE = 2 // socket.h:404:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SA_FAMILY_T_DEFINED_ = 0 // socket.h:51:1: + X_SIZE_T_DEFINED_ = 0 // uio.h:42:1: + X_SOCKLEN_T_DEFINED_ = 0 // socket.h:46:1: + X_SSIZE_T_DEFINED_ = 0 // uio.h:47:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SOCKET_H_ = 0 // socket.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UIO_H_ = 0 // uio.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMEVAL_DECLARED = 0 // socket.h:130:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Pseudo_AF_HDRCMPLT = 31 // socket.h:197:1: + Pseudo_AF_PFLOW = 34 // socket.h:201:1: + Pseudo_AF_PIP = 25 // socket.h:190:1: + Pseudo_AF_PIPEX = 35 // socket.h:202:1: + Pseudo_AF_RTIP = 22 // socket.h:187:1: + Pseudo_AF_XTP = 19 // socket.h:184:1: + Unix = 1 // <predefined>:360:1: +) + +const ( /* uio.h:57:1: */ + UIO_READ = 0 + UIO_WRITE = 1 +) + +// Segment flag values. +const ( /* uio.h:60:1: */ + UIO_USERSPACE = 0 // from user data space + UIO_SYSSPACE = 1 +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: socket.h,v 1.105 2022/09/03 21:13:48 mbuhl Exp $ +// $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ + +// Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)socket.h 8.4 (Berkeley) 2/21/94 + +// get the definitions for struct iovec, size_t, ssize_t, and <sys/cdefs.h> +// $OpenBSD: uio.h,v 1.19 2018/08/20 16:00:22 mpi Exp $ +// $NetBSD: uio.h,v 1.12 1996/02/09 18:25:45 christos Exp $ + +// Copyright (c) 1982, 1986, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)uio.h 8.5 (Berkeley) 2/22/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Ssize_t = X__ssize_t /* uio.h:48:19 */ + +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* uio.h:51:1 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Socklen_t = X__socklen_t /* socket.h:47:21 */ // length type for network syscalls + +type Sa_family_t = X__sa_family_t /* socket.h:52:23 */ // sockaddr address family type + +// Definitions related to sockets: types, address families, options. + +// Types + +// Socket creation flags + +// Option flags per-socket. + +// Additional options, not kept in so_options. + +// Structure used for manipulating linger option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:122:1 */ + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* socket.h:131:1 */ + +// Structure used for manipulating splice option. +type Splice = struct { + Fsp_fd int32 + F__ccgo_pad1 [4]byte + Fsp_max Off_t + Fsp_idle struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* socket.h:140:1 */ + +// Maximum number of alternate routing tables + +// Level number for (get/set)sockopt() to apply to socket itself. + +// Address families. + +// Structure used by kernel to store most +// addresses. +type Sockaddr = struct { + Fsa_len X__uint8_t + Fsa_family Sa_family_t + Fsa_data [14]int8 +} /* socket.h:209:1 */ + +// Sockaddr type which can hold any sockaddr type available +// in the system. +// +// Note: __ss_{len,family} is defined in RFC2553. During RFC2553 discussion +// the field name went back and forth between ss_len and __ss_len, +// and RFC2553 specifies it to be __ss_len. openbsd picked ss_len. +// For maximum portability, userland programmer would need to +// (1) make the code never touch ss_len portion (cast it into sockaddr and +// touch sa_len), or (2) add "-Dss_len=__ss_len" into CFLAGS to unify all +// occurrences (including header file) to __ss_len. +type Sockaddr_storage = struct { + Fss_len X__uint8_t + Fss_family Sa_family_t + F__ss_pad1 [6]uint8 + F__ss_pad2 X__uint64_t + F__ss_pad3 [240]uint8 +} /* socket.h:227:1 */ + +// Protocol families, same as address families for now. + +// These are the valid values for the "how" field used by shutdown(2). + +// Read using getsockopt() with SOL_SOCKET, SO_PEERCRED +type Sockpeercred = struct { + Fuid Uid_t + Fgid Gid_t + Fpid Pid_t +} /* socket.h:300:1 */ + +// Definitions for network related sysctl, CTL_NET. +// +// Second level is protocol family. +// Third level is protocol number. +// +// Further levels are defined by the individual families below. + +// PF_ROUTE - Routing table +// +// Four additional levels are defined: +// Fourth: address family, 0 is wildcard +// Fifth: type of info, defined below +// Sixth: flag(s) to mask with for NET_RT_FLAGS +// Seventh: routing table to use (facultative, defaults to 0) +// NET_RT_TABLE has the table id as sixth element. + +// PF_UNIX - unix socket tunables + +// PF_LINK - link layer or device tunables + +// PF_KEY - Key Management + +// PF_BPF not really a family, but connected under CTL_NET + +// PF_PFLOW not really a family, but connected under CTL_NET + +// Maximum queue length specifiable by listen(2). + +// Message header for recvmsg and sendmsg calls. +// Used value-result for recvmsg, value only for sendmsg. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen uint32 + F__ccgo_pad2 [4]byte + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 +} /* socket.h:483:1 */ + +type Mmsghdr = struct { + Fmsg_hdr struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen uint32 + F__ccgo_pad2 [4]byte + Fmsg_control uintptr + Fmsg_controllen Socklen_t + Fmsg_flags int32 + } + Fmsg_len uint32 + F__ccgo_pad1 [4]byte +} /* socket.h:493:1 */ + +// Header for ancillary data objects in msg_control buffer. +// Used for additional information with/about a datagram +// not expressible by flags. The format is a sequence +// of message elements headed by cmsghdr structures. +type Cmsghdr = struct { + Fcmsg_len Socklen_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:520:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go b/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go index 550e5b58..07cbcc39 100644 --- a/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/stat/stat_darwin_amd64.go -pkgname stat', DO NOT EDIT. +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_darwin_amd64.go -pkgname stat', DO NOT EDIT. package stat diff --git a/vendor/modernc.org/libc/sys/stat/capi_freebsd_arm.go b/vendor/modernc.org/libc/sys/stat/capi_freebsd_arm.go new file mode 100644 index 00000000..a3798424 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_freebsd_arm.go -pkgname stat', DO NOT EDIT. + +package stat + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/stat/capi_freebsd_arm64.go b/vendor/modernc.org/libc/sys/stat/capi_freebsd_arm64.go new file mode 100644 index 00000000..6b355505 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_freebsd_amd64.go -pkgname stat', DO NOT EDIT. + +package stat + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/stat/capi_netbsd_arm.go b/vendor/modernc.org/libc/sys/stat/capi_netbsd_arm.go new file mode 100644 index 00000000..c4daf6ed --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_netbsd_arm.go -pkgname stat', DO NOT EDIT. + +package stat + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/stat/capi_openbsd_386.go b/vendor/modernc.org/libc/sys/stat/capi_openbsd_386.go new file mode 100644 index 00000000..ef273da7 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_386.go -pkgname stat', DO NOT EDIT. + +package stat + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/stat/capi_openbsd_arm64.go b/vendor/modernc.org/libc/sys/stat/capi_openbsd_arm64.go new file mode 100644 index 00000000..8382dd84 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_arm64.go -pkgname stat', DO NOT EDIT. + +package stat + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/stat/capi_windows_386.go b/vendor/modernc.org/libc/sys/stat/capi_windows_386.go index 5656b390..925ee93d 100644 --- a/vendor/modernc.org/libc/sys/stat/capi_windows_386.go +++ b/vendor/modernc.org/libc/sys/stat/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys\stat\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys\stat\stat_windows_386.go -pkgname stat', DO NOT EDIT. +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_windows_386.go -pkgname stat', DO NOT EDIT. package stat diff --git a/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go index 45c2ed9a..68ca4f12 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/stat/stat_darwin_amd64.go -pkgname stat', DO NOT EDIT. +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_darwin_amd64.go -pkgname stat', DO NOT EDIT. package stat @@ -15,102 +15,102 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSPERMS = 511 - ALLPERMS = 4095 - DEFFILEMODE = 438 - EF_IS_PURGEABLE = 0x00000008 - EF_IS_SPARSE = 0x00000010 - EF_IS_SYNC_ROOT = 0x00000004 - EF_MAY_SHARE_BLOCKS = 0x00000001 - EF_NO_XATTRS = 0x00000002 - SF_APPEND = 0x00040000 - SF_ARCHIVED = 0x00010000 - SF_DATALESS = 0x40000000 - SF_FIRMLINK = 0x00800000 - SF_IMMUTABLE = 0x00020000 - SF_NOUNLINK = 0x00100000 - SF_RESTRICTED = 0x00080000 - SF_SETTABLE = 0x3fff0000 - SF_SUPPORTED = 0x009f0000 - SF_SYNTHETIC = 0xc0000000 - S_BLKSIZE = 512 - S_IEXEC = 64 - S_IFBLK = 0060000 - S_IFCHR = 0020000 - S_IFDIR = 0040000 - S_IFIFO = 0010000 - S_IFLNK = 0120000 - S_IFMT = 0170000 - S_IFREG = 0100000 - S_IFSOCK = 0140000 - S_IFWHT = 0160000 - S_IREAD = 256 - S_IRGRP = 0000040 - S_IROTH = 0000004 - S_IRUSR = 0000400 - S_IRWXG = 0000070 - S_IRWXO = 0000007 - S_IRWXU = 0000700 - S_ISGID = 0002000 - S_ISTXT = 512 - S_ISUID = 0004000 - S_ISVTX = 0001000 - S_IWGRP = 0000020 - S_IWOTH = 0000002 - S_IWRITE = 128 - S_IWUSR = 0000200 - S_IXGRP = 0000010 - S_IXOTH = 0000001 - S_IXUSR = 0000100 - UF_APPEND = 0x00000004 - UF_COMPRESSED = 0x00000020 - UF_DATAVAULT = 0x00000080 - UF_HIDDEN = 0x00008000 - UF_IMMUTABLE = 0x00000002 - UF_NODUMP = 0x00000001 - UF_OPAQUE = 0x00000008 - UF_SETTABLE = 0x0000ffff - UF_TRACKED = 0x00000040 - UTIME_NOW = -1 - UTIME_OMIT = -2 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_FILESEC_T = 0 - X_FILE_OFFSET_BITS = 64 - X_GID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_SYS_STAT_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + ACCESSPERMS = 511 // stat.h:297:1: + ALLPERMS = 4095 // stat.h:299:1: + DEFFILEMODE = 438 // stat.h:301:1: + EF_IS_PURGEABLE = 0x00000008 // stat.h:370:1: + EF_IS_SPARSE = 0x00000010 // stat.h:371:1: + EF_IS_SYNC_ROOT = 0x00000004 // stat.h:369:1: + EF_MAY_SHARE_BLOCKS = 0x00000001 // stat.h:367:1: + EF_NO_XATTRS = 0x00000002 // stat.h:368:1: + SF_APPEND = 0x00040000 // stat.h:340:1: + SF_ARCHIVED = 0x00010000 // stat.h:338:1: + SF_DATALESS = 0x40000000 // stat.h:359:1: + SF_FIRMLINK = 0x00800000 // stat.h:351:1: + SF_IMMUTABLE = 0x00020000 // stat.h:339:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_RESTRICTED = 0x00080000 // stat.h:341:1: + SF_SETTABLE = 0x3fff0000 // stat.h:336:1: + SF_SUPPORTED = 0x009f0000 // stat.h:335:1: + SF_SYNTHETIC = 0xc0000000 // stat.h:337:1: + S_BLKSIZE = 512 // stat.h:303:1: + S_IEXEC = 64 // _s_ifmt.h:72:1: + S_IFBLK = 0060000 // _s_ifmt.h:39:1: + S_IFCHR = 0020000 // _s_ifmt.h:37:1: + S_IFDIR = 0040000 // _s_ifmt.h:38:1: + S_IFIFO = 0010000 // _s_ifmt.h:36:1: + S_IFLNK = 0120000 // _s_ifmt.h:41:1: + S_IFMT = 0170000 // _s_ifmt.h:35:1: + S_IFREG = 0100000 // _s_ifmt.h:40:1: + S_IFSOCK = 0140000 // _s_ifmt.h:42:1: + S_IFWHT = 0160000 // _s_ifmt.h:44:1: + S_IREAD = 256 // _s_ifmt.h:70:1: + S_IRGRP = 0000040 // _s_ifmt.h:55:1: + S_IROTH = 0000004 // _s_ifmt.h:60:1: + S_IRUSR = 0000400 // _s_ifmt.h:50:1: + S_IRWXG = 0000070 // _s_ifmt.h:54:1: + S_IRWXO = 0000007 // _s_ifmt.h:59:1: + S_IRWXU = 0000700 // _s_ifmt.h:49:1: + S_ISGID = 0002000 // _s_ifmt.h:65:1: + S_ISTXT = 512 // _s_ifmt.h:69:1: + S_ISUID = 0004000 // _s_ifmt.h:64:1: + S_ISVTX = 0001000 // _s_ifmt.h:66:1: + S_IWGRP = 0000020 // _s_ifmt.h:56:1: + S_IWOTH = 0000002 // _s_ifmt.h:61:1: + S_IWRITE = 128 // _s_ifmt.h:71:1: + S_IWUSR = 0000200 // _s_ifmt.h:51:1: + S_IXGRP = 0000010 // _s_ifmt.h:57:1: + S_IXOTH = 0000001 // _s_ifmt.h:62:1: + S_IXUSR = 0000100 // _s_ifmt.h:52:1: + UF_APPEND = 0x00000004 // stat.h:313:1: + UF_COMPRESSED = 0x00000020 // stat.h:320:1: + UF_DATAVAULT = 0x00000080 // stat.h:326:1: + UF_HIDDEN = 0x00008000 // stat.h:330:1: + UF_IMMUTABLE = 0x00000002 // stat.h:312:1: + UF_NODUMP = 0x00000001 // stat.h:311:1: + UF_OPAQUE = 0x00000008 // stat.h:314:1: + UF_SETTABLE = 0x0000ffff // stat.h:310:1: + UF_TRACKED = 0x00000040 // stat.h:324:1: + UTIME_NOW = -1 // stat.h:393:1: + UTIME_OMIT = -2 // stat.h:394:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_FILESEC_T = 0 // _filesec_t.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_SYS_STAT_H_ = 0 // stat.h:71:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_freebsd_386.go b/vendor/modernc.org/libc/sys/stat/stat_freebsd_386.go index 5d562e4c..4e16ee8b 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_freebsd_386.go +++ b/vendor/modernc.org/libc/sys/stat/stat_freebsd_386.go @@ -136,7 +136,7 @@ const ( X_IN_PORT_T_DECLARED = 0 // types.h:136:1: X_KEY_T_DECLARED = 0 // types.h:151:1: X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: X_LSEEK_DECLARED = 0 // types.h:421:1: X_LWPID_T_DECLARED = 0 // types.h:156:1: X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: @@ -191,7 +191,7 @@ const ( X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: I386 = 1 // <predefined>:335:1: Unix = 1 // <predefined>:336:1: ) @@ -744,8 +744,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -1915,7 +1915,6 @@ type Tm = struct { // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -1943,7 +1942,7 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ type Stat = struct { Fst_dev Dev_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_freebsd_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_freebsd_amd64.go index e9163a42..9b479fcf 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_freebsd_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_freebsd_amd64.go @@ -17,41 +17,44 @@ var _ unsafe.Pointer const ( ACCESSPERMS = 511 // stat.h:298:1: ALLPERMS = 4095 // stat.h:300:1: - BIG_ENDIAN = 4321 // endian.h:63:1: - BYTE_ORDER = 1234 // endian.h:65:1: - CLK_TCK = 128 // time.h:55:1: - CLOCKS_PER_SEC = 128 // time.h:59:1: - CLOCK_MONOTONIC = 4 // time.h:472:1: - CLOCK_MONOTONIC_FAST = 12 // time.h:479:1: - CLOCK_MONOTONIC_PRECISE = 11 // time.h:478:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // time.h:482:1: - CLOCK_PROF = 2 // time.h:469:1: - CLOCK_REALTIME = 0 // time.h:465:1: - CLOCK_REALTIME_FAST = 10 // time.h:477:1: - CLOCK_REALTIME_PRECISE = 9 // time.h:476:1: - CLOCK_SECOND = 13 // time.h:480:1: - CLOCK_THREAD_CPUTIME_ID = 14 // time.h:481:1: - CLOCK_UPTIME = 5 // time.h:473:1: - CLOCK_UPTIME_FAST = 8 // time.h:475:1: - CLOCK_UPTIME_PRECISE = 7 // time.h:474:1: - CLOCK_VIRTUAL = 1 // time.h:468:1: - CPUCLOCK_WHICH_PID = 0 // time.h:491:1: - CPUCLOCK_WHICH_TID = 1 // time.h:492:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUCLOCK_WHICH_PID = 0 // time.h:476:1: + CPUCLOCK_WHICH_TID = 1 // time.h:477:1: DEFFILEMODE = 438 // stat.h:302:1: - DST_AUST = 2 // time.h:48:1: - DST_CAN = 6 // time.h:52:1: - DST_EET = 5 // time.h:51:1: - DST_MET = 4 // time.h:50:1: - DST_NONE = 0 // time.h:46:1: - DST_USA = 1 // time.h:47:1: - DST_WET = 3 // time.h:49:1: + DST_AUST = 2 // time.h:49:1: + DST_CAN = 6 // time.h:53:1: + DST_EET = 5 // time.h:52:1: + DST_MET = 4 // time.h:51:1: + DST_NONE = 0 // time.h:47:1: + DST_USA = 1 // time.h:48:1: + DST_WET = 3 // time.h:50:1: FD_SETSIZE = 1024 // select.h:61:1: - ITIMER_PROF = 2 // time.h:445:1: - ITIMER_REAL = 0 // time.h:443:1: - ITIMER_VIRTUAL = 1 // time.h:444:1: - LITTLE_ENDIAN = 1234 // endian.h:62:1: - PDP_ENDIAN = 3412 // endian.h:64:1: - SBT_MAX = 0x7fffffffffffffff // time.h:134:1: + ITIMER_PROF = 2 // time.h:457:1: + ITIMER_REAL = 0 // time.h:455:1: + ITIMER_VIRTUAL = 1 // time.h:456:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SBT_MAX = 0x7fffffffffffffff // time.h:135:1: SF_APPEND = 0x00040000 // stat.h:341:1: SF_ARCHIVED = 0x00010000 // stat.h:339:1: SF_IMMUTABLE = 0x00020000 // stat.h:340:1: @@ -87,9 +90,9 @@ const ( S_IXGRP = 0000010 // stat.h:262:1: S_IXOTH = 0000001 // stat.h:267:1: S_IXUSR = 0000100 // stat.h:251:1: - TIMER_ABSTIME = 0x1 // time.h:487:1: - TIMER_RELTIME = 0x0 // time.h:123:1: - TIME_UTC = 1 // time.h:216:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: UF_APPEND = 0x00000004 // stat.h:314:1: UF_ARCHIVE = 0x00000800 // stat.h:330:1: UF_HIDDEN = 0x00008000 // stat.h:333:1: @@ -106,10 +109,10 @@ const ( UTIME_NOW = -1 // stat.h:358:1: UTIME_OMIT = -2 // stat.h:359:1: X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // endian.h:52:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: X_BLKCNT_T_DECLARED = 0 // stat.h:54:1: X_BLKSIZE_T_DECLARED = 0 // stat.h:49:1: - X_BYTE_ORDER = 1234 // endian.h:55:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: X_CLOCKID_T_DECLARED = 0 // types.h:100:1: @@ -131,8 +134,8 @@ const ( X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: X_IN_PORT_T_DECLARED = 0 // types.h:136:1: X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // endian.h:51:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: X_LP64 = 1 // <predefined>:1:1: X_LSEEK_DECLARED = 0 // types.h:421:1: X_LWPID_T_DECLARED = 0 // types.h:156:1: @@ -144,16 +147,16 @@ const ( X_MODE_T_DECLARED = 0 // stat.h:79:1: X_MQD_T_DECLARED = 0 // types.h:227:1: X_NLINK_T_DECLARED = 0 // stat.h:84:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF64_T_DECLARED = 0 // types.h:181:1: X_OFF_T_DECLARED = 0 // stat.h:89:1: - X_PDP_ENDIAN = 3412 // endian.h:53:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: X_PID_T_DECLARED = 0 // types.h:186:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // endian.h:44:1: - X_QUAD_LOWWORD = 0 // endian.h:45:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: X_RLIM_T_DECLARED = 0 // types.h:193:1: X_SELECT_DECLARED = 0 // select.h:103:1: X_SIGSET_T_DECLARED = 0 // select.h:50:1: @@ -165,9 +168,11 @@ const ( X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_SELECT_H_ = 0 // select.h:35:1: X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: X_SYS_TIME_H_ = 0 // time.h:36:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: @@ -186,8 +191,8 @@ const ( X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: X_USECONDS_T_DECLARED = 0 // types.h:239:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - Unix = 1 // <predefined>:337:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -462,12 +467,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-3-Clause // @@ -744,8 +752,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -1598,15 +1606,69 @@ type Fd_set = Fd_set1 /* select.h:75:3 */ // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp // $FreeBSD$ +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 -} /* time.h:42:1 */ +} /* time.h:43:1 */ type Bintime = struct { Fsec Time_t Ffrac Uint64_t -} /* time.h:55:1 */ +} /* time.h:56:1 */ // Operations on timespecs @@ -1622,7 +1684,7 @@ type Itimerval = struct { Ftv_sec Time_t Ftv_usec Suseconds_t } -} /* time.h:447:1 */ +} /* time.h:459:1 */ // Getkerninfo clock information structure type Clockinfo = struct { @@ -1631,9 +1693,7 @@ type Clockinfo = struct { Fspare int32 Fstathz int32 Fprofhz int32 -} /* time.h:455:1 */ - -// These macros are also in time.h. +} /* time.h:467:1 */ // - // SPDX-License-Identifier: BSD-3-Clause @@ -1768,6 +1828,43 @@ type Clockinfo = struct { // // $FreeBSD$ +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + // Frequency of the clock ticks reported by times(). Deprecated - use // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) @@ -1809,8 +1906,6 @@ type Clockinfo = struct { // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp // $FreeBSD$ -// These macros are also in sys/time.h. - type Tm = struct { Ftm_sec int32 Ftm_min int32 @@ -1824,13 +1919,12 @@ type Tm = struct { F__ccgo_pad1 [4]byte Ftm_gmtoff int64 Ftm_zone uintptr -} /* time.h:129:1 */ +} /* time.h:101:1 */ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -1858,7 +1952,7 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ type Stat = struct { Fst_dev Dev_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_freebsd_arm.go b/vendor/modernc.org/libc/sys/stat/stat_freebsd_arm.go new file mode 100644 index 00000000..42818c84 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/stat_freebsd_arm.go @@ -0,0 +1,1940 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_freebsd_arm.go -pkgname stat', DO NOT EDIT. + +package stat + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:298:1: + ALLPERMS = 4095 // stat.h:300:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUCLOCK_WHICH_PID = 0 // time.h:476:1: + CPUCLOCK_WHICH_TID = 1 // time.h:477:1: + DEFFILEMODE = 438 // stat.h:302:1: + DST_AUST = 2 // time.h:49:1: + DST_CAN = 6 // time.h:53:1: + DST_EET = 5 // time.h:52:1: + DST_MET = 4 // time.h:51:1: + DST_NONE = 0 // time.h:47:1: + DST_USA = 1 // time.h:48:1: + DST_WET = 3 // time.h:50:1: + FD_SETSIZE = 1024 // select.h:61:1: + ITIMER_PROF = 2 // time.h:457:1: + ITIMER_REAL = 0 // time.h:455:1: + ITIMER_VIRTUAL = 1 // time.h:456:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SBT_MAX = 0x7fffffffffffffff // time.h:135:1: + SF_APPEND = 0x00040000 // stat.h:341:1: + SF_ARCHIVED = 0x00010000 // stat.h:339:1: + SF_IMMUTABLE = 0x00020000 // stat.h:340:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_SETTABLE = 0xffff0000 // stat.h:338:1: + SF_SNAPSHOT = 0x00200000 // stat.h:343:1: + S_BLKSIZE = 512 // stat.h:304:1: + S_IEXEC = 64 // stat.h:256:1: + S_IFBLK = 0060000 // stat.h:274:1: + S_IFCHR = 0020000 // stat.h:272:1: + S_IFDIR = 0040000 // stat.h:273:1: + S_IFIFO = 0010000 // stat.h:271:1: + S_IFLNK = 0120000 // stat.h:276:1: + S_IFMT = 0170000 // stat.h:270:1: + S_IFREG = 0100000 // stat.h:275:1: + S_IFSOCK = 0140000 // stat.h:277:1: + S_IFWHT = 0160000 // stat.h:281:1: + S_IREAD = 256 // stat.h:254:1: + S_IRGRP = 0000040 // stat.h:260:1: + S_IROTH = 0000004 // stat.h:265:1: + S_IRUSR = 0000400 // stat.h:249:1: + S_IRWXG = 0000070 // stat.h:259:1: + S_IRWXO = 0000007 // stat.h:264:1: + S_IRWXU = 0000700 // stat.h:248:1: + S_ISGID = 0002000 // stat.h:243:1: + S_ISTXT = 0001000 // stat.h:245:1: + S_ISUID = 0004000 // stat.h:242:1: + S_ISVTX = 0001000 // stat.h:278:1: + S_IWGRP = 0000020 // stat.h:261:1: + S_IWOTH = 0000002 // stat.h:266:1: + S_IWRITE = 128 // stat.h:255:1: + S_IWUSR = 0000200 // stat.h:250:1: + S_IXGRP = 0000010 // stat.h:262:1: + S_IXOTH = 0000001 // stat.h:267:1: + S_IXUSR = 0000100 // stat.h:251:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + UF_APPEND = 0x00000004 // stat.h:314:1: + UF_ARCHIVE = 0x00000800 // stat.h:330:1: + UF_HIDDEN = 0x00008000 // stat.h:333:1: + UF_IMMUTABLE = 0x00000002 // stat.h:313:1: + UF_NODUMP = 0x00000001 // stat.h:312:1: + UF_NOUNLINK = 0x00000010 // stat.h:316:1: + UF_OFFLINE = 0x00000200 // stat.h:328:1: + UF_OPAQUE = 0x00000008 // stat.h:315:1: + UF_READONLY = 0x00001000 // stat.h:331:1: + UF_REPARSE = 0x00000400 // stat.h:329:1: + UF_SETTABLE = 0x0000ffff // stat.h:311:1: + UF_SPARSE = 0x00000100 // stat.h:327:1: + UF_SYSTEM = 0x00000080 // stat.h:326:1: + UTIME_NOW = -1 // stat.h:358:1: + UTIME_OMIT = -2 // stat.h:359:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // stat.h:54:1: + X_BLKSIZE_T_DECLARED = 0 // stat.h:49:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // stat.h:59:1: + X_FFLAGS_T_DECLARED = 0 // stat.h:64:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // stat.h:69:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INO_T_DECLARED = 0 // stat.h:74:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKNOD_DECLARED = 0 // stat.h:393:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // stat.h:79:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // stat.h:84:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // stat.h:89:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // _timeval.h:38:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // _timespec.h:43:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // stat.h:94:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stat.h 8.12 (Berkeley) 6/16/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Time_t = X__time_t /* _timespec.h:42:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Blksize_t = X__blksize_t /* stat.h:48:21 */ + +type Blkcnt_t = X__blkcnt_t /* stat.h:53:20 */ + +type Dev_t = X__dev_t /* stat.h:58:18 */ + +type Fflags_t = X__fflags_t /* stat.h:63:20 */ + +type Gid_t = X__gid_t /* stat.h:68:18 */ + +type Ino_t = X__ino_t /* stat.h:73:18 */ + +type Mode_t = X__mode_t /* stat.h:78:18 */ + +type Nlink_t = X__nlink_t /* stat.h:83:19 */ + +type Off_t = X__off_t /* stat.h:88:18 */ + +type Uid_t = X__uid_t /* stat.h:93:18 */ + +// XXX We get miscellaneous namespace pollution with this. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Suseconds_t = X__suseconds_t /* _timeval.h:37:23 */ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* _timeval.h:49:1 */ + +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint32 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint32 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint32 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:43:1 */ + +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:56:1 */ + +// Operations on timespecs + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } +} /* time.h:459:1 */ + +// Getkerninfo clock information structure +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fspare int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:467:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +type Stat = struct { + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_mode Mode_t + Fst_padding0 X__int16_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_padding1 X__int32_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags Fflags_t + Fst_gen X__uint64_t + Fst_spare [10]X__uint64_t +} /* stat.h:160:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_freebsd_arm64.go b/vendor/modernc.org/libc/sys/stat/stat_freebsd_arm64.go new file mode 100644 index 00000000..9b479fcf --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/stat_freebsd_arm64.go @@ -0,0 +1,1991 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_freebsd_amd64.go -pkgname stat', DO NOT EDIT. + +package stat + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:298:1: + ALLPERMS = 4095 // stat.h:300:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + CPUCLOCK_WHICH_PID = 0 // time.h:476:1: + CPUCLOCK_WHICH_TID = 1 // time.h:477:1: + DEFFILEMODE = 438 // stat.h:302:1: + DST_AUST = 2 // time.h:49:1: + DST_CAN = 6 // time.h:53:1: + DST_EET = 5 // time.h:52:1: + DST_MET = 4 // time.h:51:1: + DST_NONE = 0 // time.h:47:1: + DST_USA = 1 // time.h:48:1: + DST_WET = 3 // time.h:50:1: + FD_SETSIZE = 1024 // select.h:61:1: + ITIMER_PROF = 2 // time.h:457:1: + ITIMER_REAL = 0 // time.h:455:1: + ITIMER_VIRTUAL = 1 // time.h:456:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + SBT_MAX = 0x7fffffffffffffff // time.h:135:1: + SF_APPEND = 0x00040000 // stat.h:341:1: + SF_ARCHIVED = 0x00010000 // stat.h:339:1: + SF_IMMUTABLE = 0x00020000 // stat.h:340:1: + SF_NOUNLINK = 0x00100000 // stat.h:342:1: + SF_SETTABLE = 0xffff0000 // stat.h:338:1: + SF_SNAPSHOT = 0x00200000 // stat.h:343:1: + S_BLKSIZE = 512 // stat.h:304:1: + S_IEXEC = 64 // stat.h:256:1: + S_IFBLK = 0060000 // stat.h:274:1: + S_IFCHR = 0020000 // stat.h:272:1: + S_IFDIR = 0040000 // stat.h:273:1: + S_IFIFO = 0010000 // stat.h:271:1: + S_IFLNK = 0120000 // stat.h:276:1: + S_IFMT = 0170000 // stat.h:270:1: + S_IFREG = 0100000 // stat.h:275:1: + S_IFSOCK = 0140000 // stat.h:277:1: + S_IFWHT = 0160000 // stat.h:281:1: + S_IREAD = 256 // stat.h:254:1: + S_IRGRP = 0000040 // stat.h:260:1: + S_IROTH = 0000004 // stat.h:265:1: + S_IRUSR = 0000400 // stat.h:249:1: + S_IRWXG = 0000070 // stat.h:259:1: + S_IRWXO = 0000007 // stat.h:264:1: + S_IRWXU = 0000700 // stat.h:248:1: + S_ISGID = 0002000 // stat.h:243:1: + S_ISTXT = 0001000 // stat.h:245:1: + S_ISUID = 0004000 // stat.h:242:1: + S_ISVTX = 0001000 // stat.h:278:1: + S_IWGRP = 0000020 // stat.h:261:1: + S_IWOTH = 0000002 // stat.h:266:1: + S_IWRITE = 128 // stat.h:255:1: + S_IWUSR = 0000200 // stat.h:250:1: + S_IXGRP = 0000010 // stat.h:262:1: + S_IXOTH = 0000001 // stat.h:267:1: + S_IXUSR = 0000100 // stat.h:251:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + UF_APPEND = 0x00000004 // stat.h:314:1: + UF_ARCHIVE = 0x00000800 // stat.h:330:1: + UF_HIDDEN = 0x00008000 // stat.h:333:1: + UF_IMMUTABLE = 0x00000002 // stat.h:313:1: + UF_NODUMP = 0x00000001 // stat.h:312:1: + UF_NOUNLINK = 0x00000010 // stat.h:316:1: + UF_OFFLINE = 0x00000200 // stat.h:328:1: + UF_OPAQUE = 0x00000008 // stat.h:315:1: + UF_READONLY = 0x00001000 // stat.h:331:1: + UF_REPARSE = 0x00000400 // stat.h:329:1: + UF_SETTABLE = 0x0000ffff // stat.h:311:1: + UF_SPARSE = 0x00000100 // stat.h:327:1: + UF_SYSTEM = 0x00000080 // stat.h:326:1: + UTIME_NOW = -1 // stat.h:358:1: + UTIME_OMIT = -2 // stat.h:359:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // stat.h:54:1: + X_BLKSIZE_T_DECLARED = 0 // stat.h:49:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // stat.h:59:1: + X_FFLAGS_T_DECLARED = 0 // stat.h:64:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // stat.h:69:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_INO_T_DECLARED = 0 // stat.h:74:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKNOD_DECLARED = 0 // stat.h:393:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // stat.h:79:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // stat.h:84:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // stat.h:89:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // _timeval.h:38:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // _timespec.h:43:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // stat.h:94:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)stat.h 8.12 (Berkeley) 6/16/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Time_t = X__time_t /* _timespec.h:42:18 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Blksize_t = X__blksize_t /* stat.h:48:21 */ + +type Blkcnt_t = X__blkcnt_t /* stat.h:53:20 */ + +type Dev_t = X__dev_t /* stat.h:58:18 */ + +type Fflags_t = X__fflags_t /* stat.h:63:20 */ + +type Gid_t = X__gid_t /* stat.h:68:18 */ + +type Ino_t = X__ino_t /* stat.h:73:18 */ + +type Mode_t = X__mode_t /* stat.h:78:18 */ + +type Nlink_t = X__nlink_t /* stat.h:83:19 */ + +type Off_t = X__off_t /* stat.h:88:18 */ + +type Uid_t = X__uid_t /* stat.h:93:18 */ + +// XXX We get miscellaneous namespace pollution with this. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Suseconds_t = X__suseconds_t /* _timeval.h:37:23 */ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ + +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint64 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint64 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint64 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [16]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:43:1 */ + +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:56:1 */ + +// Operations on timespecs + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:459:1 */ + +// Getkerninfo clock information structure +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fspare int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:467:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +// New in POSIX 1003.1b-1993. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +type Stat = struct { + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_mode Mode_t + Fst_padding0 X__int16_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_padding1 X__int32_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags Fflags_t + Fst_gen X__uint64_t + Fst_spare [10]X__uint64_t +} /* stat.h:160:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_386.go b/vendor/modernc.org/libc/sys/stat/stat_linux_386.go index 798ee36e..7423b91a 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_linux_386.go +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_386.go @@ -756,7 +756,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -767,13 +768,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // NB: Include guard matches what <linux/time.h> uses. @@ -832,7 +835,8 @@ type X__time64_t = X__int64_t /* types.h:222:28 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_linux_amd64.go index 5c33bdcc..9c460d3a 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_linux_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_amd64.go @@ -772,7 +772,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -783,8 +784,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -847,7 +849,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_arm.go b/vendor/modernc.org/libc/sys/stat/stat_linux_arm.go index af8229ba..06ea74a0 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_linux_arm.go +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_arm.go @@ -815,7 +815,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -826,13 +827,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // NB: Include guard matches what <linux/time.h> uses. @@ -891,7 +894,8 @@ type X__time64_t = X__int64_t /* types.h:222:28 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_arm64.go b/vendor/modernc.org/libc/sys/stat/stat_linux_arm64.go index f701f6f5..fd063797 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_linux_arm64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_arm64.go @@ -840,7 +840,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -851,8 +852,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -915,7 +917,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_ppc64le.go b/vendor/modernc.org/libc/sys/stat/stat_linux_ppc64le.go index f230db3c..ad5c237a 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_linux_ppc64le.go +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_ppc64le.go @@ -785,7 +785,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -796,8 +797,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -860,7 +862,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go b/vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go index edf9167e..c9b69c36 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_riscv64.go @@ -940,7 +940,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -951,8 +952,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1038,7 +1040,8 @@ type X__sig_atomic_t = int32 /* types.h:215:13 */ type Time_t = X__time_t /* time_t.h:10:18 */ // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_s390x.go b/vendor/modernc.org/libc/sys/stat/stat_linux_s390x.go index 8a13a9b0..66bb4857 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_linux_s390x.go +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_s390x.go @@ -771,7 +771,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -782,8 +783,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -846,7 +848,8 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go index 5468c82f..e343c8d9 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_netbsd_amd64.go @@ -1721,6 +1721,7 @@ type Timezone = struct { // 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 type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/sys/stat/stat_netbsd_arm.go b/vendor/modernc.org/libc/sys/stat/stat_netbsd_arm.go new file mode 100644 index 00000000..aa9c64fd --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/stat_netbsd_arm.go @@ -0,0 +1,2332 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_netbsd_arm.go -pkgname stat', DO NOT EDIT. + +package stat + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:189:1: + ALLPERMS = 4095 // stat.h:191:1: + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + CLOCKS_PER_SEC = 100 // time.h:73:1: + CLOCK_MONOTONIC = 3 // time.h:297:1: + CLOCK_PROCESS_CPUTIME_ID = 0x40000000 // time.h:299:1: + CLOCK_PROF = 2 // time.h:296:1: + CLOCK_REALTIME = 0 // time.h:294:1: + CLOCK_THREAD_CPUTIME_ID = 0x20000000 // time.h:298:1: + CLOCK_VIRTUAL = 1 // time.h:295:1: + DEFFILEMODE = 438 // stat.h:193:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + ITIMER_MONOTONIC = 3 // time.h:278:1: + ITIMER_PROF = 2 // time.h:277:1: + ITIMER_REAL = 0 // time.h:275:1: + ITIMER_VIRTUAL = 1 // time.h:276:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SF_APPEND = 0x00040000 // stat.h:214:1: + SF_ARCHIVED = 0x00010000 // stat.h:212:1: + SF_IMMUTABLE = 0x00020000 // stat.h:213:1: + SF_LOG = 0x00400000 // stat.h:217:1: + SF_SETTABLE = 0xffff0000 // stat.h:211:1: + SF_SNAPINVAL = 0x00800000 // stat.h:218:1: + SF_SNAPSHOT = 0x00200000 // stat.h:216:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + S_ARCH1 = 65536 // stat.h:167:1: + S_ARCH2 = 131072 // stat.h:168:1: + S_BLKSIZE = 512 // stat.h:195:1: + S_IEXEC = 64 // stat.h:125:1: + S_IFBLK = 24576 // stat.h:156:1: + S_IFCHR = 8192 // stat.h:154:1: + S_IFDIR = 16384 // stat.h:155:1: + S_IFIFO = 4096 // stat.h:153:1: + S_IFLNK = 40960 // stat.h:158:1: + S_IFMT = 61440 // stat.h:152:1: + S_IFREG = 32768 // stat.h:157:1: + S_IFSOCK = 49152 // stat.h:162:1: + S_IFWHT = 57344 // stat.h:165:1: + S_IREAD = 256 // stat.h:123:1: + S_IRGRP = 0000040 // stat.h:129:1: + S_IROTH = 0000004 // stat.h:134:1: + S_IRUSR = 0000400 // stat.h:118:1: + S_IRWXG = 0000070 // stat.h:128:1: + S_IRWXO = 0000007 // stat.h:133:1: + S_IRWXU = 0000700 // stat.h:117:1: + S_ISGID = 0002000 // stat.h:112:1: + S_ISTXT = 0001000 // stat.h:114:1: + S_ISUID = 0004000 // stat.h:111:1: + S_ISVTX = 512 // stat.h:159:1: + S_IWGRP = 0000020 // stat.h:130:1: + S_IWOTH = 0000002 // stat.h:135:1: + S_IWRITE = 128 // stat.h:124:1: + S_IWUSR = 0000200 // stat.h:119:1: + S_IXGRP = 0000010 // stat.h:131:1: + S_IXOTH = 0000001 // stat.h:136:1: + S_IXUSR = 0000100 // stat.h:120:1: + TIMER_ABSTIME = 0x1 // time.h:304:1: + TIMER_RELTIME = 0x0 // time.h:302:1: + TIME_UTC = 1 // time.h:238:1: + UF_APPEND = 0x00000004 // stat.h:205:1: + UF_IMMUTABLE = 0x00000002 // stat.h:204:1: + UF_NODUMP = 0x00000001 // stat.h:203:1: + UF_OPAQUE = 0x00000008 // stat.h:206:1: + UF_SETTABLE = 0x0000ffff // stat.h:202:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + UTIME_NOW = 1073741823 // stat.h:235:1: + UTIME_OMIT = 1073741822 // stat.h:236:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_IDTYPE_H_ = 0 // idtype.h:32:1: + X_SYS_NULL_H_ = 0 // null.h:9:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: + X_SYS_STAT_H_ = 0 // stat.h:40:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:38:1: + X_SYS_TIME_H_ = 0 // time.h:35:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_S_ARCH1 = 0200000 // stat.h:148:1: + X_S_ARCH2 = 0400000 // stat.h:149:1: + X_S_IFBLK = 0060000 // stat.h:142:1: + X_S_IFCHR = 0020000 // stat.h:140:1: + X_S_IFDIR = 0040000 // stat.h:141:1: + X_S_IFIFO = 0010000 // stat.h:139:1: + X_S_IFLNK = 0120000 // stat.h:144:1: + X_S_IFMT = 0170000 // stat.h:138:1: + X_S_IFREG = 0100000 // stat.h:143:1: + X_S_IFSOCK = 0140000 // stat.h:146:1: + X_S_IFWHT = 0160000 // stat.h:147:1: + X_S_ISVTX = 0001000 // stat.h:145:1: + X_TIME_H_ = 0 // time.h:40:1: +) + +// $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. + +// 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. +const ( /* idtype.h:41:1: */ + P_MYID = -1 // Me/my process group + P_ALL = 0 // All processes. + P_PID = 1 // A process identifier. + P_LWPID = 2 // An LWP identifier. + P_PPID = 3 // A parent process identifier. + P_PGID = 4 // A process group identifier. + P_SID = 5 // A session identifier. + P_CID = 6 // A scheduling class identifier. + P_UID = 7 // A user identifier. + P_GID = 8 // A group identifier. + P_TASKID = 9 // A task identifier. + P_PROJID = 10 // A project identifier. + P_POOLID = 11 // A pool identifier. + P_ZONEID = 12 // A zone identifier. + P_CTID = 13 // A (process) contract identifier. + P_CPUID = 14 // CPU identifier. + P_PSETID = 15 // Processor set identifier. + X_P_MAXIDTYPE = 2147483647 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// 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 <time.h>". +// +// 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 +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// Structure returned by gettimeofday(2) system call, +// and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* time.h:44:1 */ + +// $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 + +// $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. + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* timespec.h:47:1 */ + +// Note: timezone is obsolete. All timezone handling is now in +// userland. Its just here for back compatibility. +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:65:1 */ + +// Operations on timevals. + +// 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 +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:102:1 */ + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. +// NB: Must match the CLOCK_ constants below. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } +} /* time.h:280:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* time.h:289:1 */ + +// $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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ + +// $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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. +// Public domain. + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:75:1 */ + +// $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. + +// 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. +type Idtype_t = int32 /* idtype.h:60:3 */ + +type Locale_t = uintptr /* time.h:188:25 */ + +type Timezone_t = uintptr /* time.h:198:24 */ + +type Stat = struct { + Fst_dev Dev_t + Fst_mode X__mode_t + F__ccgo_pad1 [4]byte + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid X__uid_t + Fst_gid X__gid_t + F__ccgo_pad2 [4]byte + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fst_size X__off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags Uint32_t + Fst_gen Uint32_t + Fst_spare [2]Uint32_t + F__ccgo_pad3 [4]byte +} /* stat.h:59:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_openbsd_386.go b/vendor/modernc.org/libc/sys/stat/stat_openbsd_386.go new file mode 100644 index 00000000..c742e0a7 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/stat_openbsd_386.go @@ -0,0 +1,1079 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_386.go -pkgname stat', DO NOT EDIT. + +package stat + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:151:1: + ALLPERMS = 4095 // stat.h:153:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DEFFILEMODE = 438 // stat.h:155:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + FD_SETSIZE = 1024 // select.h:62:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NBBY = 8 // select.h:111:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SF_APPEND = 0x00040000 // stat.h:175:1: + SF_ARCHIVED = 0x00010000 // stat.h:173:1: + SF_IMMUTABLE = 0x00020000 // stat.h:174:1: + SF_SETTABLE = 0xffff0000 // stat.h:172:1: + S_BLKSIZE = 512 // stat.h:157:1: + S_IEXEC = 64 // stat.h:108:1: + S_IFBLK = 0060000 // stat.h:126:1: + S_IFCHR = 0020000 // stat.h:124:1: + S_IFDIR = 0040000 // stat.h:125:1: + S_IFIFO = 0010000 // stat.h:123:1: + S_IFLNK = 0120000 // stat.h:128:1: + S_IFMT = 0170000 // stat.h:122:1: + S_IFREG = 0100000 // stat.h:127:1: + S_IFSOCK = 0140000 // stat.h:129:1: + S_IREAD = 256 // stat.h:106:1: + S_IRGRP = 0000040 // stat.h:112:1: + S_IROTH = 0000004 // stat.h:117:1: + S_IRUSR = 0000400 // stat.h:101:1: + S_IRWXG = 0000070 // stat.h:111:1: + S_IRWXO = 0000007 // stat.h:116:1: + S_IRWXU = 0000700 // stat.h:100:1: + S_ISGID = 0002000 // stat.h:95:1: + S_ISTXT = 0001000 // stat.h:97:1: + S_ISUID = 0004000 // stat.h:94:1: + S_ISVTX = 0001000 // stat.h:130:1: + S_IWGRP = 0000020 // stat.h:113:1: + S_IWOTH = 0000002 // stat.h:118:1: + S_IWRITE = 128 // stat.h:107:1: + S_IWUSR = 0000200 // stat.h:102:1: + S_IXGRP = 0000010 // stat.h:114:1: + S_IXOTH = 0000001 // stat.h:119:1: + S_IXUSR = 0000100 // stat.h:103:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + UF_APPEND = 0x00000004 // stat.h:167:1: + UF_IMMUTABLE = 0x00000002 // stat.h:166:1: + UF_NODUMP = 0x00000001 // stat.h:165:1: + UF_OPAQUE = 0x00000008 // stat.h:168:1: + UF_SETTABLE = 0x0000ffff // stat.h:164:1: + UTIME_NOW = -2 // stat.h:188:1: + UTIME_OMIT = -1 // stat.h:189:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ +// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd 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.9 (Berkeley) 8/17/94 + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:111:1 */ + +type Stat = struct { + Fst_mode Mode_t + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags U_int32_t + Fst_gen U_int32_t + F__st_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* stat.h:45:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go index 6a328abb..18ad3aa5 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/stat/stat_openbsd_amd64.go @@ -86,8 +86,8 @@ const ( UTIME_OMIT = -1 // stat.h:189:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -100,16 +100,16 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: X_SELECT_DEFINED_ = 0 // select.h:126:1: X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -120,16 +120,16 @@ const ( X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TIME_H_ = 0 // _time.h:33:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: X_TIMESPEC_DECLARED = 0 // select.h:48:1: X_TIMEVAL_DECLARED = 0 // select.h:40:1: X_TIME_H_ = 0 // time.h:42:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -150,7 +150,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* <builtin>:46:14 */ type X__float128 = float64 /* <builtin>:47:21 */ -// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $ +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ // $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ // - @@ -188,7 +188,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // // @(#)stat.h 8.9 (Berkeley) 8/17/94 -// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $ +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ // $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ // Copyright (c) 1982, 1986, 1993 @@ -252,7 +252,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // // @(#)select.h 8.2 (Berkeley) 1/4/94 -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -549,7 +549,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -709,18 +709,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -802,27 +801,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -960,7 +958,7 @@ type Clockinfo = struct { // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 diff --git a/vendor/modernc.org/libc/sys/stat/stat_openbsd_arm64.go b/vendor/modernc.org/libc/sys/stat/stat_openbsd_arm64.go new file mode 100644 index 00000000..3eee0e2c --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/stat_openbsd_arm64.go @@ -0,0 +1,1088 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_openbsd_arm64.go -pkgname stat', DO NOT EDIT. + +package stat + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:151:1: + ALLPERMS = 4095 // stat.h:153:1: + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + DEFFILEMODE = 438 // stat.h:155:1: + DST_AUST = 2 // time.h:78:1: + DST_CAN = 6 // time.h:82:1: + DST_EET = 5 // time.h:81:1: + DST_MET = 4 // time.h:80:1: + DST_NONE = 0 // time.h:76:1: + DST_USA = 1 // time.h:77:1: + DST_WET = 3 // time.h:79:1: + FD_SETSIZE = 1024 // select.h:62:1: + ITIMER_PROF = 2 // time.h:146:1: + ITIMER_REAL = 0 // time.h:144:1: + ITIMER_VIRTUAL = 1 // time.h:145:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + NBBY = 8 // select.h:111:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + SF_APPEND = 0x00040000 // stat.h:175:1: + SF_ARCHIVED = 0x00010000 // stat.h:173:1: + SF_IMMUTABLE = 0x00020000 // stat.h:174:1: + SF_SETTABLE = 0xffff0000 // stat.h:172:1: + S_BLKSIZE = 512 // stat.h:157:1: + S_IEXEC = 64 // stat.h:108:1: + S_IFBLK = 0060000 // stat.h:126:1: + S_IFCHR = 0020000 // stat.h:124:1: + S_IFDIR = 0040000 // stat.h:125:1: + S_IFIFO = 0010000 // stat.h:123:1: + S_IFLNK = 0120000 // stat.h:128:1: + S_IFMT = 0170000 // stat.h:122:1: + S_IFREG = 0100000 // stat.h:127:1: + S_IFSOCK = 0140000 // stat.h:129:1: + S_IREAD = 256 // stat.h:106:1: + S_IRGRP = 0000040 // stat.h:112:1: + S_IROTH = 0000004 // stat.h:117:1: + S_IRUSR = 0000400 // stat.h:101:1: + S_IRWXG = 0000070 // stat.h:111:1: + S_IRWXO = 0000007 // stat.h:116:1: + S_IRWXU = 0000700 // stat.h:100:1: + S_ISGID = 0002000 // stat.h:95:1: + S_ISTXT = 0001000 // stat.h:97:1: + S_ISUID = 0004000 // stat.h:94:1: + S_ISVTX = 0001000 // stat.h:130:1: + S_IWGRP = 0000020 // stat.h:113:1: + S_IWOTH = 0000002 // stat.h:118:1: + S_IWRITE = 128 // stat.h:107:1: + S_IWUSR = 0000200 // stat.h:102:1: + S_IXGRP = 0000010 // stat.h:114:1: + S_IXOTH = 0000001 // stat.h:119:1: + S_IXUSR = 0000100 // stat.h:103:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + UF_APPEND = 0x00000004 // stat.h:167:1: + UF_IMMUTABLE = 0x00000002 // stat.h:166:1: + UF_NODUMP = 0x00000001 // stat.h:165:1: + UF_OPAQUE = 0x00000008 // stat.h:168:1: + UF_SETTABLE = 0x0000ffff // stat.h:164:1: + UTIME_NOW = -2 // stat.h:188:1: + UTIME_OMIT = -1 // stat.h:189:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SELECT_DEFINED_ = 0 // select.h:126:1: + X_SIGSET_T_DEFINED_ = 0 // select.h:121:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_STAT_H_ = 0 // stat.h:41:1: + X_SYS_TIME_H_ = 0 // time.h:36:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIMESPEC_DECLARED = 0 // select.h:48:1: + X_TIMEVAL_DECLARED = 0 // select.h:40:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $ +// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd 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.9 (Berkeley) 8/17/94 + +// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $ +// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft 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.2 (Berkeley) 7/10/94 + +// $OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther 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 + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* select.h:41:1 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* select.h:49:1 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +// We don't want to pollute the namespace with select(2) internals. +// Non-underscore versions are exposed later #if __BSD_VISIBLE +type X__fd_mask = Uint32_t /* select.h:70:18 */ + +type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */ + +type Fd_set = Fd_set1 /* select.h:76:3 */ + +type Sigset_t = uint32 /* select.h:122:22 */ + +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:72:1 */ + +// Operations on timevals. + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + } +} /* time.h:148:1 */ + +// clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE}) +type Clockinfo = struct { + Fhz int32 + Ftick int32 + Fstathz int32 + Fprofhz int32 +} /* time.h:157:1 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* _time.h:56:1 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:111:1 */ + +type Stat = struct { + Fst_mode Mode_t + Fst_dev Dev_t + Fst_ino Ino_t + Fst_nlink Nlink_t + Fst_uid Uid_t + Fst_gid Gid_t + Fst_rdev Dev_t + Fst_atim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_mtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_ctim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fst_size Off_t + Fst_blocks Blkcnt_t + Fst_blksize Blksize_t + Fst_flags U_int32_t + Fst_gen U_int32_t + F__ccgo_pad1 [4]byte + F__st_birthtim struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* stat.h:45:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/stat_windows_386.go b/vendor/modernc.org/libc/sys/stat/stat_windows_386.go index c62921b4..b02e3b52 100644 --- a/vendor/modernc.org/libc/sys/stat/stat_windows_386.go +++ b/vendor/modernc.org/libc/sys/stat/stat_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys\stat\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys\stat\stat_windows_386.go -pkgname stat', DO NOT EDIT. +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_windows_386.go -pkgname stat', DO NOT EDIT. package stat @@ -15,157 +15,157 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - F_OK = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - R_OK = 4 - S_IEXEC = 64 - S_IFBLK = 12288 - S_IFCHR = 8192 - S_IFDIR = 16384 - S_IFIFO = 4096 - S_IFMT = 61440 - S_IFREG = 32768 - S_IREAD = 256 - S_IRGRP = 32 - S_IROTH = 4 - S_IRUSR = 256 - S_IRWXG = 56 - S_IRWXO = 7 - S_IRWXU = 448 - S_IWGRP = 16 - S_IWOTH = 2 - S_IWRITE = 128 - S_IWUSR = 128 - S_IXGRP = 8 - S_IXOTH = 1 - S_IXUSR = 64 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - W_OK = 2 - X_OK = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_A_ARCH = 0x20 - X_A_HIDDEN = 0x02 - X_A_NORMAL = 0x00 - X_A_RDONLY = 0x01 - X_A_SUBDIR = 0x10 - X_A_SYSTEM = 0x04 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_MEMORY_DEFINED = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_LSEEK = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FINDDATA_T_DEFINED = 0 - X_FSIZE_T_DEFINED = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_STAT = 0 - X_INC_STRING = 0 - X_INC_STRING_S = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IO_H_ = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_NLSCMPERROR = 2147483647 - X_NLSCMP_DEFINED = 0 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_STAT_DEFINED = 0 - X_S_IEXEC = 0x0040 - X_S_IFBLK = 0x3000 - X_S_IFCHR = 0x2000 - X_S_IFDIR = 0x4000 - X_S_IFIFO = 0x1000 - X_S_IFMT = 0xF000 - X_S_IFREG = 0x8000 - X_S_IREAD = 0x0100 - X_S_IRUSR = 256 - X_S_IRWXU = 448 - X_S_IWRITE = 0x0080 - X_S_IWUSR = 128 - X_S_IXUSR = 64 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WConst_return = 0 - X_WFINDDATA_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WIO_DEFINED = 0 - X_WSTAT_DEFINED = 0 - X_WSTRING_DEFINED = 0 - X_WSTRING_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + F_OK = 0 // io.h:182:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + R_OK = 4 // io.h:185:1: + S_IEXEC = 64 // stat.h:141:1: + S_IFBLK = 12288 // stat.h:143:1: + S_IFCHR = 8192 // stat.h:137:1: + S_IFDIR = 16384 // stat.h:136:1: + S_IFIFO = 4096 // stat.h:142:1: + S_IFMT = 61440 // stat.h:135:1: + S_IFREG = 32768 // stat.h:138:1: + S_IREAD = 256 // stat.h:139:1: + S_IRGRP = 32 // stat.h:155:1: + S_IROTH = 4 // stat.h:160:1: + S_IRUSR = 256 // stat.h:152:1: + S_IRWXG = 56 // stat.h:158:1: + S_IRWXO = 7 // stat.h:163:1: + S_IRWXU = 448 // stat.h:149:1: + S_IWGRP = 16 // stat.h:156:1: + S_IWOTH = 2 // stat.h:161:1: + S_IWRITE = 128 // stat.h:140:1: + S_IWUSR = 128 // stat.h:151:1: + S_IXGRP = 8 // stat.h:157:1: + S_IXOTH = 1 // stat.h:162:1: + S_IXUSR = 64 // stat.h:150:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + W_OK = 2 // io.h:184:1: + X_OK = 1 // io.h:183:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_A_ARCH = 0x20 // io.h:156:1: + X_A_HIDDEN = 0x02 // io.h:153:1: + X_A_NORMAL = 0x00 // io.h:151:1: + X_A_RDONLY = 0x01 // io.h:152:1: + X_A_SUBDIR = 0x10 // io.h:155:1: + X_A_SYSTEM = 0x04 // io.h:154:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_MEMORY_DEFINED = 0 // string.h:44:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FINDDATA_T_DEFINED = 0 // io.h:89:1: + X_FSIZE_T_DEFINED = 0 // io.h:30:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_STAT = 0 // stat.h:7:1: + X_INC_STRING = 0 // string.h:7:1: + X_INC_STRING_S = 0 // string_s.h:7:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IO_H_ = 0 // io.h:7:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NLSCMPERROR = 2147483647 // string.h:26:1: + X_NLSCMP_DEFINED = 0 // string.h:25:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_STAT_DEFINED = 0 // _mingw_stat64.h:101:1: + X_S_IEXEC = 0x0040 // stat.h:67:1: + X_S_IFBLK = 0x3000 // stat.h:133:1: + X_S_IFCHR = 0x2000 // stat.h:62:1: + X_S_IFDIR = 0x4000 // stat.h:61:1: + X_S_IFIFO = 0x1000 // stat.h:63:1: + X_S_IFMT = 0xF000 // stat.h:60:1: + X_S_IFREG = 0x8000 // stat.h:64:1: + X_S_IREAD = 0x0100 // stat.h:65:1: + X_S_IRUSR = 256 // stat.h:153:1: + X_S_IRWXU = 448 // stat.h:145:1: + X_S_IWRITE = 0x0080 // stat.h:66:1: + X_S_IWUSR = 128 // stat.h:147:1: + X_S_IXUSR = 64 // stat.h:146:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WConst_return = 0 // string.h:41:1: + X_WFINDDATA_T_DEFINED = 0 // io.h:148:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WIO_DEFINED = 0 // io.h:295:1: + X_WSTAT_DEFINED = 0 // stat.h:125:1: + X_WSTRING_DEFINED = 0 // string.h:129:1: + X_WSTRING_S_DEFINED = 0 // string_s.h:48:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -199,6 +199,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -219,6 +224,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -259,26 +270,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -304,29 +317,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_fsize_t = uint32 /* io.h:29:25 */ type X_finddata32_t = struct { @@ -460,7 +473,7 @@ type Itimerspec = struct { type X_sigset_t = uint32 /* types.h:106:23 */ -type X_stat = struct { +type X_stat32 = struct { Fst_dev X_dev_t Fst_ino X_ino_t Fst_mode uint16 @@ -473,7 +486,7 @@ type X_stat = struct { Fst_atime X__time32_t Fst_mtime X__time32_t Fst_ctime X__time32_t -} /* _mingw_stat64.h:28:3 */ +} /* _mingw_stat64.h:25:3 */ type Stat = struct { Fst_dev X_dev_t @@ -488,7 +501,7 @@ type Stat = struct { Fst_atime Time_t Fst_mtime Time_t Fst_ctime Time_t -} /* _mingw_stat64.h:43:3 */ +} /* _mingw_stat64.h:40:3 */ type X_stati64 = struct { Fst_dev X_dev_t @@ -505,7 +518,7 @@ type X_stati64 = struct { Fst_mtime X__time32_t Fst_ctime X__time32_t F__ccgo_pad3 [4]byte -} /* _mingw_stat64.h:58:3 */ +} /* _mingw_stat64.h:55:3 */ type X_stat64i32 = struct { Fst_dev X_dev_t @@ -520,7 +533,7 @@ type X_stat64i32 = struct { Fst_atime X__time64_t Fst_mtime X__time64_t Fst_ctime X__time64_t -} /* _mingw_stat64.h:72:3 */ +} /* _mingw_stat64.h:69:3 */ type X_stat64 = struct { Fst_dev X_dev_t @@ -536,6 +549,6 @@ type X_stat64 = struct { Fst_atime X__time64_t Fst_mtime X__time64_t Fst_ctime X__time64_t -} /* _mingw_stat64.h:86:3 */ +} /* _mingw_stat64.h:83:3 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go b/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go index b3e96e3d..b8090d4d 100644 --- a/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/types/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/types/types_darwin_amd64.go -pkgname types', DO NOT EDIT. +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_darwin_amd64.go -pkgname types', DO NOT EDIT. package types diff --git a/vendor/modernc.org/libc/sys/types/capi_freebsd_arm.go b/vendor/modernc.org/libc/sys/types/capi_freebsd_arm.go new file mode 100644 index 00000000..5bd6ce5e --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_freebsd_arm.go -pkgname types', DO NOT EDIT. + +package types + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/types/capi_freebsd_arm64.go b/vendor/modernc.org/libc/sys/types/capi_freebsd_arm64.go new file mode 100644 index 00000000..544bfff2 --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_freebsd_amd64.go -pkgname types', DO NOT EDIT. + +package types + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/types/capi_netbsd_arm.go b/vendor/modernc.org/libc/sys/types/capi_netbsd_arm.go new file mode 100644 index 00000000..ee839ab2 --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_netbsd_arm.go -pkgname types', DO NOT EDIT. + +package types + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/types/capi_openbsd_386.go b/vendor/modernc.org/libc/sys/types/capi_openbsd_386.go new file mode 100644 index 00000000..95864f11 --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_openbsd_386.go -pkgname types', DO NOT EDIT. + +package types + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/types/capi_openbsd_arm64.go b/vendor/modernc.org/libc/sys/types/capi_openbsd_arm64.go new file mode 100644 index 00000000..286023eb --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_openbsd_arm64.go -pkgname types', DO NOT EDIT. + +package types + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/types/capi_windows_386.go b/vendor/modernc.org/libc/sys/types/capi_windows_386.go index 9b50442d..0fb3e383 100644 --- a/vendor/modernc.org/libc/sys/types/capi_windows_386.go +++ b/vendor/modernc.org/libc/sys/types/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys\types\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys\types\types_windows_386.go -pkgname types', DO NOT EDIT. +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_windows_386.go -pkgname types', DO NOT EDIT. package types diff --git a/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go b/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go index c1949396..705a04d4 100644 --- a/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go +++ b/vendor/modernc.org/libc/sys/types/types_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys/types/types_darwin_amd64.go -pkgname types', DO NOT EDIT. +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_darwin_amd64.go -pkgname types', DO NOT EDIT. package types @@ -15,86 +15,86 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 - BYTE_ORDER = 1234 - FD_SETSIZE = 1024 - LITTLE_ENDIAN = 1234 - NBBY = 8 - PDP_ENDIAN = 3412 - X_BLKCNT_T = 0 - X_BLKSIZE_T = 0 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_ENDIAN_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CADDR_T = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DEV_T = 0 - X_ERRNO_T = 0 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FSBLKCNT_T = 0 - X_FSFILCNT_T = 0 - X_GID_T = 0 - X_I386__ENDIAN_H_ = 0 - X_ID_T = 0 - X_INO64_T = 0 - X_INO_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_IN_ADDR_T = 0 - X_IN_PORT_T = 0 - X_KEY_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_NLINK_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_OS__OSBYTEORDERI386_H = 0 - X_OS__OSBYTEORDER_H = 0 - X_PID_T = 0 - X_PTHREAD_ATTR_T = 0 - X_PTHREAD_CONDATTR_T = 0 - X_PTHREAD_COND_T = 0 - X_PTHREAD_KEY_T = 0 - X_PTHREAD_MUTEXATTR_T = 0 - X_PTHREAD_MUTEX_T = 0 - X_PTHREAD_ONCE_T = 0 - X_PTHREAD_RWLOCKATTR_T = 0 - X_PTHREAD_RWLOCK_T = 0 - X_PTHREAD_T = 0 - X_QUAD_HIGHWORD = 1 - X_QUAD_LOWWORD = 0 - X_RSIZE_T = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_SUSECONDS_T = 0 - X_SYS_TYPES_H_ = 0 - X_SYS__ENDIAN_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINTPTR_T = 0 - X_USECONDS_T = 0 - X_U_CHAR = 0 - X_U_INT = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_U_LONG = 0 - X_U_SHORT = 0 + BIG_ENDIAN = 4321 // endian.h:94:1: + BYTE_ORDER = 1234 // endian.h:97:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + LITTLE_ENDIAN = 1234 // endian.h:93:1: + NBBY = 8 // types.h:186:1: + PDP_ENDIAN = 3412 // endian.h:95:1: + X_BLKCNT_T = 0 // _blkcnt_t.h:29:1: + X_BLKSIZE_T = 0 // _blksize_t.h:29:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CADDR_T = 0 // _caddr_t.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_ERRNO_T = 0 // _errno_t.h:29:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1: + X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_I386__ENDIAN_H_ = 0 // endian.h:67:1: + X_ID_T = 0 // _id_t.h:29:1: + X_INO64_T = 0 // _ino64_t.h:29:1: + X_INO_T = 0 // _ino_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_IN_ADDR_T = 0 // _in_addr_t.h:29:1: + X_IN_PORT_T = 0 // _in_port_t.h:29:1: + X_KEY_T = 0 // _key_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_NLINK_T = 0 // _nlink_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1: + X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1: + X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1: + X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1: + X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1: + X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1: + X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1: + X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1: + X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1: + X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1: + X_PTHREAD_T = 0 // _pthread_t.h:29:1: + X_QUAD_HIGHWORD = 1 // endian.h:78:1: + X_QUAD_LOWWORD = 0 // endian.h:79:1: + X_RSIZE_T = 0 // _rsize_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_TYPES_H_ = 0 // types.h:70:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_U_CHAR = 0 // _u_char.h:29:1: + X_U_INT = 0 // _u_int.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_U_LONG = 0 // types.h:89:1: + X_U_SHORT = 0 // _u_short.h:29:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/sys/types/types_freebsd_386.go b/vendor/modernc.org/libc/sys/types/types_freebsd_386.go index 0553e1df..cd4e9c10 100644 --- a/vendor/modernc.org/libc/sys/types/types_freebsd_386.go +++ b/vendor/modernc.org/libc/sys/types/types_freebsd_386.go @@ -653,8 +653,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/sys/types/types_freebsd_amd64.go b/vendor/modernc.org/libc/sys/types/types_freebsd_amd64.go index 6c5384ae..6e83c6ad 100644 --- a/vendor/modernc.org/libc/sys/types/types_freebsd_amd64.go +++ b/vendor/modernc.org/libc/sys/types/types_freebsd_amd64.go @@ -15,16 +15,16 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // endian.h:63:1: - BYTE_ORDER = 1234 // endian.h:65:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: FD_SETSIZE = 1024 // select.h:61:1: - LITTLE_ENDIAN = 1234 // endian.h:62:1: - PDP_ENDIAN = 3412 // endian.h:64:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // endian.h:52:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: X_BLKCNT_T_DECLARED = 0 // types.h:90:1: X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // endian.h:55:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: X_CLOCKID_T_DECLARED = 0 // types.h:100:1: @@ -46,7 +46,7 @@ const ( X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: X_IN_PORT_T_DECLARED = 0 // types.h:136:1: X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // endian.h:51:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: X_LP64 = 1 // <predefined>:1:1: X_LSEEK_DECLARED = 0 // types.h:421:1: X_LWPID_T_DECLARED = 0 // types.h:156:1: @@ -57,16 +57,16 @@ const ( X_MODE_T_DECLARED = 0 // types.h:161:1: X_MQD_T_DECLARED = 0 // types.h:227:1: X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF64_T_DECLARED = 0 // types.h:181:1: X_OFF_T_DECLARED = 0 // types.h:176:1: - X_PDP_ENDIAN = 3412 // endian.h:53:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: X_PID_T_DECLARED = 0 // types.h:186:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // endian.h:44:1: - X_QUAD_LOWWORD = 0 // endian.h:45:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: X_RLIM_T_DECLARED = 0 // types.h:193:1: X_SELECT_DECLARED = 0 // select.h:103:1: X_SIGSET_T_DECLARED = 0 // select.h:50:1: @@ -79,6 +79,7 @@ const ( X_SYS_SELECT_H_ = 0 // select.h:35:1: X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: @@ -96,7 +97,7 @@ const ( X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: X_USECONDS_T_DECLARED = 0 // types.h:239:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -371,12 +372,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // Machine type dependent parameters. // - // This file is in the public domain. @@ -416,42 +420,6 @@ type X__float128 = float64 /* <builtin>:47:21 */ // $FreeBSD$ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. Neither the name of the University nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -// SUCH DAMAGE. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> @@ -693,8 +661,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/sys/types/types_freebsd_arm.go b/vendor/modernc.org/libc/sys/types/types_freebsd_arm.go new file mode 100644 index 00000000..7195a841 --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/types_freebsd_arm.go @@ -0,0 +1,1356 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_freebsd_arm.go -pkgname types', DO NOT EDIT. + +package types + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// Machine type dependent parameters. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2001 David E. O'Brien +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 8.1 (Berkeley) 6/10/93 +// $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint32 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint32 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint32 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/types_freebsd_arm64.go b/vendor/modernc.org/libc/sys/types/types_freebsd_arm64.go new file mode 100644 index 00000000..6e83c6ad --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/types_freebsd_arm64.go @@ -0,0 +1,1416 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_freebsd_amd64.go -pkgname types', DO NOT EDIT. + +package types + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// Machine type dependent parameters. +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint64 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint64 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint64 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [16]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/types_linux_386.go b/vendor/modernc.org/libc/sys/types/types_linux_386.go index 98949f0a..df80fd78 100644 --- a/vendor/modernc.org/libc/sys/types/types_linux_386.go +++ b/vendor/modernc.org/libc/sys/types/types_linux_386.go @@ -739,7 +739,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -750,13 +751,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1062,7 +1065,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1109,7 +1113,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1423,18 +1428,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1458,7 +1466,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1470,7 +1479,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 diff --git a/vendor/modernc.org/libc/sys/types/types_linux_amd64.go b/vendor/modernc.org/libc/sys/types/types_linux_amd64.go index d44d25ee..8a758d4c 100644 --- a/vendor/modernc.org/libc/sys/types/types_linux_amd64.go +++ b/vendor/modernc.org/libc/sys/types/types_linux_amd64.go @@ -758,7 +758,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -769,8 +770,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1082,7 +1084,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1129,7 +1132,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1441,18 +1445,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1476,7 +1483,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1488,7 +1496,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 diff --git a/vendor/modernc.org/libc/sys/types/types_linux_arm.go b/vendor/modernc.org/libc/sys/types/types_linux_arm.go index 466d7a19..caa2db85 100644 --- a/vendor/modernc.org/libc/sys/types/types_linux_arm.go +++ b/vendor/modernc.org/libc/sys/types/types_linux_arm.go @@ -797,7 +797,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -808,13 +809,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1121,7 +1124,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1168,7 +1172,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1533,18 +1538,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1568,7 +1576,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1580,7 +1589,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 diff --git a/vendor/modernc.org/libc/sys/types/types_linux_arm64.go b/vendor/modernc.org/libc/sys/types/types_linux_arm64.go index 8efdaee6..40bae7d5 100644 --- a/vendor/modernc.org/libc/sys/types/types_linux_arm64.go +++ b/vendor/modernc.org/libc/sys/types/types_linux_arm64.go @@ -826,7 +826,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -837,8 +838,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1149,7 +1151,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1196,7 +1199,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1541,18 +1545,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -1579,7 +1586,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1591,7 +1599,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/sys/types/types_linux_ppc64le.go b/vendor/modernc.org/libc/sys/types/types_linux_ppc64le.go index db3b7f81..f5423176 100644 --- a/vendor/modernc.org/libc/sys/types/types_linux_ppc64le.go +++ b/vendor/modernc.org/libc/sys/types/types_linux_ppc64le.go @@ -768,7 +768,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -779,8 +780,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1091,7 +1093,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1138,7 +1141,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1450,18 +1454,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1485,7 +1492,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1497,7 +1505,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/sys/types/types_linux_riscv64.go b/vendor/modernc.org/libc/sys/types/types_linux_riscv64.go index f59fb019..5cb12c9e 100644 --- a/vendor/modernc.org/libc/sys/types/types_linux_riscv64.go +++ b/vendor/modernc.org/libc/sys/types/types_linux_riscv64.go @@ -930,7 +930,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -941,8 +942,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1253,7 +1255,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1300,7 +1303,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1618,9 +1622,10 @@ type X__pthread_mutex_s = struct { // <https://www.gnu.org/licenses/>. // There is a lot of padding in this structure. While it's not strictly -// necessary on RISC-V, we're going to leave it in to be on the safe side in -// case it's needed in the future. Most other architectures have the padding, -// so this gives us the same extensibility as everyone else has. +// +// necessary on RISC-V, we're going to leave it in to be on the safe side in +// case it's needed in the future. Most other architectures have the padding, +// so this gives us the same extensibility as everyone else has. type X__pthread_rwlock_arch_t = struct { F__readers uint32 F__writers uint32 @@ -1654,18 +1659,21 @@ type X__thrd_t = uint64 /* thread-shared-types.h:120:27 */ type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:125:3 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1689,7 +1697,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1701,7 +1710,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/sys/types/types_linux_s390x.go b/vendor/modernc.org/libc/sys/types/types_linux_s390x.go index 3f66eb72..db4cebba 100644 --- a/vendor/modernc.org/libc/sys/types/types_linux_s390x.go +++ b/vendor/modernc.org/libc/sys/types/types_linux_s390x.go @@ -757,7 +757,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -768,8 +769,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1080,7 +1082,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1127,7 +1130,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1438,18 +1442,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1473,7 +1480,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1485,7 +1493,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 diff --git a/vendor/modernc.org/libc/sys/types/types_netbsd_arm.go b/vendor/modernc.org/libc/sys/types/types_netbsd_arm.go new file mode 100644 index 00000000..d53b5b53 --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/types_netbsd_arm.go @@ -0,0 +1,1338 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_netbsd_arm.go -pkgname types', DO NOT EDIT. + +package types + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/types_openbsd_386.go b/vendor/modernc.org/libc/sys/types/types_openbsd_386.go new file mode 100644 index 00000000..2e1e92ca --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/types_openbsd_386.go @@ -0,0 +1,641 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_openbsd_386.go -pkgname types', DO NOT EDIT. + +package types + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go b/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go index 09b37cb2..c7a4ff34 100644 --- a/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go +++ b/vendor/modernc.org/libc/sys/types/types_openbsd_amd64.go @@ -21,8 +21,8 @@ const ( PDP_ENDIAN = 3412 // endian.h:46:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -34,27 +34,27 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: X_UINT8_T_DEFINED_ = 0 // types.h:79:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -75,7 +75,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* <builtin>:46:14 */ type X__float128 = float64 /* <builtin>:47:21 */ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -372,7 +372,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -532,18 +532,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -625,27 +624,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/sys/types/types_openbsd_arm64.go b/vendor/modernc.org/libc/sys/types/types_openbsd_arm64.go new file mode 100644 index 00000000..5a43fdda --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/types_openbsd_arm64.go @@ -0,0 +1,648 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_openbsd_arm64.go -pkgname types', DO NOT EDIT. + +package types + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/types_windows_386.go b/vendor/modernc.org/libc/sys/types/types_windows_386.go index 37fddc7a..fd2bdee5 100644 --- a/vendor/modernc.org/libc/sys/types/types_windows_386.go +++ b/vendor/modernc.org/libc/sys/types/types_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo sys\types\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o sys\types\types_windows_386.go -pkgname types', DO NOT EDIT. +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_windows_386.go -pkgname types', DO NOT EDIT. package types @@ -15,95 +15,95 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -137,6 +137,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -157,6 +162,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -197,26 +208,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -242,29 +255,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_ino_t = uint16 /* types.h:43:24 */ type Ino_t = uint16 /* types.h:45:24 */ diff --git a/vendor/modernc.org/libc/termios/capi_darwin_amd64.go b/vendor/modernc.org/libc/termios/capi_darwin_amd64.go index d6981189..32f78c41 100644 --- a/vendor/modernc.org/libc/termios/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/termios/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o termios/termios_darwin_amd64.go -pkgname termios', DO NOT EDIT. +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_darwin_amd64.go -pkgname termios', DO NOT EDIT. package termios diff --git a/vendor/modernc.org/libc/termios/capi_freebsd_arm.go b/vendor/modernc.org/libc/termios/capi_freebsd_arm.go new file mode 100644 index 00000000..88998484 --- /dev/null +++ b/vendor/modernc.org/libc/termios/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_freebsd_arm.go -pkgname termios', DO NOT EDIT. + +package termios + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/termios/capi_freebsd_arm64.go b/vendor/modernc.org/libc/termios/capi_freebsd_arm64.go new file mode 100644 index 00000000..db09804d --- /dev/null +++ b/vendor/modernc.org/libc/termios/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_freebsd_amd64.go -pkgname termios', DO NOT EDIT. + +package termios + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/termios/capi_netbsd_arm.go b/vendor/modernc.org/libc/termios/capi_netbsd_arm.go new file mode 100644 index 00000000..91d58fbc --- /dev/null +++ b/vendor/modernc.org/libc/termios/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_netbsd_arm.go -pkgname termios', DO NOT EDIT. + +package termios + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/termios/capi_openbsd_386.go b/vendor/modernc.org/libc/termios/capi_openbsd_386.go new file mode 100644 index 00000000..c0305187 --- /dev/null +++ b/vendor/modernc.org/libc/termios/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_openbsd_386.go -pkgname termios', DO NOT EDIT. + +package termios + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/termios/capi_openbsd_arm64.go b/vendor/modernc.org/libc/termios/capi_openbsd_arm64.go new file mode 100644 index 00000000..c81df665 --- /dev/null +++ b/vendor/modernc.org/libc/termios/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_openbsd_arm64.go -pkgname termios', DO NOT EDIT. + +package termios + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/termios/termios_darwin_amd64.go b/vendor/modernc.org/libc/termios/termios_darwin_amd64.go index 9172c98d..82928beb 100644 --- a/vendor/modernc.org/libc/termios/termios_darwin_amd64.go +++ b/vendor/modernc.org/libc/termios/termios_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o termios/termios_darwin_amd64.go -pkgname termios', DO NOT EDIT. +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_darwin_amd64.go -pkgname termios', DO NOT EDIT. package termios @@ -15,214 +15,214 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ALTWERASE = 0x00000200 - B0 = 0 - B110 = 110 - B115200 = 115200 - B1200 = 1200 - B134 = 134 - B14400 = 14400 - B150 = 150 - B1800 = 1800 - B19200 = 19200 - B200 = 200 - B230400 = 230400 - B2400 = 2400 - B28800 = 28800 - B300 = 300 - B38400 = 38400 - B4800 = 4800 - B50 = 50 - B57600 = 57600 - B600 = 600 - B7200 = 7200 - B75 = 75 - B76800 = 76800 - B9600 = 9600 - BRKINT = 0x00000002 - BS0 = 0x00000000 - BS1 = 0x00008000 - BSDLY = 0x00008000 - CBRK = 255 - CCAR_OFLOW = 0x00100000 - CCTS_OFLOW = 0x00010000 - CDISCARD = 15 - CDSR_OFLOW = 0x00080000 - CDSUSP = 25 - CDTR_IFLOW = 0x00040000 - CEOF = 4 - CEOL = 0xff - CEOT = 4 - CERASE = 0177 - CFLUSH = 15 - CIGNORE = 0x00000001 - CINTR = 3 - CKILL = 21 - CLNEXT = 22 - CLOCAL = 0x00008000 - CMIN = 1 - CQUIT = 034 - CR0 = 0x00000000 - CR1 = 0x00001000 - CR2 = 0x00002000 - CR3 = 0x00003000 - CRDLY = 0x00003000 - CREAD = 0x00000800 - CREPRINT = 18 - CRPRNT = 18 - CRTSCTS = 196608 - CRTS_IFLOW = 0x00020000 - CS5 = 0x00000000 - CS6 = 0x00000100 - CS7 = 0x00000200 - CS8 = 0x00000300 - CSIZE = 0x00000300 - CSTART = 17 - CSTATUS = 20 - CSTOP = 19 - CSTOPB = 0x00000400 - CSUSP = 26 - CTIME = 0 - CWERASE = 23 - ECHO = 0x00000008 - ECHOCTL = 0x00000040 - ECHOE = 0x00000002 - ECHOK = 0x00000004 - ECHOKE = 0x00000001 - ECHONL = 0x00000010 - ECHOPRT = 0x00000020 - EXTA = 19200 - EXTB = 38400 - EXTPROC = 0x00000800 - FF0 = 0x00000000 - FF1 = 0x00004000 - FFDLY = 0x00004000 - FLUSHO = 0x00800000 - HUPCL = 0x00004000 - ICANON = 0x00000100 - ICRNL = 0x00000100 - IEXTEN = 0x00000400 - IGNBRK = 0x00000001 - IGNCR = 0x00000080 - IGNPAR = 0x00000004 - IMAXBEL = 0x00002000 - INLCR = 0x00000040 - INPCK = 0x00000010 - IOCPARM_MASK = 0x1fff - IOCPARM_MAX = 8192 - ISIG = 0x00000080 - ISTRIP = 0x00000020 - IUTF8 = 0x00004000 - IXANY = 0x00000800 - IXOFF = 0x00000400 - IXON = 0x00000200 - MDMBUF = 0x00100000 - NCCS = 20 - NL0 = 0x00000000 - NL1 = 0x00000100 - NL2 = 0x00000200 - NL3 = 0x00000300 - NLDLY = 0x00000300 - NOFLSH = 0x80000000 - NOKERNINFO = 0x02000000 - OCRNL = 0x00000010 - OFDEL = 0x00020000 - OFILL = 0x00000080 - ONLCR = 0x00000002 - ONLRET = 0x00000040 - ONOCR = 0x00000020 - ONOEOT = 0x00000008 - OPOST = 0x00000001 - OXTABS = 0x00000004 - PARENB = 0x00001000 - PARMRK = 0x00000008 - PARODD = 0x00002000 - PENDIN = 0x20000000 - PPPDISC = 5 - SLIPDISC = 4 - TAB0 = 0x00000000 - TAB1 = 0x00000400 - TAB2 = 0x00000800 - TAB3 = 0x00000004 - TABDLY = 0x00000c04 - TABLDISC = 3 - TCIFLUSH = 1 - TCIOFF = 3 - TCIOFLUSH = 3 - TCION = 4 - TCOFLUSH = 2 - TCOOFF = 1 - TCOON = 2 - TCSADRAIN = 1 - TCSAFLUSH = 2 - TCSANOW = 0 - TCSASOFT = 0x10 - TIOCM_CAR = 0100 - TIOCM_CD = 64 - TIOCM_CTS = 0040 - TIOCM_DSR = 0400 - TIOCM_DTR = 0002 - TIOCM_LE = 0001 - TIOCM_RI = 128 - TIOCM_RNG = 0200 - TIOCM_RTS = 0004 - TIOCM_SR = 0020 - TIOCM_ST = 0010 - TIOCPKT_DATA = 0x00 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x01 - TIOCPKT_FLUSHWRITE = 0x02 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x08 - TIOCPKT_STOP = 0x04 - TOSTOP = 0x00400000 - TTYDEF_CFLAG = 19200 - TTYDEF_IFLAG = 11010 - TTYDEF_LFLAG = 1483 - TTYDEF_OFLAG = 3 - TTYDEF_SPEED = 9600 - TTYDISC = 0 - VDISCARD = 15 - VDSUSP = 11 - VEOF = 0 - VEOL = 1 - VEOL2 = 2 - VERASE = 3 - VINTR = 8 - VKILL = 5 - VLNEXT = 14 - VMIN = 16 - VQUIT = 9 - VREPRINT = 6 - VSTART = 12 - VSTATUS = 18 - VSTOP = 13 - VSUSP = 10 - VT0 = 0x00000000 - VT1 = 0x00010000 - VTDLY = 0x00010000 - VTIME = 17 - VWERASE = 4 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_PID_T = 0 - X_SYS_IOCCOM_H_ = 0 - X_SYS_TERMIOS_H_ = 0 - X_SYS_TTYCOM_H_ = 0 - X_SYS_TTYDEFAULTS_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 + ALTWERASE = 0x00000200 // termios.h:249:1: + B0 = 0 // termios.h:291:1: + B110 = 110 // termios.h:294:1: + B115200 = 115200 // termios.h:313:1: + B1200 = 1200 // termios.h:300:1: + B134 = 134 // termios.h:295:1: + B14400 = 14400 // termios.h:309:1: + B150 = 150 // termios.h:296:1: + B1800 = 1800 // termios.h:301:1: + B19200 = 19200 // termios.h:305:1: + B200 = 200 // termios.h:297:1: + B230400 = 230400 // termios.h:314:1: + B2400 = 2400 // termios.h:302:1: + B28800 = 28800 // termios.h:310:1: + B300 = 300 // termios.h:298:1: + B38400 = 38400 // termios.h:306:1: + B4800 = 4800 // termios.h:303:1: + B50 = 50 // termios.h:292:1: + B57600 = 57600 // termios.h:311:1: + B600 = 600 // termios.h:299:1: + B7200 = 7200 // termios.h:308:1: + B75 = 75 // termios.h:293:1: + B76800 = 76800 // termios.h:312:1: + B9600 = 9600 // termios.h:304:1: + BRKINT = 0x00000002 // termios.h:120:1: + BS0 = 0x00000000 // termios.h:190:1: + BS1 = 0x00008000 // termios.h:191:1: + BSDLY = 0x00008000 // termios.h:159:1: + CBRK = 255 // ttydefaults.h:107:1: + CCAR_OFLOW = 0x00100000 // termios.h:222:1: + CCTS_OFLOW = 0x00010000 // termios.h:217:1: + CDISCARD = 15 // ttydefaults.h:102:1: + CDSR_OFLOW = 0x00080000 // termios.h:221:1: + CDSUSP = 25 // ttydefaults.h:98:1: + CDTR_IFLOW = 0x00040000 // termios.h:220:1: + CEOF = 4 // ttydefaults.h:88:1: + CEOL = 0xff // ttydefaults.h:89:1: + CEOT = 4 // ttydefaults.h:105:1: + CERASE = 0177 // ttydefaults.h:90:1: + CFLUSH = 15 // ttydefaults.h:109:1: + CIGNORE = 0x00000001 // termios.h:203:1: + CINTR = 3 // ttydefaults.h:91:1: + CKILL = 21 // ttydefaults.h:93:1: + CLNEXT = 22 // ttydefaults.h:101:1: + CLOCAL = 0x00008000 // termios.h:215:1: + CMIN = 1 // ttydefaults.h:94:1: + CQUIT = 034 // ttydefaults.h:95:1: + CR0 = 0x00000000 // termios.h:184:1: + CR1 = 0x00001000 // termios.h:185:1: + CR2 = 0x00002000 // termios.h:186:1: + CR3 = 0x00003000 // termios.h:187:1: + CRDLY = 0x00003000 // termios.h:157:1: + CREAD = 0x00000800 // termios.h:211:1: + CREPRINT = 18 // ttydefaults.h:104:1: + CRPRNT = 18 // ttydefaults.h:108:1: + CRTSCTS = 196608 // termios.h:218:1: + CRTS_IFLOW = 0x00020000 // termios.h:219:1: + CS5 = 0x00000000 // termios.h:206:1: + CS6 = 0x00000100 // termios.h:207:1: + CS7 = 0x00000200 // termios.h:208:1: + CS8 = 0x00000300 // termios.h:209:1: + CSIZE = 0x00000300 // termios.h:205:1: + CSTART = 17 // ttydefaults.h:99:1: + CSTATUS = 20 // ttydefaults.h:92:1: + CSTOP = 19 // ttydefaults.h:100:1: + CSTOPB = 0x00000400 // termios.h:210:1: + CSUSP = 26 // ttydefaults.h:96:1: + CTIME = 0 // ttydefaults.h:97:1: + CWERASE = 23 // ttydefaults.h:103:1: + ECHO = 0x00000008 // termios.h:240:1: + ECHOCTL = 0x00000040 // termios.h:244:1: + ECHOE = 0x00000002 // termios.h:238:1: + ECHOK = 0x00000004 // termios.h:239:1: + ECHOKE = 0x00000001 // termios.h:236:1: + ECHONL = 0x00000010 // termios.h:241:1: + ECHOPRT = 0x00000020 // termios.h:243:1: + EXTA = 19200 // termios.h:315:1: + EXTB = 38400 // termios.h:316:1: + EXTPROC = 0x00000800 // termios.h:253:1: + FF0 = 0x00000000 // termios.h:188:1: + FF1 = 0x00004000 // termios.h:189:1: + FFDLY = 0x00004000 // termios.h:158:1: + FLUSHO = 0x00800000 // termios.h:257:1: + HUPCL = 0x00004000 // termios.h:214:1: + ICANON = 0x00000100 // termios.h:247:1: + ICRNL = 0x00000100 // termios.h:127:1: + IEXTEN = 0x00000400 // termios.h:251:1: + IGNBRK = 0x00000001 // termios.h:119:1: + IGNCR = 0x00000080 // termios.h:126:1: + IGNPAR = 0x00000004 // termios.h:121:1: + IMAXBEL = 0x00002000 // termios.h:132:1: + INLCR = 0x00000040 // termios.h:125:1: + INPCK = 0x00000010 // termios.h:123:1: + IOCPARM_MASK = 0x1fff // ioccom.h:74:1: + IOCPARM_MAX = 8192 // ioccom.h:79:1: + ISIG = 0x00000080 // termios.h:246:1: + ISTRIP = 0x00000020 // termios.h:124:1: + IUTF8 = 0x00004000 // termios.h:133:1: + IXANY = 0x00000800 // termios.h:130:1: + IXOFF = 0x00000400 // termios.h:129:1: + IXON = 0x00000200 // termios.h:128:1: + MDMBUF = 0x00100000 // termios.h:223:1: + NCCS = 20 // termios.h:108:1: + NL0 = 0x00000000 // termios.h:173:1: + NL1 = 0x00000100 // termios.h:174:1: + NL2 = 0x00000200 // termios.h:176:1: + NL3 = 0x00000300 // termios.h:177:1: + NLDLY = 0x00000300 // termios.h:155:1: + NOFLSH = 0x80000000 // termios.h:261:1: + NOKERNINFO = 0x02000000 // termios.h:258:1: + OCRNL = 0x00000010 // termios.h:151:1: + OFDEL = 0x00020000 // termios.h:161:1: + OFILL = 0x00000080 // termios.h:154:1: + ONLCR = 0x00000002 // termios.h:140:1: + ONLRET = 0x00000040 // termios.h:153:1: + ONOCR = 0x00000020 // termios.h:152:1: + ONOEOT = 0x00000008 // termios.h:143:1: + OPOST = 0x00000001 // termios.h:139:1: + OXTABS = 0x00000004 // termios.h:142:1: + PARENB = 0x00001000 // termios.h:212:1: + PARMRK = 0x00000008 // termios.h:122:1: + PARODD = 0x00002000 // termios.h:213:1: + PENDIN = 0x20000000 // termios.h:259:1: + PPPDISC = 5 // ttycom.h:171:1: + SLIPDISC = 4 // ttycom.h:170:1: + TAB0 = 0x00000000 // termios.h:179:1: + TAB1 = 0x00000400 // termios.h:180:1: + TAB2 = 0x00000800 // termios.h:181:1: + TAB3 = 0x00000004 // termios.h:183:1: + TABDLY = 0x00000c04 // termios.h:156:1: + TABLDISC = 3 // ttycom.h:169:1: + TCIFLUSH = 1 // termios.h:320:1: + TCIOFF = 3 // termios.h:325:1: + TCIOFLUSH = 3 // termios.h:322:1: + TCION = 4 // termios.h:326:1: + TCOFLUSH = 2 // termios.h:321:1: + TCOOFF = 1 // termios.h:323:1: + TCOON = 2 // termios.h:324:1: + TCSADRAIN = 1 // termios.h:282:1: + TCSAFLUSH = 2 // termios.h:283:1: + TCSANOW = 0 // termios.h:281:1: + TCSASOFT = 0x10 // termios.h:285:1: + TIOCM_CAR = 0100 // ttycom.h:97:1: + TIOCM_CD = 64 // ttycom.h:98:1: + TIOCM_CTS = 0040 // ttycom.h:96:1: + TIOCM_DSR = 0400 // ttycom.h:101:1: + TIOCM_DTR = 0002 // ttycom.h:92:1: + TIOCM_LE = 0001 // ttycom.h:91:1: + TIOCM_RI = 128 // ttycom.h:100:1: + TIOCM_RNG = 0200 // ttycom.h:99:1: + TIOCM_RTS = 0004 // ttycom.h:93:1: + TIOCM_SR = 0020 // ttycom.h:95:1: + TIOCM_ST = 0010 // ttycom.h:94:1: + TIOCPKT_DATA = 0x00 // ttycom.h:128:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:134:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:129:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:130:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:135:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:133:1: + TIOCPKT_START = 0x08 // ttycom.h:132:1: + TIOCPKT_STOP = 0x04 // ttycom.h:131:1: + TOSTOP = 0x00400000 // termios.h:255:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:81:1: + TTYDEF_IFLAG = 11010 // ttydefaults.h:78:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:80:1: + TTYDEF_OFLAG = 3 // ttydefaults.h:79:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:82:1: + TTYDISC = 0 // ttycom.h:168:1: + VDISCARD = 15 // termios.h:100:1: + VDSUSP = 11 // termios.h:94:1: + VEOF = 0 // termios.h:76:1: + VEOL = 1 // termios.h:77:1: + VEOL2 = 2 // termios.h:79:1: + VERASE = 3 // termios.h:81:1: + VINTR = 8 // termios.h:90:1: + VKILL = 5 // termios.h:85:1: + VLNEXT = 14 // termios.h:99:1: + VMIN = 16 // termios.h:102:1: + VQUIT = 9 // termios.h:91:1: + VREPRINT = 6 // termios.h:87:1: + VSTART = 12 // termios.h:96:1: + VSTATUS = 18 // termios.h:105:1: + VSTOP = 13 // termios.h:97:1: + VSUSP = 10 // termios.h:92:1: + VT0 = 0x00000000 // termios.h:192:1: + VT1 = 0x00010000 // termios.h:193:1: + VTDLY = 0x00010000 // termios.h:160:1: + VTIME = 17 // termios.h:103:1: + VWERASE = 4 // termios.h:83:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_LP64 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_SYS_IOCCOM_H_ = 0 // ioccom.h:65:1: + X_SYS_TERMIOS_H_ = 0 // termios.h:65:1: + X_SYS_TTYCOM_H_ = 0 // ttycom.h:70:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:73:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/termios/termios_freebsd_386.go b/vendor/modernc.org/libc/termios/termios_freebsd_386.go index 121ec4cd..963133a1 100644 --- a/vendor/modernc.org/libc/termios/termios_freebsd_386.go +++ b/vendor/modernc.org/libc/termios/termios_freebsd_386.go @@ -802,8 +802,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/termios/termios_freebsd_amd64.go b/vendor/modernc.org/libc/termios/termios_freebsd_amd64.go index 3ec1dce3..96ebf0b0 100644 --- a/vendor/modernc.org/libc/termios/termios_freebsd_amd64.go +++ b/vendor/modernc.org/libc/termios/termios_freebsd_amd64.go @@ -17,29 +17,37 @@ var _ unsafe.Pointer const ( ALTWERASE = 0x00000200 // _termios.h:171:1: B0 = 0 // _termios.h:186:1: + B1000000 = 1000000 // _termios.h:213:1: B110 = 110 // _termios.h:189:1: B115200 = 115200 // _termios.h:208:1: B1200 = 1200 // _termios.h:195:1: B134 = 134 // _termios.h:190:1: B14400 = 14400 // _termios.h:204:1: B150 = 150 // _termios.h:191:1: + B1500000 = 1500000 // _termios.h:214:1: B1800 = 1800 // _termios.h:196:1: B19200 = 19200 // _termios.h:200:1: B200 = 200 // _termios.h:192:1: + B2000000 = 2000000 // _termios.h:215:1: B230400 = 230400 // _termios.h:209:1: B2400 = 2400 // _termios.h:197:1: + B2500000 = 2500000 // _termios.h:216:1: B28800 = 28800 // _termios.h:205:1: B300 = 300 // _termios.h:193:1: + B3000000 = 3000000 // _termios.h:217:1: + B3500000 = 3500000 // _termios.h:218:1: B38400 = 38400 // _termios.h:201:1: + B4000000 = 4000000 // _termios.h:219:1: B460800 = 460800 // _termios.h:210:1: B4800 = 4800 // _termios.h:198:1: B50 = 50 // _termios.h:187:1: + B500000 = 500000 // _termios.h:211:1: B57600 = 57600 // _termios.h:206:1: B600 = 600 // _termios.h:194:1: B7200 = 7200 // _termios.h:203:1: B75 = 75 // _termios.h:188:1: B76800 = 76800 // _termios.h:207:1: - B921600 = 921600 // _termios.h:211:1: + B921600 = 921600 // _termios.h:212:1: B9600 = 9600 // _termios.h:199:1: BRKINT = 0x00000002 // _termios.h:86:1: CBRK = 255 // ttydefaults.h:89:1: @@ -87,8 +95,8 @@ const ( ECHOKE = 0x00000001 // _termios.h:158:1: ECHONL = 0x00000010 // _termios.h:163:1: ECHOPRT = 0x00000020 // _termios.h:165:1: - EXTA = 19200 // _termios.h:212:1: - EXTB = 38400 // _termios.h:213:1: + EXTA = 19200 // _termios.h:220:1: + EXTB = 38400 // _termios.h:221:1: EXTPROC = 0x00000800 // _termios.h:174:1: FLUSHO = 0x00800000 // _termios.h:177:1: H4DISC = 7 // ttycom.h:135:1: @@ -199,9 +207,9 @@ const ( X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_PID_T_DECLARED = 0 // termios.h:47:1: X_POSIX_VDISABLE = 0xff // _termios.h:80:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: @@ -212,7 +220,7 @@ const ( X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_SYS__WINSIZE_H_ = 0 // _winsize.h:36:1: X_TERMIOS_H_ = 0 // termios.h:36:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -482,12 +490,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-3-Clause // @@ -543,9 +554,9 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Standard speeds -type Tcflag_t = uint32 /* _termios.h:216:22 */ -type Cc_t = uint8 /* _termios.h:217:23 */ -type Speed_t = uint32 /* _termios.h:218:22 */ +type Tcflag_t = uint32 /* _termios.h:224:22 */ +type Cc_t = uint8 /* _termios.h:225:23 */ +type Speed_t = uint32 /* _termios.h:226:22 */ type Termios = struct { Fc_iflag Tcflag_t @@ -555,7 +566,7 @@ type Termios = struct { Fc_cc [20]Cc_t Fc_ispeed Speed_t Fc_ospeed Speed_t -} /* _termios.h:220:1 */ +} /* _termios.h:228:1 */ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -799,8 +810,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/termios/termios_freebsd_arm.go b/vendor/modernc.org/libc/termios/termios_freebsd_arm.go new file mode 100644 index 00000000..cc195699 --- /dev/null +++ b/vendor/modernc.org/libc/termios/termios_freebsd_arm.go @@ -0,0 +1,951 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_freebsd_arm.go -pkgname termios', DO NOT EDIT. + +package termios + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ALTWERASE = 0x00000200 // _termios.h:171:1: + B0 = 0 // _termios.h:186:1: + B1000000 = 1000000 // _termios.h:213:1: + B110 = 110 // _termios.h:189:1: + B115200 = 115200 // _termios.h:208:1: + B1200 = 1200 // _termios.h:195:1: + B134 = 134 // _termios.h:190:1: + B14400 = 14400 // _termios.h:204:1: + B150 = 150 // _termios.h:191:1: + B1500000 = 1500000 // _termios.h:214:1: + B1800 = 1800 // _termios.h:196:1: + B19200 = 19200 // _termios.h:200:1: + B200 = 200 // _termios.h:192:1: + B2000000 = 2000000 // _termios.h:215:1: + B230400 = 230400 // _termios.h:209:1: + B2400 = 2400 // _termios.h:197:1: + B2500000 = 2500000 // _termios.h:216:1: + B28800 = 28800 // _termios.h:205:1: + B300 = 300 // _termios.h:193:1: + B3000000 = 3000000 // _termios.h:217:1: + B3500000 = 3500000 // _termios.h:218:1: + B38400 = 38400 // _termios.h:201:1: + B4000000 = 4000000 // _termios.h:219:1: + B460800 = 460800 // _termios.h:210:1: + B4800 = 4800 // _termios.h:198:1: + B50 = 50 // _termios.h:187:1: + B500000 = 500000 // _termios.h:211:1: + B57600 = 57600 // _termios.h:206:1: + B600 = 600 // _termios.h:194:1: + B7200 = 7200 // _termios.h:203:1: + B75 = 75 // _termios.h:188:1: + B76800 = 76800 // _termios.h:207:1: + B921600 = 921600 // _termios.h:212:1: + B9600 = 9600 // _termios.h:199:1: + BRKINT = 0x00000002 // _termios.h:86:1: + CBRK = 255 // ttydefaults.h:89:1: + CCAR_OFLOW = 0x00100000 // _termios.h:145:1: + CCTS_OFLOW = 0x00010000 // _termios.h:140:1: + CDISCARD = 15 // ttydefaults.h:84:1: + CDSR_OFLOW = 0x00080000 // _termios.h:144:1: + CDSUSP = 25 // ttydefaults.h:80:1: + CDTR_IFLOW = 0x00040000 // _termios.h:143:1: + CEOF = 4 // ttydefaults.h:69:1: + CEOL = 0xff // ttydefaults.h:70:1: + CEOT = 4 // ttydefaults.h:87:1: + CERASE = 127 // ttydefaults.h:71:1: + CERASE2 = 8 // ttydefaults.h:72:1: + CFLUSH = 15 // ttydefaults.h:91:1: + CIGNORE = 0x00000001 // _termios.h:126:1: + CINTR = 3 // ttydefaults.h:73:1: + CKILL = 21 // ttydefaults.h:75:1: + CLNEXT = 22 // ttydefaults.h:83:1: + CLOCAL = 0x00008000 // _termios.h:138:1: + CMIN = 1 // ttydefaults.h:76:1: + CNO_RTSDTR = 0x00200000 // _termios.h:146:1: + CQUIT = 28 // ttydefaults.h:77:1: + CREAD = 0x00000800 // _termios.h:134:1: + CREPRINT = 18 // ttydefaults.h:86:1: + CRPRNT = 18 // ttydefaults.h:90:1: + CRTSCTS = 196608 // _termios.h:141:1: + CRTS_IFLOW = 0x00020000 // _termios.h:142:1: + CS5 = 0x00000000 // _termios.h:129:1: + CS6 = 0x00000100 // _termios.h:130:1: + CS7 = 0x00000200 // _termios.h:131:1: + CS8 = 0x00000300 // _termios.h:132:1: + CSIZE = 0x00000300 // _termios.h:128:1: + CSTART = 17 // ttydefaults.h:81:1: + CSTATUS = 20 // ttydefaults.h:74:1: + CSTOP = 19 // ttydefaults.h:82:1: + CSTOPB = 0x00000400 // _termios.h:133:1: + CSUSP = 26 // ttydefaults.h:78:1: + CTIME = 0 // ttydefaults.h:79:1: + CWERASE = 23 // ttydefaults.h:85:1: + ECHO = 0x00000008 // _termios.h:162:1: + ECHOCTL = 0x00000040 // _termios.h:166:1: + ECHOE = 0x00000002 // _termios.h:160:1: + ECHOK = 0x00000004 // _termios.h:161:1: + ECHOKE = 0x00000001 // _termios.h:158:1: + ECHONL = 0x00000010 // _termios.h:163:1: + ECHOPRT = 0x00000020 // _termios.h:165:1: + EXTA = 19200 // _termios.h:220:1: + EXTB = 38400 // _termios.h:221:1: + EXTPROC = 0x00000800 // _termios.h:174:1: + FLUSHO = 0x00800000 // _termios.h:177:1: + H4DISC = 7 // ttycom.h:135:1: + HUPCL = 0x00004000 // _termios.h:137:1: + ICANON = 0x00000100 // _termios.h:169:1: + ICRNL = 0x00000100 // _termios.h:93:1: + IEXTEN = 0x00000400 // _termios.h:173:1: + IGNBRK = 0x00000001 // _termios.h:85:1: + IGNCR = 0x00000080 // _termios.h:92:1: + IGNPAR = 0x00000004 // _termios.h:87:1: + IMAXBEL = 0x00002000 // _termios.h:100:1: + INLCR = 0x00000040 // _termios.h:91:1: + INPCK = 0x00000010 // _termios.h:89:1: + IOCPARM_MASK = 8191 // ioccom.h:49:1: + IOCPARM_MAX = 8192 // ioccom.h:54:1: + IOCPARM_SHIFT = 13 // ioccom.h:48:1: + IOC_DIRMASK = 3758096384 // ioccom.h:60:1: + IOC_IN = 0x80000000 // ioccom.h:58:1: + IOC_INOUT = 3221225472 // ioccom.h:59:1: + IOC_OUT = 0x40000000 // ioccom.h:57:1: + IOC_VOID = 0x20000000 // ioccom.h:56:1: + ISIG = 0x00000080 // _termios.h:168:1: + ISTRIP = 0x00000020 // _termios.h:90:1: + IXANY = 0x00000800 // _termios.h:97:1: + IXOFF = 0x00000400 // _termios.h:95:1: + IXON = 0x00000200 // _termios.h:94:1: + MDMBUF = 1048576 // termios.h:52:1: + NCCS = 20 // _termios.h:78:1: + NETGRAPHDISC = 6 // ttycom.h:134:1: + NOFLSH = 0x80000000 // _termios.h:181:1: + NOKERNINFO = 0x02000000 // _termios.h:178:1: + OCRNL = 0x00000010 // _termios.h:117:1: + ONLCR = 0x00000002 // _termios.h:108:1: + ONLRET = 0x00000040 // _termios.h:119:1: + ONOCR = 0x00000020 // _termios.h:118:1: + ONOEOT = 0x00000008 // _termios.h:114:1: + OPOST = 0x00000001 // _termios.h:106:1: + OXTABS = 4 // termios.h:51:1: + PARENB = 0x00001000 // _termios.h:135:1: + PARMRK = 0x00000008 // _termios.h:88:1: + PARODD = 0x00002000 // _termios.h:136:1: + PENDIN = 0x20000000 // _termios.h:179:1: + PPPDISC = 5 // ttycom.h:133:1: + SLIPDISC = 4 // ttycom.h:132:1: + TAB0 = 0x00000000 // _termios.h:112:1: + TAB3 = 0x00000004 // _termios.h:113:1: + TABDLY = 0x00000004 // _termios.h:111:1: + TCIFLUSH = 1 // termios.h:69:1: + TCIOFF = 3 // termios.h:74:1: + TCIOFLUSH = 3 // termios.h:71:1: + TCION = 4 // termios.h:75:1: + TCOFLUSH = 2 // termios.h:70:1: + TCOOFF = 1 // termios.h:72:1: + TCOON = 2 // termios.h:73:1: + TCSADRAIN = 1 // termios.h:63:1: + TCSAFLUSH = 2 // termios.h:64:1: + TCSANOW = 0 // termios.h:62:1: + TCSASOFT = 0x10 // termios.h:66:1: + TIOCM_CAR = 64 // ttycom.h:103:1: + TIOCM_CD = 64 // ttycom.h:102:1: + TIOCM_CTS = 0040 // ttycom.h:98:1: + TIOCM_DCD = 0100 // ttycom.h:99:1: + TIOCM_DSR = 0400 // ttycom.h:101:1: + TIOCM_DTR = 0002 // ttycom.h:94:1: + TIOCM_LE = 0001 // ttycom.h:93:1: + TIOCM_RI = 0200 // ttycom.h:100:1: + TIOCM_RNG = 128 // ttycom.h:104:1: + TIOCM_RTS = 0004 // ttycom.h:95:1: + TIOCM_SR = 0020 // ttycom.h:97:1: + TIOCM_ST = 0010 // ttycom.h:96:1: + TIOCPKT_DATA = 0x00 // ttycom.h:111:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:117:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:112:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:113:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:118:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:116:1: + TIOCPKT_START = 0x08 // ttycom.h:115:1: + TIOCPKT_STOP = 0x04 // ttycom.h:114:1: + TOSTOP = 0x00400000 // _termios.h:175:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:55:1: + TTYDEF_IFLAG = 11010 // ttydefaults.h:49:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:54:1: + TTYDEF_LFLAG_ECHO = 1483 // ttydefaults.h:52:1: + TTYDEF_LFLAG_NOECHO = 1408 // ttydefaults.h:51:1: + TTYDEF_OFLAG = 3 // ttydefaults.h:50:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:56:1: + TTYDISC = 0 // ttycom.h:131:1: + VDISCARD = 15 // _termios.h:70:1: + VDSUSP = 11 // _termios.h:64:1: + VEOF = 0 // _termios.h:45:1: + VEOL = 1 // _termios.h:46:1: + VEOL2 = 2 // _termios.h:48:1: + VERASE = 3 // _termios.h:50:1: + VERASE2 = 7 // _termios.h:57:1: + VINTR = 8 // _termios.h:60:1: + VKILL = 5 // _termios.h:54:1: + VLNEXT = 14 // _termios.h:69:1: + VMIN = 16 // _termios.h:72:1: + VQUIT = 9 // _termios.h:61:1: + VREPRINT = 6 // _termios.h:56:1: + VSTART = 12 // _termios.h:66:1: + VSTATUS = 18 // _termios.h:75:1: + VSTOP = 13 // _termios.h:67:1: + VSUSP = 10 // _termios.h:62:1: + VTIME = 17 // _termios.h:73:1: + VWERASE = 4 // _termios.h:52:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PID_T_DECLARED = 0 // termios.h:47:1: + X_POSIX_VDISABLE = 0xff // _termios.h:80:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_IOCCOM_H_ = 0 // ioccom.h:36:1: + X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: + X_SYS__TERMIOS_H_ = 0 // _termios.h:36:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_SYS__WINSIZE_H_ = 0 // _winsize.h:36:1: + X_TERMIOS_H_ = 0 // termios.h:36:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)termios.h 8.3 (Berkeley) 3/28/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)termios.h 8.3 (Berkeley) 3/28/94 +// $FreeBSD$ + +// Special Control Characters +// +// Index into c_cc[] character array. +// +// Name Subscript Enabled by +// 7 ex-spare 1 +// 19 spare 2 + +// Input flags - software input processing + +// Output flags - software output processing + +// Control flags - hardware control of terminal + +// "Local" flags - dumping ground for other state +// +// Warning: some flags in this structure begin with +// the letter "I" and look like they belong in the +// input flag. + +// Standard speeds + +type Tcflag_t = uint32 /* _termios.h:224:22 */ +type Cc_t = uint8 /* _termios.h:225:23 */ +type Speed_t = uint32 /* _termios.h:226:22 */ + +type Termios = struct { + Fc_iflag Tcflag_t + Fc_oflag Tcflag_t + Fc_cflag Tcflag_t + Fc_lflag Tcflag_t + Fc_cc [20]Cc_t + Fc_ispeed Speed_t + Fc_ospeed Speed_t +} /* _termios.h:228:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 +// $FreeBSD$ + +// Window/terminal size structure. This information is stored by the kernel +// in order to provide a consistent interface, but is not used by the kernel. +type Winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} /* _winsize.h:42:1 */ + +type Pid_t = X__pid_t /* termios.h:46:18 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 +// $FreeBSD$ + +// Tty ioctl's except for those supported only for backwards compatibility +// with the old tty driver. + +// 0-2 compat +// 3-7 unused +// 8-10 compat +// 11-12 unused +// 17-18 compat +// 23-25 unused +// 29-85 unused +// 88 unused +// 89-91 conflicts: tun and tap +// 92-93 tun and tap +// 94-97 conflicts: tun and tap +// 100 unused +// 105 unused +// 116-117 compat +// 124-127 compat + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 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. +// +// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 +// $FreeBSD$ + +// System wide defaults for terminal state. + +// Defaults on "first" open. + +// Control Character Defaults +// XXX: A lot of code uses lowercase characters, but control-character +// conversion is actually only valid when applied to uppercase +// characters. We just treat lowercase characters as if they were +// inserted as uppercase. +// compat + +// PROTECTED INCLUSION ENDS HERE + +// #define TTYDEFCHARS to include an array of default control characters. +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/termios/termios_freebsd_arm64.go b/vendor/modernc.org/libc/termios/termios_freebsd_arm64.go new file mode 100644 index 00000000..96ebf0b0 --- /dev/null +++ b/vendor/modernc.org/libc/termios/termios_freebsd_arm64.go @@ -0,0 +1,1010 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_freebsd_amd64.go -pkgname termios', DO NOT EDIT. + +package termios + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ALTWERASE = 0x00000200 // _termios.h:171:1: + B0 = 0 // _termios.h:186:1: + B1000000 = 1000000 // _termios.h:213:1: + B110 = 110 // _termios.h:189:1: + B115200 = 115200 // _termios.h:208:1: + B1200 = 1200 // _termios.h:195:1: + B134 = 134 // _termios.h:190:1: + B14400 = 14400 // _termios.h:204:1: + B150 = 150 // _termios.h:191:1: + B1500000 = 1500000 // _termios.h:214:1: + B1800 = 1800 // _termios.h:196:1: + B19200 = 19200 // _termios.h:200:1: + B200 = 200 // _termios.h:192:1: + B2000000 = 2000000 // _termios.h:215:1: + B230400 = 230400 // _termios.h:209:1: + B2400 = 2400 // _termios.h:197:1: + B2500000 = 2500000 // _termios.h:216:1: + B28800 = 28800 // _termios.h:205:1: + B300 = 300 // _termios.h:193:1: + B3000000 = 3000000 // _termios.h:217:1: + B3500000 = 3500000 // _termios.h:218:1: + B38400 = 38400 // _termios.h:201:1: + B4000000 = 4000000 // _termios.h:219:1: + B460800 = 460800 // _termios.h:210:1: + B4800 = 4800 // _termios.h:198:1: + B50 = 50 // _termios.h:187:1: + B500000 = 500000 // _termios.h:211:1: + B57600 = 57600 // _termios.h:206:1: + B600 = 600 // _termios.h:194:1: + B7200 = 7200 // _termios.h:203:1: + B75 = 75 // _termios.h:188:1: + B76800 = 76800 // _termios.h:207:1: + B921600 = 921600 // _termios.h:212:1: + B9600 = 9600 // _termios.h:199:1: + BRKINT = 0x00000002 // _termios.h:86:1: + CBRK = 255 // ttydefaults.h:89:1: + CCAR_OFLOW = 0x00100000 // _termios.h:145:1: + CCTS_OFLOW = 0x00010000 // _termios.h:140:1: + CDISCARD = 15 // ttydefaults.h:84:1: + CDSR_OFLOW = 0x00080000 // _termios.h:144:1: + CDSUSP = 25 // ttydefaults.h:80:1: + CDTR_IFLOW = 0x00040000 // _termios.h:143:1: + CEOF = 4 // ttydefaults.h:69:1: + CEOL = 0xff // ttydefaults.h:70:1: + CEOT = 4 // ttydefaults.h:87:1: + CERASE = 127 // ttydefaults.h:71:1: + CERASE2 = 8 // ttydefaults.h:72:1: + CFLUSH = 15 // ttydefaults.h:91:1: + CIGNORE = 0x00000001 // _termios.h:126:1: + CINTR = 3 // ttydefaults.h:73:1: + CKILL = 21 // ttydefaults.h:75:1: + CLNEXT = 22 // ttydefaults.h:83:1: + CLOCAL = 0x00008000 // _termios.h:138:1: + CMIN = 1 // ttydefaults.h:76:1: + CNO_RTSDTR = 0x00200000 // _termios.h:146:1: + CQUIT = 28 // ttydefaults.h:77:1: + CREAD = 0x00000800 // _termios.h:134:1: + CREPRINT = 18 // ttydefaults.h:86:1: + CRPRNT = 18 // ttydefaults.h:90:1: + CRTSCTS = 196608 // _termios.h:141:1: + CRTS_IFLOW = 0x00020000 // _termios.h:142:1: + CS5 = 0x00000000 // _termios.h:129:1: + CS6 = 0x00000100 // _termios.h:130:1: + CS7 = 0x00000200 // _termios.h:131:1: + CS8 = 0x00000300 // _termios.h:132:1: + CSIZE = 0x00000300 // _termios.h:128:1: + CSTART = 17 // ttydefaults.h:81:1: + CSTATUS = 20 // ttydefaults.h:74:1: + CSTOP = 19 // ttydefaults.h:82:1: + CSTOPB = 0x00000400 // _termios.h:133:1: + CSUSP = 26 // ttydefaults.h:78:1: + CTIME = 0 // ttydefaults.h:79:1: + CWERASE = 23 // ttydefaults.h:85:1: + ECHO = 0x00000008 // _termios.h:162:1: + ECHOCTL = 0x00000040 // _termios.h:166:1: + ECHOE = 0x00000002 // _termios.h:160:1: + ECHOK = 0x00000004 // _termios.h:161:1: + ECHOKE = 0x00000001 // _termios.h:158:1: + ECHONL = 0x00000010 // _termios.h:163:1: + ECHOPRT = 0x00000020 // _termios.h:165:1: + EXTA = 19200 // _termios.h:220:1: + EXTB = 38400 // _termios.h:221:1: + EXTPROC = 0x00000800 // _termios.h:174:1: + FLUSHO = 0x00800000 // _termios.h:177:1: + H4DISC = 7 // ttycom.h:135:1: + HUPCL = 0x00004000 // _termios.h:137:1: + ICANON = 0x00000100 // _termios.h:169:1: + ICRNL = 0x00000100 // _termios.h:93:1: + IEXTEN = 0x00000400 // _termios.h:173:1: + IGNBRK = 0x00000001 // _termios.h:85:1: + IGNCR = 0x00000080 // _termios.h:92:1: + IGNPAR = 0x00000004 // _termios.h:87:1: + IMAXBEL = 0x00002000 // _termios.h:100:1: + INLCR = 0x00000040 // _termios.h:91:1: + INPCK = 0x00000010 // _termios.h:89:1: + IOCPARM_MASK = 8191 // ioccom.h:49:1: + IOCPARM_MAX = 8192 // ioccom.h:54:1: + IOCPARM_SHIFT = 13 // ioccom.h:48:1: + IOC_DIRMASK = 3758096384 // ioccom.h:60:1: + IOC_IN = 0x80000000 // ioccom.h:58:1: + IOC_INOUT = 3221225472 // ioccom.h:59:1: + IOC_OUT = 0x40000000 // ioccom.h:57:1: + IOC_VOID = 0x20000000 // ioccom.h:56:1: + ISIG = 0x00000080 // _termios.h:168:1: + ISTRIP = 0x00000020 // _termios.h:90:1: + IXANY = 0x00000800 // _termios.h:97:1: + IXOFF = 0x00000400 // _termios.h:95:1: + IXON = 0x00000200 // _termios.h:94:1: + MDMBUF = 1048576 // termios.h:52:1: + NCCS = 20 // _termios.h:78:1: + NETGRAPHDISC = 6 // ttycom.h:134:1: + NOFLSH = 0x80000000 // _termios.h:181:1: + NOKERNINFO = 0x02000000 // _termios.h:178:1: + OCRNL = 0x00000010 // _termios.h:117:1: + ONLCR = 0x00000002 // _termios.h:108:1: + ONLRET = 0x00000040 // _termios.h:119:1: + ONOCR = 0x00000020 // _termios.h:118:1: + ONOEOT = 0x00000008 // _termios.h:114:1: + OPOST = 0x00000001 // _termios.h:106:1: + OXTABS = 4 // termios.h:51:1: + PARENB = 0x00001000 // _termios.h:135:1: + PARMRK = 0x00000008 // _termios.h:88:1: + PARODD = 0x00002000 // _termios.h:136:1: + PENDIN = 0x20000000 // _termios.h:179:1: + PPPDISC = 5 // ttycom.h:133:1: + SLIPDISC = 4 // ttycom.h:132:1: + TAB0 = 0x00000000 // _termios.h:112:1: + TAB3 = 0x00000004 // _termios.h:113:1: + TABDLY = 0x00000004 // _termios.h:111:1: + TCIFLUSH = 1 // termios.h:69:1: + TCIOFF = 3 // termios.h:74:1: + TCIOFLUSH = 3 // termios.h:71:1: + TCION = 4 // termios.h:75:1: + TCOFLUSH = 2 // termios.h:70:1: + TCOOFF = 1 // termios.h:72:1: + TCOON = 2 // termios.h:73:1: + TCSADRAIN = 1 // termios.h:63:1: + TCSAFLUSH = 2 // termios.h:64:1: + TCSANOW = 0 // termios.h:62:1: + TCSASOFT = 0x10 // termios.h:66:1: + TIOCM_CAR = 64 // ttycom.h:103:1: + TIOCM_CD = 64 // ttycom.h:102:1: + TIOCM_CTS = 0040 // ttycom.h:98:1: + TIOCM_DCD = 0100 // ttycom.h:99:1: + TIOCM_DSR = 0400 // ttycom.h:101:1: + TIOCM_DTR = 0002 // ttycom.h:94:1: + TIOCM_LE = 0001 // ttycom.h:93:1: + TIOCM_RI = 0200 // ttycom.h:100:1: + TIOCM_RNG = 128 // ttycom.h:104:1: + TIOCM_RTS = 0004 // ttycom.h:95:1: + TIOCM_SR = 0020 // ttycom.h:97:1: + TIOCM_ST = 0010 // ttycom.h:96:1: + TIOCPKT_DATA = 0x00 // ttycom.h:111:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:117:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:112:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:113:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:118:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:116:1: + TIOCPKT_START = 0x08 // ttycom.h:115:1: + TIOCPKT_STOP = 0x04 // ttycom.h:114:1: + TOSTOP = 0x00400000 // _termios.h:175:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:55:1: + TTYDEF_IFLAG = 11010 // ttydefaults.h:49:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:54:1: + TTYDEF_LFLAG_ECHO = 1483 // ttydefaults.h:52:1: + TTYDEF_LFLAG_NOECHO = 1408 // ttydefaults.h:51:1: + TTYDEF_OFLAG = 3 // ttydefaults.h:50:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:56:1: + TTYDISC = 0 // ttycom.h:131:1: + VDISCARD = 15 // _termios.h:70:1: + VDSUSP = 11 // _termios.h:64:1: + VEOF = 0 // _termios.h:45:1: + VEOL = 1 // _termios.h:46:1: + VEOL2 = 2 // _termios.h:48:1: + VERASE = 3 // _termios.h:50:1: + VERASE2 = 7 // _termios.h:57:1: + VINTR = 8 // _termios.h:60:1: + VKILL = 5 // _termios.h:54:1: + VLNEXT = 14 // _termios.h:69:1: + VMIN = 16 // _termios.h:72:1: + VQUIT = 9 // _termios.h:61:1: + VREPRINT = 6 // _termios.h:56:1: + VSTART = 12 // _termios.h:66:1: + VSTATUS = 18 // _termios.h:75:1: + VSTOP = 13 // _termios.h:67:1: + VSUSP = 10 // _termios.h:62:1: + VTIME = 17 // _termios.h:73:1: + VWERASE = 4 // _termios.h:52:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PID_T_DECLARED = 0 // termios.h:47:1: + X_POSIX_VDISABLE = 0xff // _termios.h:80:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_IOCCOM_H_ = 0 // ioccom.h:36:1: + X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: + X_SYS__TERMIOS_H_ = 0 // _termios.h:36:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_SYS__WINSIZE_H_ = 0 // _winsize.h:36:1: + X_TERMIOS_H_ = 0 // termios.h:36:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)termios.h 8.3 (Berkeley) 3/28/94 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)termios.h 8.3 (Berkeley) 3/28/94 +// $FreeBSD$ + +// Special Control Characters +// +// Index into c_cc[] character array. +// +// Name Subscript Enabled by +// 7 ex-spare 1 +// 19 spare 2 + +// Input flags - software input processing + +// Output flags - software output processing + +// Control flags - hardware control of terminal + +// "Local" flags - dumping ground for other state +// +// Warning: some flags in this structure begin with +// the letter "I" and look like they belong in the +// input flag. + +// Standard speeds + +type Tcflag_t = uint32 /* _termios.h:224:22 */ +type Cc_t = uint8 /* _termios.h:225:23 */ +type Speed_t = uint32 /* _termios.h:226:22 */ + +type Termios = struct { + Fc_iflag Tcflag_t + Fc_oflag Tcflag_t + Fc_cflag Tcflag_t + Fc_lflag Tcflag_t + Fc_cc [20]Cc_t + Fc_ispeed Speed_t + Fc_ospeed Speed_t +} /* _termios.h:228:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 +// $FreeBSD$ + +// Window/terminal size structure. This information is stored by the kernel +// in order to provide a consistent interface, but is not used by the kernel. +type Winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} /* _winsize.h:42:1 */ + +type Pid_t = X__pid_t /* termios.h:46:18 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 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. +// +// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 +// $FreeBSD$ + +// Tty ioctl's except for those supported only for backwards compatibility +// with the old tty driver. + +// 0-2 compat +// 3-7 unused +// 8-10 compat +// 11-12 unused +// 17-18 compat +// 23-25 unused +// 29-85 unused +// 88 unused +// 89-91 conflicts: tun and tap +// 92-93 tun and tap +// 94-97 conflicts: tun and tap +// 100 unused +// 105 unused +// 116-117 compat +// 124-127 compat + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 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. +// +// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 +// $FreeBSD$ + +// System wide defaults for terminal state. + +// Defaults on "first" open. + +// Control Character Defaults +// XXX: A lot of code uses lowercase characters, but control-character +// conversion is actually only valid when applied to uppercase +// characters. We just treat lowercase characters as if they were +// inserted as uppercase. +// compat + +// PROTECTED INCLUSION ENDS HERE + +// #define TTYDEFCHARS to include an array of default control characters. +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/termios/termios_linux_386.go b/vendor/modernc.org/libc/termios/termios_linux_386.go index 94986fa3..a0a63dc8 100644 --- a/vendor/modernc.org/libc/termios/termios_linux_386.go +++ b/vendor/modernc.org/libc/termios/termios_linux_386.go @@ -879,7 +879,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -890,13 +891,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Pid_t = X__pid_t /* termios.h:30:17 */ diff --git a/vendor/modernc.org/libc/termios/termios_linux_amd64.go b/vendor/modernc.org/libc/termios/termios_linux_amd64.go index 2c8b86c1..494b2017 100644 --- a/vendor/modernc.org/libc/termios/termios_linux_amd64.go +++ b/vendor/modernc.org/libc/termios/termios_linux_amd64.go @@ -898,7 +898,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -909,8 +910,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/termios/termios_linux_arm.go b/vendor/modernc.org/libc/termios/termios_linux_arm.go index 2721b808..0283bb4c 100644 --- a/vendor/modernc.org/libc/termios/termios_linux_arm.go +++ b/vendor/modernc.org/libc/termios/termios_linux_arm.go @@ -938,7 +938,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -949,13 +950,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Pid_t = X__pid_t /* termios.h:30:17 */ diff --git a/vendor/modernc.org/libc/termios/termios_linux_arm64.go b/vendor/modernc.org/libc/termios/termios_linux_arm64.go index 5ff212e6..72a9cc2a 100644 --- a/vendor/modernc.org/libc/termios/termios_linux_arm64.go +++ b/vendor/modernc.org/libc/termios/termios_linux_arm64.go @@ -966,7 +966,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -977,8 +978,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/termios/termios_linux_ppc64le.go b/vendor/modernc.org/libc/termios/termios_linux_ppc64le.go index 6c647767..1a03ee16 100644 --- a/vendor/modernc.org/libc/termios/termios_linux_ppc64le.go +++ b/vendor/modernc.org/libc/termios/termios_linux_ppc64le.go @@ -926,7 +926,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -937,8 +938,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/termios/termios_linux_riscv64.go b/vendor/modernc.org/libc/termios/termios_linux_riscv64.go index 138f40ea..c6698574 100644 --- a/vendor/modernc.org/libc/termios/termios_linux_riscv64.go +++ b/vendor/modernc.org/libc/termios/termios_linux_riscv64.go @@ -1070,7 +1070,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1081,8 +1082,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/termios/termios_linux_s390x.go b/vendor/modernc.org/libc/termios/termios_linux_s390x.go index db74bc6f..1ecfeab1 100644 --- a/vendor/modernc.org/libc/termios/termios_linux_s390x.go +++ b/vendor/modernc.org/libc/termios/termios_linux_s390x.go @@ -897,7 +897,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -908,8 +909,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/termios/termios_netbsd_arm.go b/vendor/modernc.org/libc/termios/termios_netbsd_arm.go new file mode 100644 index 00000000..88c400eb --- /dev/null +++ b/vendor/modernc.org/libc/termios/termios_netbsd_arm.go @@ -0,0 +1,728 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_netbsd_arm.go -pkgname termios', DO NOT EDIT. + +package termios + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ALTWERASE = 0x00000200 // termios.h:174:1: + ARG_MAX = 262144 // syslimits.h:45:1: + B0 = 0 // termios.h:215:1: + B1000000 = 1000000 // termios.h:242:1: + B110 = 110 // termios.h:218:1: + B115200 = 115200 // termios.h:237:1: + B1200 = 1200 // termios.h:224:1: + B134 = 134 // termios.h:219:1: + B14400 = 14400 // termios.h:233:1: + B150 = 150 // termios.h:220:1: + B1500000 = 1500000 // termios.h:243:1: + B1800 = 1800 // termios.h:225:1: + B19200 = 19200 // termios.h:229:1: + B200 = 200 // termios.h:221:1: + B2000000 = 2000000 // termios.h:244:1: + B230400 = 230400 // termios.h:238:1: + B2400 = 2400 // termios.h:226:1: + B2500000 = 2500000 // termios.h:245:1: + B28800 = 28800 // termios.h:234:1: + B300 = 300 // termios.h:222:1: + B3000000 = 3000000 // termios.h:246:1: + B3500000 = 3500000 // termios.h:247:1: + B38400 = 38400 // termios.h:230:1: + B4000000 = 4000000 // termios.h:248:1: + B460800 = 460800 // termios.h:239:1: + B4800 = 4800 // termios.h:227:1: + B50 = 50 // termios.h:216:1: + B500000 = 500000 // termios.h:240:1: + B57600 = 57600 // termios.h:235:1: + B600 = 600 // termios.h:223:1: + B7200 = 7200 // termios.h:232:1: + B75 = 75 // termios.h:217:1: + B76800 = 76800 // termios.h:236:1: + B921600 = 921600 // termios.h:241:1: + B9600 = 9600 // termios.h:228:1: + BC_DIM_MAX = 65535 // syslimits.h:64:1: + BRKINT = 0x00000002 // termios.h:91:1: + CCTS_OFLOW = 65536 // termios.h:145:1: + CDISCARD = 15 // ttydefaults.h:72:1: + CDSUSP = 25 // ttydefaults.h:68:1: + CDTRCTS = 0x00020000 // termios.h:146:1: + CEOF = 4 // ttydefaults.h:58:1: + CEOT = 4 // ttydefaults.h:75:1: + CERASE = 0177 // ttydefaults.h:60:1: + CFLUSH = 15 // ttydefaults.h:79:1: + CHILD_MAX = 160 // syslimits.h:47:1: + CHWFLOW = 1245184 // termios.h:148:1: + CIGNORE = 0x00000001 // termios.h:129:1: + CINTR = 3 // ttydefaults.h:61:1: + CKILL = 21 // ttydefaults.h:63:1: + CLNEXT = 22 // ttydefaults.h:71:1: + CLOCAL = 0x00008000 // termios.h:141:1: + CMIN = 1 // ttydefaults.h:64:1: + COLL_WEIGHTS_MAX = 2 // syslimits.h:67:1: + CQUIT = 034 // ttydefaults.h:65:1: + CREAD = 0x00000800 // termios.h:137:1: + CREPRINT = 18 // ttydefaults.h:74:1: + CRPRNT = 18 // ttydefaults.h:78:1: + CRTSCTS = 0x00010000 // termios.h:143:1: + CRTS_IFLOW = 65536 // termios.h:144:1: + CS5 = 0x00000000 // termios.h:132:1: + CS6 = 0x00000100 // termios.h:133:1: + CS7 = 0x00000200 // termios.h:134:1: + CS8 = 0x00000300 // termios.h:135:1: + CSIZE = 0x00000300 // termios.h:131:1: + CSTART = 17 // ttydefaults.h:69:1: + CSTATUS = 20 // ttydefaults.h:62:1: + CSTOP = 19 // ttydefaults.h:70:1: + CSTOPB = 0x00000400 // termios.h:136:1: + CSUSP = 26 // ttydefaults.h:66:1: + CTIME = 0 // ttydefaults.h:67:1: + CWERASE = 23 // ttydefaults.h:73:1: + ECHO = 0x00000008 // termios.h:165:1: + ECHOCTL = 0x00000040 // termios.h:169:1: + ECHOE = 0x00000002 // termios.h:163:1: + ECHOK = 0x00000004 // termios.h:164:1: + ECHOKE = 0x00000001 // termios.h:161:1: + ECHONL = 0x00000010 // termios.h:166:1: + ECHOPRT = 0x00000020 // termios.h:168:1: + EXPR_NEST_MAX = 32 // syslimits.h:68:1: + EXTA = 19200 // termios.h:249:1: + EXTB = 38400 // termios.h:250:1: + EXTPROC = 0x00000800 // termios.h:178:1: + FLUSHO = 0x00800000 // termios.h:182:1: + GID_MAX = 2147483647 // syslimits.h:49:1: + HDLCDISC = 9 // ttycom.h:177:1: + HUPCL = 0x00004000 // termios.h:140:1: + ICANON = 0x00000100 // termios.h:172:1: + ICRNL = 0x00000100 // termios.h:98:1: + IEXTEN = 0x00000400 // termios.h:176:1: + IGNBRK = 0x00000001 // termios.h:90:1: + IGNCR = 0x00000080 // termios.h:97:1: + IGNPAR = 0x00000004 // termios.h:92:1: + IMAXBEL = 0x00002000 // termios.h:105:1: + INLCR = 0x00000040 // termios.h:96:1: + INPCK = 0x00000010 // termios.h:94:1: + IOCGROUP_SHIFT = 8 // ioccom.h:49:1: + IOCPARM_MASK = 0x1fff // ioccom.h:47:1: + IOCPARM_SHIFT = 16 // ioccom.h:48:1: + IOV_MAX = 1024 // syslimits.h:84:1: + ISIG = 0x00000080 // termios.h:171:1: + ISTRIP = 0x00000020 // termios.h:95:1: + IXANY = 0x00000800 // termios.h:102:1: + IXOFF = 0x00000400 // termios.h:100:1: + IXON = 0x00000200 // termios.h:99:1: + LINE_MAX = 2048 // syslimits.h:69:1: + LINK_MAX = 32767 // syslimits.h:50:1: + LOGIN_NAME_MAX = 17 // syslimits.h:77:1: + MAX_CANON = 255 // syslimits.h:51:1: + MAX_INPUT = 255 // syslimits.h:52:1: + MDMBUF = 0x00100000 // termios.h:147:1: + NAME_MAX = 511 // syslimits.h:53:1: + NCCS = 20 // termios.h:79:1: + NGROUPS_MAX = 16 // syslimits.h:55:1: + NOFLSH = 0x80000000 // termios.h:186:1: + NOKERNINFO = 0x02000000 // termios.h:183:1: + NZERO = 20 // syslimits.h:85:1: + OCRNL = 0x00000010 // termios.h:120:1: + ONLCR = 0x00000002 // termios.h:113:1: + ONLRET = 0x00000040 // termios.h:122:1: + ONOCR = 0x00000020 // termios.h:121:1: + ONOEOT = 0x00000008 // termios.h:117:1: + OPEN_MAX = 128 // syslimits.h:58:1: + OPOST = 0x00000001 // termios.h:111:1: + OXTABS = 0x00000004 // termios.h:116:1: + PARENB = 0x00001000 // termios.h:138:1: + PARMRK = 0x00000008 // termios.h:93:1: + PARODD = 0x00002000 // termios.h:139:1: + PATH_MAX = 1024 // syslimits.h:60:1: + PENDIN = 0x20000000 // termios.h:184:1: + PIPE_BUF = 512 // syslimits.h:61:1: + PPPDISC = 5 // ttycom.h:175:1: + RE_DUP_MAX = 255 // syslimits.h:70:1: + SLIPDISC = 4 // ttycom.h:174:1: + STRIPDISC = 6 // ttycom.h:176:1: + TABLDISC = 3 // ttycom.h:173:1: + TCIFLUSH = 1 // termios.h:255:1: + TCIOFF = 3 // termios.h:260:1: + TCIOFLUSH = 3 // termios.h:257:1: + TCION = 4 // termios.h:261:1: + TCOFLUSH = 2 // termios.h:256:1: + TCOOFF = 1 // termios.h:258:1: + TCOON = 2 // termios.h:259:1: + TCSADRAIN = 1 // termios.h:206:1: + TCSAFLUSH = 2 // termios.h:207:1: + TCSANOW = 0 // termios.h:205:1: + TCSASOFT = 0x10 // termios.h:209:1: + TIOCFLAG_CDTRCTS = 0x10 // ttycom.h:158:1: + TIOCFLAG_CLOCAL = 0x02 // ttycom.h:155:1: + TIOCFLAG_CRTSCTS = 0x04 // ttycom.h:156:1: + TIOCFLAG_MDMBUF = 0x08 // ttycom.h:157:1: + TIOCFLAG_SOFTCAR = 0x01 // ttycom.h:154:1: + TIOCM_CAR = 0100 // ttycom.h:89:1: + TIOCM_CD = 64 // ttycom.h:90:1: + TIOCM_CTS = 0040 // ttycom.h:88:1: + TIOCM_DSR = 0400 // ttycom.h:93:1: + TIOCM_DTR = 0002 // ttycom.h:84:1: + TIOCM_LE = 0001 // ttycom.h:83:1: + TIOCM_RI = 128 // ttycom.h:92:1: + TIOCM_RNG = 0200 // ttycom.h:91:1: + TIOCM_RTS = 0004 // ttycom.h:85:1: + TIOCM_SR = 0020 // ttycom.h:87:1: + TIOCM_ST = 0010 // ttycom.h:86:1: + TIOCPKT_DATA = 0x00 // ttycom.h:126:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:132:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:127:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:128:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:133:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:131:1: + TIOCPKT_START = 0x08 // ttycom.h:130:1: + TIOCPKT_STOP = 0x04 // ttycom.h:129:1: + TOSTOP = 0x00400000 // termios.h:180:1: + TTLINEDNAMELEN = 32 // ttycom.h:110:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:51:1: + TTYDEF_IFLAG = 11010 // ttydefaults.h:48:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:50:1: + TTYDEF_OFLAG = 7 // ttydefaults.h:49:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:52:1: + TTYDISC = 0 // ttycom.h:172:1: + UID_MAX = 2147483647 // syslimits.h:56:1: + VDISCARD = 15 // termios.h:71:1: + VDSUSP = 11 // termios.h:65:1: + VEOF = 0 // termios.h:47:1: + VEOL = 1 // termios.h:48:1: + VEOL2 = 2 // termios.h:50:1: + VERASE = 3 // termios.h:52:1: + VINTR = 8 // termios.h:61:1: + VKILL = 5 // termios.h:56:1: + VLNEXT = 14 // termios.h:70:1: + VMIN = 16 // termios.h:73:1: + VQUIT = 9 // termios.h:62:1: + VREPRINT = 6 // termios.h:58:1: + VSTART = 12 // termios.h:67:1: + VSTATUS = 18 // termios.h:76:1: + VSTOP = 13 // termios.h:68:1: + VSUSP = 10 // termios.h:63:1: + VTIME = 17 // termios.h:74:1: + VWERASE = 4 // termios.h:54:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_NETBSD_SYS_TTYCOM_H_ = 0 // ttycom.h:65:1: + X_PATH_PTMDEV = "/dev/ptm" // ttycom.h:81:1: + X_POSIX_SYS_TTYCOM_H_ = 0 // ttycom.h:40:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_IOCCOM_H_ = 0 // ioccom.h:35:1: + X_SYS_SYSLIMITS_H_ = 0 // syslimits.h:35:1: + X_SYS_TERMIOS_H_ = 0 // termios.h:35:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:43:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Special Control Characters +// +// Index into c_cc[] character array. +// +// Name Subscript Enabled by +// 7 spare 1 +// 19 spare 2 + +// Input flags - software input processing + +// Output flags - software output processing + +// Control flags - hardware control of terminal + +// "Local" flags - dumping ground for other state +// +// Warning: some flags in this structure begin with +// the letter "I" and look like they belong in the +// input flag. + +type Tcflag_t = uint32 /* termios.h:188:22 */ +type Cc_t = uint8 /* termios.h:189:23 */ +type Speed_t = uint32 /* termios.h:190:22 */ + +type Termios = struct { + Fc_iflag Tcflag_t + Fc_oflag Tcflag_t + Fc_cflag Tcflag_t + Fc_lflag Tcflag_t + Fc_cc [20]Cc_t + Fc_ispeed int32 + Fc_ospeed int32 +} /* termios.h:192:1 */ + +// Commands passed to tcsetattr() for setting the termios structure. + +// Standard speeds + +type Pid_t = X__pid_t /* termios.h:265:18 */ + +// Include tty ioctl's that aren't just for backwards compatibility +// with the old tty driver. These ioctl definitions were previously +// in <sys/ioctl.h>. Most of this appears only when _NETBSD_SOURCE +// is defined, but (at least) struct winsize has been made standard, +// and needs to be visible here (as well as via the old <sys/ioctl.h>.) +// $NetBSD: ttycom.h,v 1.21 2017/10/25 06:32:59 kre Exp $ + +// - +// Copyright (c) 1982, 1986, 1990, 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. +// +// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// kept in sync with MAXNAMLEN + +// IEEE Std 1003.1c-95, adopted in X/Open CAE Specification Issue 5 Version 2 + +// X/Open CAE Specification Issue 5 Version 2 + +// $NetBSD: ioccom.h,v 1.13 2019/05/26 10:21:33 hannken Exp $ + +// - +// Copyright (c) 1982, 1986, 1990, 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. +// +// @(#)ioccom.h 8.3 (Berkeley) 1/9/95 + +// Ioctl's have the command encoded in the lower word, and the size of +// any in or out parameters in the upper word. The high 3 bits of the +// upper word are used to encode the in/out status of the parameter. +// +// 31 29 28 16 15 8 7 0 +// +---------------------------------------------------------------+ +// | I/O | Parameter Length | Command Group | Command | +// +---------------------------------------------------------------+ + +// no parameters +// copy parameters out +// copy parameters in +// copy parameters in and out +// mask for IN/OUT/VOID + +// this should be _IORW, but stdio got there first + +// Tty ioctl's except for those supported only for backwards compatibility +// with the old tty driver. + +// Window/terminal size structure. This information is stored by the kernel +// in order to provide a consistent interface, but is not used by the kernel. +type Winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} /* ttycom.h:54:1 */ + +// The following are not exposed when imported via <termios.h> +// when _POSIX_SOURCE (et.al.) is defined (and hence _NETBSD_SOURCE +// is not, unless that is added manually.) + +// ptmget, for /dev/ptm pty getting ioctl TIOCPTMGET, and for TIOCPTSNAME +type Ptmget = struct { + Fcfd int32 + Fsfd int32 + Fcn [1024]uint8 + Fsn [1024]uint8 +} /* ttycom.h:74:1 */ + +// 8-10 compat +// 15 unused +// 17-18 compat + +// This is the maximum length of a line discipline's name. +type Linedn_t = [32]uint8 /* ttycom.h:111:14 */ + +// END OF PROTECTED INCLUDE. + +// $NetBSD: ttydefaults.h,v 1.16 2008/05/24 14:06:39 yamt Exp $ + +// - +// Copyright (c) 1982, 1986, 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. +// +// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 + +// System wide defaults for terminal state. + +// Defaults on "first" open. + +// Control Character Defaults +// compat + +// PROTECTED INCLUSION ENDS HERE + +// #define TTYDEFCHARS to include an array of default control characters. +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/termios/termios_openbsd_386.go b/vendor/modernc.org/libc/termios/termios_openbsd_386.go new file mode 100644 index 00000000..db235e65 --- /dev/null +++ b/vendor/modernc.org/libc/termios/termios_openbsd_386.go @@ -0,0 +1,779 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_openbsd_386.go -pkgname termios', DO NOT EDIT. + +package termios + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ALTWERASE = 0x00000200 // termios.h:172:1: + B0 = 0 // termios.h:212:1: + B110 = 110 // termios.h:215:1: + B115200 = 115200 // termios.h:234:1: + B1200 = 1200 // termios.h:221:1: + B134 = 134 // termios.h:216:1: + B14400 = 14400 // termios.h:230:1: + B150 = 150 // termios.h:217:1: + B1800 = 1800 // termios.h:222:1: + B19200 = 19200 // termios.h:226:1: + B200 = 200 // termios.h:218:1: + B230400 = 230400 // termios.h:235:1: + B2400 = 2400 // termios.h:223:1: + B28800 = 28800 // termios.h:231:1: + B300 = 300 // termios.h:219:1: + B38400 = 38400 // termios.h:227:1: + B4800 = 4800 // termios.h:224:1: + B50 = 50 // termios.h:213:1: + B57600 = 57600 // termios.h:232:1: + B600 = 600 // termios.h:220:1: + B7200 = 7200 // termios.h:229:1: + B75 = 75 // termios.h:214:1: + B76800 = 76800 // termios.h:233:1: + B9600 = 9600 // termios.h:225:1: + BRKINT = 0x00000002 // termios.h:91:1: + CCTS_OFLOW = 65536 // termios.h:145:1: + CDISCARD = 15 // ttydefaults.h:73:1: + CDSUSP = 25 // ttydefaults.h:69:1: + CEOF = 4 // ttydefaults.h:59:1: + CEOT = 4 // ttydefaults.h:76:1: + CERASE = 0177 // ttydefaults.h:61:1: + CFLUSH = 15 // ttydefaults.h:80:1: + CHWFLOW = 1114112 // termios.h:147:1: + CIGNORE = 0x00000001 // termios.h:129:1: + CINTR = 3 // ttydefaults.h:62:1: + CKILL = 21 // ttydefaults.h:64:1: + CLNEXT = 22 // ttydefaults.h:72:1: + CLOCAL = 0x00008000 // termios.h:141:1: + CMIN = 1 // ttydefaults.h:65:1: + CQUIT = 034 // ttydefaults.h:66:1: + CREAD = 0x00000800 // termios.h:137:1: + CREPRINT = 18 // ttydefaults.h:75:1: + CRPRNT = 18 // ttydefaults.h:79:1: + CRTSCTS = 0x00010000 // termios.h:143:1: + CRTS_IFLOW = 65536 // termios.h:144:1: + CS5 = 0x00000000 // termios.h:132:1: + CS6 = 0x00000100 // termios.h:133:1: + CS7 = 0x00000200 // termios.h:134:1: + CS8 = 0x00000300 // termios.h:135:1: + CSIZE = 0x00000300 // termios.h:131:1: + CSTART = 17 // ttydefaults.h:70:1: + CSTOP = 19 // ttydefaults.h:71:1: + CSTOPB = 0x00000400 // termios.h:136:1: + CSUSP = 26 // ttydefaults.h:67:1: + CTIME = 0 // ttydefaults.h:68:1: + CWERASE = 23 // ttydefaults.h:74:1: + ECHO = 0x00000008 // termios.h:163:1: + ECHOCTL = 0x00000040 // termios.h:167:1: + ECHOE = 0x00000002 // termios.h:161:1: + ECHOK = 0x00000004 // termios.h:162:1: + ECHOKE = 0x00000001 // termios.h:159:1: + ECHONL = 0x00000010 // termios.h:164:1: + ECHOPRT = 0x00000020 // termios.h:166:1: + ENDRUNDISC = 9 // ttycom.h:149:1: + EXTA = 19200 // termios.h:236:1: + EXTB = 38400 // termios.h:237:1: + EXTPROC = 0x00000800 // termios.h:175:1: + FLUSHO = 0x00800000 // termios.h:178:1: + HUPCL = 0x00004000 // termios.h:140:1: + ICANON = 0x00000100 // termios.h:170:1: + ICRNL = 0x00000100 // termios.h:98:1: + IEXTEN = 0x00000400 // termios.h:174:1: + IGNBRK = 0x00000001 // termios.h:90:1: + IGNCR = 0x00000080 // termios.h:97:1: + IGNPAR = 0x00000004 // termios.h:92:1: + IMAXBEL = 0x00002000 // termios.h:104:1: + INLCR = 0x00000040 // termios.h:96:1: + INPCK = 0x00000010 // termios.h:94:1: + IOCPARM_MASK = 0x1fff // ioccom.h:43:1: + ISIG = 0x00000080 // termios.h:169:1: + ISTRIP = 0x00000020 // termios.h:95:1: + IUCLC = 0x00001000 // termios.h:103:1: + IXANY = 0x00000800 // termios.h:102:1: + IXOFF = 0x00000400 // termios.h:100:1: + IXON = 0x00000200 // termios.h:99:1: + MDMBUF = 0x00100000 // termios.h:146:1: + MSTSDISC = 8 // ttycom.h:148:1: + NCCS = 20 // termios.h:79:1: + NMEADISC = 7 // ttycom.h:147:1: + NOFLSH = 0x80000000 // termios.h:183:1: + NOKERNINFO = 0x02000000 // termios.h:180:1: + OCRNL = 0x00000010 // termios.h:119:1: + OLCUC = 0x00000020 // termios.h:120:1: + ONLCR = 0x00000002 // termios.h:112:1: + ONLRET = 0x00000080 // termios.h:122:1: + ONOCR = 0x00000040 // termios.h:121:1: + ONOEOT = 0x00000008 // termios.h:116:1: + OPOST = 0x00000001 // termios.h:110:1: + OXTABS = 0x00000004 // termios.h:115:1: + PARENB = 0x00001000 // termios.h:138:1: + PARMRK = 0x00000008 // termios.h:93:1: + PARODD = 0x00002000 // termios.h:139:1: + PENDIN = 0x20000000 // termios.h:181:1: + PPPDISC = 5 // ttycom.h:145:1: + SLIPDISC = 4 // ttycom.h:144:1: + STRIPDISC = 6 // ttycom.h:146:1: + TABLDISC = 3 // ttycom.h:143:1: + TCIFLUSH = 1 // termios.h:242:1: + TCIOFF = 3 // termios.h:247:1: + TCIOFLUSH = 3 // termios.h:244:1: + TCION = 4 // termios.h:248:1: + TCOFLUSH = 2 // termios.h:243:1: + TCOOFF = 1 // termios.h:245:1: + TCOON = 2 // termios.h:246:1: + TCSADRAIN = 1 // termios.h:203:1: + TCSAFLUSH = 2 // termios.h:204:1: + TCSANOW = 0 // termios.h:202:1: + TCSASOFT = 0x10 // termios.h:206:1: + TIOCFLAG_CLOCAL = 0x02 // ttycom.h:131:1: + TIOCFLAG_CRTSCTS = 0x04 // ttycom.h:132:1: + TIOCFLAG_MDMBUF = 0x08 // ttycom.h:133:1: + TIOCFLAG_PPS = 0x10 // ttycom.h:134:1: + TIOCFLAG_SOFTCAR = 0x01 // ttycom.h:130:1: + TIOCM_CAR = 0100 // ttycom.h:69:1: + TIOCM_CD = 64 // ttycom.h:70:1: + TIOCM_CTS = 0040 // ttycom.h:68:1: + TIOCM_DSR = 0400 // ttycom.h:73:1: + TIOCM_DTR = 0002 // ttycom.h:64:1: + TIOCM_LE = 0001 // ttycom.h:63:1: + TIOCM_RI = 128 // ttycom.h:72:1: + TIOCM_RNG = 0200 // ttycom.h:71:1: + TIOCM_RTS = 0004 // ttycom.h:65:1: + TIOCM_SR = 0020 // ttycom.h:67:1: + TIOCM_ST = 0010 // ttycom.h:66:1: + TIOCPKT_DATA = 0x00 // ttycom.h:100:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:106:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:101:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:102:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:107:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:105:1: + TIOCPKT_START = 0x08 // ttycom.h:104:1: + TIOCPKT_STOP = 0x04 // ttycom.h:103:1: + TOSTOP = 0x00400000 // termios.h:176:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:52:1: + TTYDEF_IFLAG = 11010 // ttydefaults.h:49:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:51:1: + TTYDEF_OFLAG = 3 // ttydefaults.h:50:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:53:1: + TTYDISC = 0 // ttycom.h:142:1: + VDISCARD = 15 // termios.h:71:1: + VDSUSP = 11 // termios.h:65:1: + VEOF = 0 // termios.h:47:1: + VEOL = 1 // termios.h:48:1: + VEOL2 = 2 // termios.h:50:1: + VERASE = 3 // termios.h:52:1: + VINTR = 8 // termios.h:61:1: + VKILL = 5 // termios.h:56:1: + VLNEXT = 14 // termios.h:70:1: + VMIN = 16 // termios.h:73:1: + VQUIT = 9 // termios.h:62:1: + VREPRINT = 6 // termios.h:58:1: + VSTART = 12 // termios.h:67:1: + VSTATUS = 18 // termios.h:76:1: + VSTOP = 13 // termios.h:68:1: + VSUSP = 10 // termios.h:63:1: + VTIME = 17 // termios.h:74:1: + VWERASE = 4 // termios.h:54:1: + XCASE = 0x01000000 // termios.h:179:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_PID_T_DEFINED_ = 0 // termios.h:254:1: + X_POSIX_VDISABLE = 255 // termios.h:81:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_IOCCOM_H_ = 0 // ioccom.h:36:1: + X_SYS_TERMIOS_H_ = 0 // termios.h:36:1: + X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: termios.h,v 1.13 2016/09/20 21:10:22 fcambus Exp $ +// $NetBSD: termios.h,v 1.14 1996/04/09 20:55:41 cgd Exp $ + +// Copyright (c) 1988, 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. +// +// @(#)termios.h 8.3 (Berkeley) 3/28/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// Special Control Characters +// +// Index into c_cc[] character array. +// +// Name Subscript Enabled by +// 7 spare 1 +// 19 spare 2 + +// Input flags - software input processing + +// Output flags - software output processing + +// Control flags - hardware control of terminal + +// "Local" flags - dumping ground for other state +// +// Warning: some flags in this structure begin with +// the letter "I" and look like they belong in the +// input flag. + +type Tcflag_t = uint32 /* termios.h:185:22 */ +type Cc_t = uint8 /* termios.h:186:23 */ +type Speed_t = uint32 /* termios.h:187:22 */ + +type Termios = struct { + Fc_iflag Tcflag_t + Fc_oflag Tcflag_t + Fc_cflag Tcflag_t + Fc_lflag Tcflag_t + Fc_cc [20]Cc_t + Fc_ispeed int32 + Fc_ospeed int32 +} /* termios.h:189:1 */ + +// Commands passed to tcsetattr() for setting the termios structure. + +// Standard speeds + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Pid_t = X__pid_t /* termios.h:255:18 */ + +// Include tty ioctl's that aren't just for backwards compatibility +// with the old tty driver. These ioctl definitions were previously +// in <sys/ioctl.h>. +// $OpenBSD: ttycom.h,v 1.17 2018/06/16 13:55:03 deraadt Exp $ +// $NetBSD: ttycom.h,v 1.4 1996/05/19 17:17:53 jonathan Exp $ + +// - +// Copyright (c) 1982, 1986, 1990, 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. +// +// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 + +// $OpenBSD: ioccom.h,v 1.5 2013/03/22 21:22:05 deraadt Exp $ +// $NetBSD: ioccom.h,v 1.4 1994/10/30 21:49:56 cgd Exp $ + +// - +// Copyright (c) 1982, 1986, 1990, 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. +// +// @(#)ioccom.h 8.2 (Berkeley) 3/28/94 + +// Ioctl's have the command encoded in the lower word, and the size of +// any in or out parameters in the upper word. The high 3 bits of the +// upper word are used to encode the in/out status of the parameter. + +// no parameters +// copy parameters out +// copy parameters in +// copy parameters in and out +// mask for IN/OUT/VOID + +// this should be _IORW, but stdio got there first + +// Tty ioctl's. + +// Window/terminal size structure. This information is stored by the kernel +// in order to provide a consistent interface, but is not used by the kernel. +type Winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} /* ttycom.h:51:1 */ + +type Tstamps = struct { + Fts_set int32 + Fts_clr int32 +} /* ttycom.h:58:1 */ + +// 8-10 compat +// 15 unused +// 17-18 compat +// 127-124 compat +// 117-116 compat + +// Backwards compatibility + +// END OF PROTECTED INCLUDE. + +// $OpenBSD: ttydefaults.h,v 1.7 2019/03/12 11:01:25 nicm Exp $ +// $NetBSD: ttydefaults.h,v 1.8 1996/04/09 20:55:45 cgd Exp $ + +// - +// Copyright (c) 1982, 1986, 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. +// +// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 + +// System wide defaults for terminal state. + +// Defaults on "first" open. + +// Control Character Defaults +// compat + +// PROTECTED INCLUSION ENDS HERE + +// #define TTYDEFCHARS to include an array of default control characters. +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go b/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go index 323ef61b..baf9ce51 100644 --- a/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go +++ b/vendor/modernc.org/libc/termios/termios_openbsd_amd64.go @@ -198,7 +198,7 @@ const ( X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -451,7 +451,7 @@ type Termios = struct { // Standard speeds -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -611,18 +611,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Pid_t = X__pid_t /* termios.h:255:18 */ diff --git a/vendor/modernc.org/libc/termios/termios_openbsd_arm64.go b/vendor/modernc.org/libc/termios/termios_openbsd_arm64.go new file mode 100644 index 00000000..08360192 --- /dev/null +++ b/vendor/modernc.org/libc/termios/termios_openbsd_arm64.go @@ -0,0 +1,786 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_openbsd_arm64.go -pkgname termios', DO NOT EDIT. + +package termios + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ALTWERASE = 0x00000200 // termios.h:172:1: + B0 = 0 // termios.h:212:1: + B110 = 110 // termios.h:215:1: + B115200 = 115200 // termios.h:234:1: + B1200 = 1200 // termios.h:221:1: + B134 = 134 // termios.h:216:1: + B14400 = 14400 // termios.h:230:1: + B150 = 150 // termios.h:217:1: + B1800 = 1800 // termios.h:222:1: + B19200 = 19200 // termios.h:226:1: + B200 = 200 // termios.h:218:1: + B230400 = 230400 // termios.h:235:1: + B2400 = 2400 // termios.h:223:1: + B28800 = 28800 // termios.h:231:1: + B300 = 300 // termios.h:219:1: + B38400 = 38400 // termios.h:227:1: + B4800 = 4800 // termios.h:224:1: + B50 = 50 // termios.h:213:1: + B57600 = 57600 // termios.h:232:1: + B600 = 600 // termios.h:220:1: + B7200 = 7200 // termios.h:229:1: + B75 = 75 // termios.h:214:1: + B76800 = 76800 // termios.h:233:1: + B9600 = 9600 // termios.h:225:1: + BRKINT = 0x00000002 // termios.h:91:1: + CCTS_OFLOW = 65536 // termios.h:145:1: + CDISCARD = 15 // ttydefaults.h:73:1: + CDSUSP = 25 // ttydefaults.h:69:1: + CEOF = 4 // ttydefaults.h:59:1: + CEOT = 4 // ttydefaults.h:76:1: + CERASE = 0177 // ttydefaults.h:61:1: + CFLUSH = 15 // ttydefaults.h:80:1: + CHWFLOW = 1114112 // termios.h:147:1: + CIGNORE = 0x00000001 // termios.h:129:1: + CINTR = 3 // ttydefaults.h:62:1: + CKILL = 21 // ttydefaults.h:64:1: + CLNEXT = 22 // ttydefaults.h:72:1: + CLOCAL = 0x00008000 // termios.h:141:1: + CMIN = 1 // ttydefaults.h:65:1: + CQUIT = 034 // ttydefaults.h:66:1: + CREAD = 0x00000800 // termios.h:137:1: + CREPRINT = 18 // ttydefaults.h:75:1: + CRPRNT = 18 // ttydefaults.h:79:1: + CRTSCTS = 0x00010000 // termios.h:143:1: + CRTS_IFLOW = 65536 // termios.h:144:1: + CS5 = 0x00000000 // termios.h:132:1: + CS6 = 0x00000100 // termios.h:133:1: + CS7 = 0x00000200 // termios.h:134:1: + CS8 = 0x00000300 // termios.h:135:1: + CSIZE = 0x00000300 // termios.h:131:1: + CSTART = 17 // ttydefaults.h:70:1: + CSTOP = 19 // ttydefaults.h:71:1: + CSTOPB = 0x00000400 // termios.h:136:1: + CSUSP = 26 // ttydefaults.h:67:1: + CTIME = 0 // ttydefaults.h:68:1: + CWERASE = 23 // ttydefaults.h:74:1: + ECHO = 0x00000008 // termios.h:163:1: + ECHOCTL = 0x00000040 // termios.h:167:1: + ECHOE = 0x00000002 // termios.h:161:1: + ECHOK = 0x00000004 // termios.h:162:1: + ECHOKE = 0x00000001 // termios.h:159:1: + ECHONL = 0x00000010 // termios.h:164:1: + ECHOPRT = 0x00000020 // termios.h:166:1: + ENDRUNDISC = 9 // ttycom.h:149:1: + EXTA = 19200 // termios.h:236:1: + EXTB = 38400 // termios.h:237:1: + EXTPROC = 0x00000800 // termios.h:175:1: + FLUSHO = 0x00800000 // termios.h:178:1: + HUPCL = 0x00004000 // termios.h:140:1: + ICANON = 0x00000100 // termios.h:170:1: + ICRNL = 0x00000100 // termios.h:98:1: + IEXTEN = 0x00000400 // termios.h:174:1: + IGNBRK = 0x00000001 // termios.h:90:1: + IGNCR = 0x00000080 // termios.h:97:1: + IGNPAR = 0x00000004 // termios.h:92:1: + IMAXBEL = 0x00002000 // termios.h:104:1: + INLCR = 0x00000040 // termios.h:96:1: + INPCK = 0x00000010 // termios.h:94:1: + IOCPARM_MASK = 0x1fff // ioccom.h:43:1: + ISIG = 0x00000080 // termios.h:169:1: + ISTRIP = 0x00000020 // termios.h:95:1: + IUCLC = 0x00001000 // termios.h:103:1: + IXANY = 0x00000800 // termios.h:102:1: + IXOFF = 0x00000400 // termios.h:100:1: + IXON = 0x00000200 // termios.h:99:1: + MDMBUF = 0x00100000 // termios.h:146:1: + MSTSDISC = 8 // ttycom.h:148:1: + NCCS = 20 // termios.h:79:1: + NMEADISC = 7 // ttycom.h:147:1: + NOFLSH = 0x80000000 // termios.h:183:1: + NOKERNINFO = 0x02000000 // termios.h:180:1: + OCRNL = 0x00000010 // termios.h:119:1: + OLCUC = 0x00000020 // termios.h:120:1: + ONLCR = 0x00000002 // termios.h:112:1: + ONLRET = 0x00000080 // termios.h:122:1: + ONOCR = 0x00000040 // termios.h:121:1: + ONOEOT = 0x00000008 // termios.h:116:1: + OPOST = 0x00000001 // termios.h:110:1: + OXTABS = 0x00000004 // termios.h:115:1: + PARENB = 0x00001000 // termios.h:138:1: + PARMRK = 0x00000008 // termios.h:93:1: + PARODD = 0x00002000 // termios.h:139:1: + PENDIN = 0x20000000 // termios.h:181:1: + PPPDISC = 5 // ttycom.h:145:1: + SLIPDISC = 4 // ttycom.h:144:1: + STRIPDISC = 6 // ttycom.h:146:1: + TABLDISC = 3 // ttycom.h:143:1: + TCIFLUSH = 1 // termios.h:242:1: + TCIOFF = 3 // termios.h:247:1: + TCIOFLUSH = 3 // termios.h:244:1: + TCION = 4 // termios.h:248:1: + TCOFLUSH = 2 // termios.h:243:1: + TCOOFF = 1 // termios.h:245:1: + TCOON = 2 // termios.h:246:1: + TCSADRAIN = 1 // termios.h:203:1: + TCSAFLUSH = 2 // termios.h:204:1: + TCSANOW = 0 // termios.h:202:1: + TCSASOFT = 0x10 // termios.h:206:1: + TIOCFLAG_CLOCAL = 0x02 // ttycom.h:131:1: + TIOCFLAG_CRTSCTS = 0x04 // ttycom.h:132:1: + TIOCFLAG_MDMBUF = 0x08 // ttycom.h:133:1: + TIOCFLAG_PPS = 0x10 // ttycom.h:134:1: + TIOCFLAG_SOFTCAR = 0x01 // ttycom.h:130:1: + TIOCM_CAR = 0100 // ttycom.h:69:1: + TIOCM_CD = 64 // ttycom.h:70:1: + TIOCM_CTS = 0040 // ttycom.h:68:1: + TIOCM_DSR = 0400 // ttycom.h:73:1: + TIOCM_DTR = 0002 // ttycom.h:64:1: + TIOCM_LE = 0001 // ttycom.h:63:1: + TIOCM_RI = 128 // ttycom.h:72:1: + TIOCM_RNG = 0200 // ttycom.h:71:1: + TIOCM_RTS = 0004 // ttycom.h:65:1: + TIOCM_SR = 0020 // ttycom.h:67:1: + TIOCM_ST = 0010 // ttycom.h:66:1: + TIOCPKT_DATA = 0x00 // ttycom.h:100:1: + TIOCPKT_DOSTOP = 0x20 // ttycom.h:106:1: + TIOCPKT_FLUSHREAD = 0x01 // ttycom.h:101:1: + TIOCPKT_FLUSHWRITE = 0x02 // ttycom.h:102:1: + TIOCPKT_IOCTL = 0x40 // ttycom.h:107:1: + TIOCPKT_NOSTOP = 0x10 // ttycom.h:105:1: + TIOCPKT_START = 0x08 // ttycom.h:104:1: + TIOCPKT_STOP = 0x04 // ttycom.h:103:1: + TOSTOP = 0x00400000 // termios.h:176:1: + TTYDEF_CFLAG = 19200 // ttydefaults.h:52:1: + TTYDEF_IFLAG = 11010 // ttydefaults.h:49:1: + TTYDEF_LFLAG = 1483 // ttydefaults.h:51:1: + TTYDEF_OFLAG = 3 // ttydefaults.h:50:1: + TTYDEF_SPEED = 9600 // ttydefaults.h:53:1: + TTYDISC = 0 // ttycom.h:142:1: + VDISCARD = 15 // termios.h:71:1: + VDSUSP = 11 // termios.h:65:1: + VEOF = 0 // termios.h:47:1: + VEOL = 1 // termios.h:48:1: + VEOL2 = 2 // termios.h:50:1: + VERASE = 3 // termios.h:52:1: + VINTR = 8 // termios.h:61:1: + VKILL = 5 // termios.h:56:1: + VLNEXT = 14 // termios.h:70:1: + VMIN = 16 // termios.h:73:1: + VQUIT = 9 // termios.h:62:1: + VREPRINT = 6 // termios.h:58:1: + VSTART = 12 // termios.h:67:1: + VSTATUS = 18 // termios.h:76:1: + VSTOP = 13 // termios.h:68:1: + VSUSP = 10 // termios.h:63:1: + VTIME = 17 // termios.h:74:1: + VWERASE = 4 // termios.h:54:1: + XCASE = 0x01000000 // termios.h:179:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_PID_T_DEFINED_ = 0 // termios.h:254:1: + X_POSIX_VDISABLE = 255 // termios.h:81:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_IOCCOM_H_ = 0 // ioccom.h:36:1: + X_SYS_TERMIOS_H_ = 0 // termios.h:36:1: + X_SYS_TTYCOM_H_ = 0 // ttycom.h:41:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:44:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: termios.h,v 1.13 2016/09/20 21:10:22 fcambus Exp $ +// $NetBSD: termios.h,v 1.14 1996/04/09 20:55:41 cgd Exp $ + +// Copyright (c) 1988, 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. +// +// @(#)termios.h 8.3 (Berkeley) 3/28/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// Special Control Characters +// +// Index into c_cc[] character array. +// +// Name Subscript Enabled by +// 7 spare 1 +// 19 spare 2 + +// Input flags - software input processing + +// Output flags - software output processing + +// Control flags - hardware control of terminal + +// "Local" flags - dumping ground for other state +// +// Warning: some flags in this structure begin with +// the letter "I" and look like they belong in the +// input flag. + +type Tcflag_t = uint32 /* termios.h:185:22 */ +type Cc_t = uint8 /* termios.h:186:23 */ +type Speed_t = uint32 /* termios.h:187:22 */ + +type Termios = struct { + Fc_iflag Tcflag_t + Fc_oflag Tcflag_t + Fc_cflag Tcflag_t + Fc_lflag Tcflag_t + Fc_cc [20]Cc_t + Fc_ispeed int32 + Fc_ospeed int32 +} /* termios.h:189:1 */ + +// Commands passed to tcsetattr() for setting the termios structure. + +// Standard speeds + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Pid_t = X__pid_t /* termios.h:255:18 */ + +// Include tty ioctl's that aren't just for backwards compatibility +// with the old tty driver. These ioctl definitions were previously +// in <sys/ioctl.h>. +// $OpenBSD: ttycom.h,v 1.17 2018/06/16 13:55:03 deraadt Exp $ +// $NetBSD: ttycom.h,v 1.4 1996/05/19 17:17:53 jonathan Exp $ + +// - +// Copyright (c) 1982, 1986, 1990, 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. +// +// @(#)ttycom.h 8.1 (Berkeley) 3/28/94 + +// $OpenBSD: ioccom.h,v 1.5 2013/03/22 21:22:05 deraadt Exp $ +// $NetBSD: ioccom.h,v 1.4 1994/10/30 21:49:56 cgd Exp $ + +// - +// Copyright (c) 1982, 1986, 1990, 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. +// +// @(#)ioccom.h 8.2 (Berkeley) 3/28/94 + +// Ioctl's have the command encoded in the lower word, and the size of +// any in or out parameters in the upper word. The high 3 bits of the +// upper word are used to encode the in/out status of the parameter. + +// no parameters +// copy parameters out +// copy parameters in +// copy parameters in and out +// mask for IN/OUT/VOID + +// this should be _IORW, but stdio got there first + +// Tty ioctl's. + +// Window/terminal size structure. This information is stored by the kernel +// in order to provide a consistent interface, but is not used by the kernel. +type Winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} /* ttycom.h:51:1 */ + +type Tstamps = struct { + Fts_set int32 + Fts_clr int32 +} /* ttycom.h:58:1 */ + +// 8-10 compat +// 15 unused +// 17-18 compat +// 127-124 compat +// 117-116 compat + +// Backwards compatibility + +// END OF PROTECTED INCLUDE. + +// $OpenBSD: ttydefaults.h,v 1.7 2019/03/12 11:01:25 nicm Exp $ +// $NetBSD: ttydefaults.h,v 1.8 1996/04/09 20:55:45 cgd Exp $ + +// - +// Copyright (c) 1982, 1986, 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. +// +// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 + +// System wide defaults for terminal state. + +// Defaults on "first" open. + +// Control Character Defaults +// compat + +// PROTECTED INCLUSION ENDS HERE + +// #define TTYDEFCHARS to include an array of default control characters. +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/capi_darwin_amd64.go b/vendor/modernc.org/libc/time/capi_darwin_amd64.go index ef5b65c2..375a251a 100644 --- a/vendor/modernc.org/libc/time/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/time/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o time/time_darwin_amd64.go -pkgname time', DO NOT EDIT. +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_darwin_amd64.go -pkgname time', DO NOT EDIT. package time diff --git a/vendor/modernc.org/libc/time/capi_freebsd_arm.go b/vendor/modernc.org/libc/time/capi_freebsd_arm.go new file mode 100644 index 00000000..b29daaf0 --- /dev/null +++ b/vendor/modernc.org/libc/time/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_freebsd_arm.go -pkgname time', DO NOT EDIT. + +package time + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/time/capi_freebsd_arm64.go b/vendor/modernc.org/libc/time/capi_freebsd_arm64.go new file mode 100644 index 00000000..b937a647 --- /dev/null +++ b/vendor/modernc.org/libc/time/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_freebsd_amd64.go -pkgname time', DO NOT EDIT. + +package time + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/time/capi_netbsd_arm.go b/vendor/modernc.org/libc/time/capi_netbsd_arm.go new file mode 100644 index 00000000..6cffe7e7 --- /dev/null +++ b/vendor/modernc.org/libc/time/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_netbsd_arm.go -pkgname time', DO NOT EDIT. + +package time + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/time/capi_openbsd_386.go b/vendor/modernc.org/libc/time/capi_openbsd_386.go new file mode 100644 index 00000000..4fd3ec68 --- /dev/null +++ b/vendor/modernc.org/libc/time/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_openbsd_386.go -pkgname time', DO NOT EDIT. + +package time + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/time/capi_openbsd_arm64.go b/vendor/modernc.org/libc/time/capi_openbsd_arm64.go new file mode 100644 index 00000000..6cb62d51 --- /dev/null +++ b/vendor/modernc.org/libc/time/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_openbsd_arm64.go -pkgname time', DO NOT EDIT. + +package time + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/time/capi_windows_386.go b/vendor/modernc.org/libc/time/capi_windows_386.go index b379fa17..914065db 100644 --- a/vendor/modernc.org/libc/time/capi_windows_386.go +++ b/vendor/modernc.org/libc/time/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo time\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o time\time_windows_386.go -pkgname time', DO NOT EDIT. +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_windows_386.go -pkgname time', DO NOT EDIT. package time diff --git a/vendor/modernc.org/libc/time/time_darwin_amd64.go b/vendor/modernc.org/libc/time/time_darwin_amd64.go index f11856c4..e8be98b2 100644 --- a/vendor/modernc.org/libc/time/time_darwin_amd64.go +++ b/vendor/modernc.org/libc/time/time_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o time/time_darwin_amd64.go -pkgname time', DO NOT EDIT. +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_darwin_amd64.go -pkgname time', DO NOT EDIT. package time @@ -15,38 +15,38 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLOCKS_PER_SEC = 1000000 - TIME_UTC = 1 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CLOCK_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SIZE_T = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_H_ = 0 - X_TIME_T = 0 - X_UINTPTR_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + CLOCKS_PER_SEC = 1000000 // time.h:90:1: + TIME_UTC = 1 // time.h:197:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CLOCK_T = 0 // _clock_t.h:29:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_H_ = 0 // time.h:64:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) const ( /* time.h:153:1: */ diff --git a/vendor/modernc.org/libc/time/time_freebsd_386.go b/vendor/modernc.org/libc/time/time_freebsd_386.go index 3e2c0935..4dae74e9 100644 --- a/vendor/modernc.org/libc/time/time_freebsd_386.go +++ b/vendor/modernc.org/libc/time/time_freebsd_386.go @@ -41,7 +41,7 @@ const ( X_CLOCK_T_DECLARED = 0 // time.h:64:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_ILP32 = 1 // <predefined>:1:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_Nonnull = 0 // cdefs.h:790:1: @@ -57,7 +57,7 @@ const ( X_TIMER_T_DECLARED = 0 // time.h:88:1: X_TIME_H_ = 0 // time.h:44:1: X_TIME_T_DECLARED = 0 // time.h:69:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: I386 = 1 // <predefined>:335:1: Unix = 1 // <predefined>:336:1: ) @@ -606,8 +606,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -894,7 +894,6 @@ type Tm = struct { // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -922,6 +921,6 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_freebsd_amd64.go b/vendor/modernc.org/libc/time/time_freebsd_amd64.go index 74bac261..bc17cd07 100644 --- a/vendor/modernc.org/libc/time/time_freebsd_amd64.go +++ b/vendor/modernc.org/libc/time/time_freebsd_amd64.go @@ -15,46 +15,50 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLK_TCK = 128 // time.h:55:1: - CLOCKS_PER_SEC = 128 // time.h:59:1: - CLOCK_MONOTONIC = 4 // time.h:109:1: - CLOCK_MONOTONIC_FAST = 12 // time.h:116:1: - CLOCK_MONOTONIC_PRECISE = 11 // time.h:115:1: - CLOCK_PROCESS_CPUTIME_ID = 15 // time.h:119:1: - CLOCK_PROF = 2 // time.h:106:1: - CLOCK_REALTIME = 0 // time.h:102:1: - CLOCK_REALTIME_FAST = 10 // time.h:114:1: - CLOCK_REALTIME_PRECISE = 9 // time.h:113:1: - CLOCK_SECOND = 13 // time.h:117:1: - CLOCK_THREAD_CPUTIME_ID = 14 // time.h:118:1: - CLOCK_UPTIME = 5 // time.h:110:1: - CLOCK_UPTIME_FAST = 8 // time.h:112:1: - CLOCK_UPTIME_PRECISE = 7 // time.h:111:1: - CLOCK_VIRTUAL = 1 // time.h:105:1: - TIMER_ABSTIME = 0x1 // time.h:126:1: - TIMER_RELTIME = 0x0 // time.h:123:1: - TIME_UTC = 1 // time.h:216:1: - X_CLOCKID_T_DECLARED = 0 // time.h:82:1: - X_CLOCK_T_DECLARED = 0 // time.h:63:1: + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + X_CLOCKID_T_DECLARED = 0 // time.h:83:1: + X_CLOCK_T_DECLARED = 0 // time.h:64:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: - X_LOCALE_T_DEFINED = 0 // _time.h:35:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: - X_PID_T_DECLARED = 0 // time.h:96:1: - X_SIZE_T_DECLARED = 0 // time.h:73:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PID_T_DECLARED = 0 // time.h:97:1: + X_SIZE_T_DECLARED = 0 // time.h:74:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: - X_TIMER_T_DECLARED = 0 // time.h:87:1: + X_TIMER_T_DECLARED = 0 // time.h:88:1: X_TIME_H_ = 0 // time.h:44:1: - X_TIME_T_DECLARED = 0 // time.h:68:1: - X_XLOCALE_LOCALE1_H = 0 // _time.h:45:1: - Unix = 1 // <predefined>:337:1: + X_TIME_T_DECLARED = 0 // time.h:69:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -330,12 +334,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -607,8 +614,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -656,19 +663,73 @@ type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GN // Programs can use this to avoid including <sys/param.h>, with its associated // namespace pollution. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + // Frequency of the clock ticks reported by times(). Deprecated - use // sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) // Frequency of the clock ticks reported by clock(). -type Clock_t = X__clock_t /* time.h:62:19 */ +type Clock_t = X__clock_t /* time.h:63:19 */ -type Time_t = X__time_t /* time.h:67:18 */ +type Time_t = X__time_t /* time.h:68:18 */ // New in POSIX 1003.1b-1993. -type Clockid_t = X__clockid_t /* time.h:81:21 */ +type Clockid_t = X__clockid_t /* time.h:82:21 */ -type Timer_t = X__timer_t /* time.h:86:19 */ +type Timer_t = X__timer_t /* time.h:87:19 */ // - // SPDX-License-Identifier: BSD-3-Clause @@ -821,9 +882,7 @@ type Itimerspec = struct { } } /* timespec.h:60:1 */ -type Pid_t = X__pid_t /* time.h:95:18 */ - -// These macros are also in sys/time.h. +type Pid_t = X__pid_t /* time.h:96:18 */ type Tm = struct { Ftm_sec int32 @@ -838,13 +897,12 @@ type Tm = struct { F__ccgo_pad1 [4]byte Ftm_gmtoff int64 Ftm_zone uintptr -} /* time.h:129:1 */ +} /* time.h:101:1 */ // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011, 2012 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -872,6 +930,6 @@ type Tm = struct { // // $FreeBSD$ -type Locale_t = uintptr /* _time.h:36:25 */ +type Locale_t = uintptr /* _time.h:35:25 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_freebsd_arm.go b/vendor/modernc.org/libc/time/time_freebsd_arm.go new file mode 100644 index 00000000..d4cde76d --- /dev/null +++ b/vendor/modernc.org/libc/time/time_freebsd_arm.go @@ -0,0 +1,878 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_freebsd_arm.go -pkgname time', DO NOT EDIT. + +package time + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + X_CLOCKID_T_DECLARED = 0 // time.h:83:1: + X_CLOCK_T_DECLARED = 0 // time.h:64:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PID_T_DECLARED = 0 // time.h:97:1: + X_SIZE_T_DECLARED = 0 // time.h:74:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // time.h:88:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // time.h:69:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +type Clock_t = X__clock_t /* time.h:63:19 */ + +type Time_t = X__time_t /* time.h:68:18 */ + +// New in POSIX 1003.1b-1993. +type Clockid_t = X__clockid_t /* time.h:82:21 */ + +type Timer_t = X__timer_t /* time.h:87:19 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type Pid_t = X__pid_t /* time.h:96:18 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_freebsd_arm64.go b/vendor/modernc.org/libc/time/time_freebsd_arm64.go new file mode 100644 index 00000000..bc17cd07 --- /dev/null +++ b/vendor/modernc.org/libc/time/time_freebsd_arm64.go @@ -0,0 +1,935 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_freebsd_amd64.go -pkgname time', DO NOT EDIT. + +package time + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLK_TCK = 128 // time.h:56:1: + CLOCKS_PER_SEC = 128 // time.h:60:1: + CLOCK_BOOTTIME = 5 // _clock_id.h:92:1: + CLOCK_MONOTONIC = 4 // _clock_id.h:67:1: + CLOCK_MONOTONIC_COARSE = 12 // _clock_id.h:94:1: + CLOCK_MONOTONIC_FAST = 12 // _clock_id.h:79:1: + CLOCK_MONOTONIC_PRECISE = 11 // _clock_id.h:78:1: + CLOCK_PROCESS_CPUTIME_ID = 15 // _clock_id.h:85:1: + CLOCK_PROF = 2 // _clock_id.h:64:1: + CLOCK_REALTIME = 0 // _clock_id.h:60:1: + CLOCK_REALTIME_COARSE = 10 // _clock_id.h:93:1: + CLOCK_REALTIME_FAST = 10 // _clock_id.h:77:1: + CLOCK_REALTIME_PRECISE = 9 // _clock_id.h:76:1: + CLOCK_SECOND = 13 // _clock_id.h:80:1: + CLOCK_THREAD_CPUTIME_ID = 14 // _clock_id.h:84:1: + CLOCK_UPTIME = 5 // _clock_id.h:74:1: + CLOCK_UPTIME_FAST = 8 // _clock_id.h:68:1: + CLOCK_UPTIME_PRECISE = 7 // _clock_id.h:75:1: + CLOCK_VIRTUAL = 1 // _clock_id.h:63:1: + TIMER_ABSTIME = 0x1 // _clock_id.h:101:1: + TIMER_RELTIME = 0x0 // _clock_id.h:98:1: + TIME_UTC = 1 // time.h:188:1: + X_CLOCKID_T_DECLARED = 0 // time.h:83:1: + X_CLOCK_T_DECLARED = 0 // time.h:64:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LOCALE_T_DEFINED = 0 // _time.h:34:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_PID_T_DECLARED = 0 // time.h:97:1: + X_SIZE_T_DECLARED = 0 // time.h:74:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SYS__CLOCK_ID_H = 0 // _clock_id.h:40:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // time.h:88:1: + X_TIME_H_ = 0 // time.h:44:1: + X_TIME_T_DECLARED = 0 // time.h:69:1: + X_XLOCALE_LOCALE1_H = 0 // _time.h:44:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2003 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1989, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.3 (Berkeley) 1/21/94 + +// These macros are shared between time.h and sys/time.h. + +// Note: The values shown below as a comment for the __POSIX_VISIBLE values are +// the ones FreeBSD traditionally used based on our reading of the POSIX +// standards. However, glibc uses 199309 for all of them, even those many were +// not defined there. To remain bug compatible with glibc means more software +// that relied on the glibc behavior will compile easily on FreeBSD. +// +// Also, CLOCK_UPTIME_FAST is improperly visible temporarily for the lang/pocl +// port until it can be updated properly. It incorrectly assumes that this was a +// standard value. It will be moved back to the __BSD_VISIBLE section once the +// issue is corrected. + +// FreeBSD-specific clocks. + +// Linux compatible names. + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +// Frequency of the clock ticks reported by clock(). + +type Clock_t = X__clock_t /* time.h:63:19 */ + +type Time_t = X__time_t /* time.h:68:18 */ + +// New in POSIX 1003.1b-1993. +type Clockid_t = X__clockid_t /* time.h:82:21 */ + +type Timer_t = X__timer_t /* time.h:87:19 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type Pid_t = X__pid_t /* time.h:96:18 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:101:1 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011, 2012 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _time.h:35:25 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_linux_386.go b/vendor/modernc.org/libc/time/time_linux_386.go index ed3dcf30..a613fec6 100644 --- a/vendor/modernc.org/libc/time/time_linux_386.go +++ b/vendor/modernc.org/libc/time/time_linux_386.go @@ -332,7 +332,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -343,13 +344,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // ISO/IEC 9899:1999 7.23.1: Components of time @@ -513,7 +516,8 @@ type Tm = struct { // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/time/time_linux_amd64.go b/vendor/modernc.org/libc/time/time_linux_amd64.go index 9d9cd701..e7f73f0d 100644 --- a/vendor/modernc.org/libc/time/time_linux_amd64.go +++ b/vendor/modernc.org/libc/time/time_linux_amd64.go @@ -350,7 +350,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -361,8 +362,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -531,7 +533,8 @@ type Tm = struct { // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/time/time_linux_arm.go b/vendor/modernc.org/libc/time/time_linux_arm.go index 053d7ac7..02a06cf5 100644 --- a/vendor/modernc.org/libc/time/time_linux_arm.go +++ b/vendor/modernc.org/libc/time/time_linux_arm.go @@ -360,7 +360,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -371,13 +372,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // ISO/IEC 9899:1999 7.23.1: Components of time @@ -541,7 +544,8 @@ type Tm = struct { // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/time/time_linux_arm64.go b/vendor/modernc.org/libc/time/time_linux_arm64.go index 2ec360d6..75faedcd 100644 --- a/vendor/modernc.org/libc/time/time_linux_arm64.go +++ b/vendor/modernc.org/libc/time/time_linux_arm64.go @@ -383,7 +383,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -394,8 +395,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -564,7 +566,8 @@ type Tm = struct { // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/time/time_linux_ppc64le.go b/vendor/modernc.org/libc/time/time_linux_ppc64le.go index e8098097..806f6dc9 100644 --- a/vendor/modernc.org/libc/time/time_linux_ppc64le.go +++ b/vendor/modernc.org/libc/time/time_linux_ppc64le.go @@ -362,7 +362,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -373,8 +374,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -543,7 +545,8 @@ type Tm = struct { // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/time/time_linux_riscv64.go b/vendor/modernc.org/libc/time/time_linux_riscv64.go index e60813d5..bb44255f 100644 --- a/vendor/modernc.org/libc/time/time_linux_riscv64.go +++ b/vendor/modernc.org/libc/time/time_linux_riscv64.go @@ -385,7 +385,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -396,8 +397,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -566,7 +568,8 @@ type Tm = struct { // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/time/time_linux_s390x.go b/vendor/modernc.org/libc/time/time_linux_s390x.go index d8093d38..7c0a4e8c 100644 --- a/vendor/modernc.org/libc/time/time_linux_s390x.go +++ b/vendor/modernc.org/libc/time/time_linux_s390x.go @@ -351,7 +351,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -362,8 +363,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -532,7 +534,8 @@ type Tm = struct { // values. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t diff --git a/vendor/modernc.org/libc/time/time_netbsd_amd64.go b/vendor/modernc.org/libc/time/time_netbsd_amd64.go index 69bd3dba..a6c2c51e 100644 --- a/vendor/modernc.org/libc/time/time_netbsd_amd64.go +++ b/vendor/modernc.org/libc/time/time_netbsd_amd64.go @@ -1924,6 +1924,7 @@ type Timezone = struct { // 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 type Bintime = struct { Fsec Time_t diff --git a/vendor/modernc.org/libc/time/time_netbsd_arm.go b/vendor/modernc.org/libc/time/time_netbsd_arm.go new file mode 100644 index 00000000..e03b8c34 --- /dev/null +++ b/vendor/modernc.org/libc/time/time_netbsd_arm.go @@ -0,0 +1,2313 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_netbsd_arm.go -pkgname time', DO NOT EDIT. + +package time + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + CLOCKS_PER_SEC = 100 // time.h:73:1: + CLOCK_MONOTONIC = 3 // time.h:297:1: + CLOCK_PROCESS_CPUTIME_ID = 0x40000000 // time.h:299:1: + CLOCK_PROF = 2 // time.h:296:1: + CLOCK_REALTIME = 0 // time.h:294:1: + CLOCK_THREAD_CPUTIME_ID = 0x20000000 // time.h:298:1: + CLOCK_VIRTUAL = 1 // time.h:295:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + ITIMER_MONOTONIC = 3 // time.h:278:1: + ITIMER_PROF = 2 // time.h:277:1: + ITIMER_REAL = 0 // time.h:275:1: + ITIMER_VIRTUAL = 1 // time.h:276:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + TIMER_ABSTIME = 0x1 // time.h:304:1: + TIMER_RELTIME = 0x0 // time.h:302:1: + TIME_UTC = 1 // time.h:238:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_IDTYPE_H_ = 0 // idtype.h:32:1: + X_SYS_NULL_H_ = 0 // null.h:9:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:38:1: + X_SYS_TIME_H_ = 0 // time.h:35:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_TIME_H_ = 0 // time.h:40:1: +) + +// $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. + +// 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. +const ( /* idtype.h:41:1: */ + P_MYID = -1 // Me/my process group + P_ALL = 0 // All processes. + P_PID = 1 // A process identifier. + P_LWPID = 2 // An LWP identifier. + P_PPID = 3 // A parent process identifier. + P_PGID = 4 // A process group identifier. + P_SID = 5 // A session identifier. + P_CID = 6 // A scheduling class identifier. + P_UID = 7 // A user identifier. + P_GID = 8 // A group identifier. + P_TASKID = 9 // A task identifier. + P_PROJID = 10 // A project identifier. + P_POOLID = 11 // A pool identifier. + P_ZONEID = 12 // A zone identifier. + P_CTID = 13 // A (process) contract identifier. + P_CPUID = 14 // CPU identifier. + P_PSETID = 15 // Processor set identifier. + X_P_MAXIDTYPE = 2147483647 +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +// $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999. +// Public domain. + +type Clock_t = uint32 /* time.h:49:23 */ + +type Time_t = X__int64_t /* time.h:54:22 */ + +type Clockid_t = int32 /* time.h:64:25 */ + +type Timer_t = int32 /* time.h:69:23 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:75:1 */ + +// ISO/IEC 9899:201x 7.27.1/3 Components of time +// $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 + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* timespec.h:47:1 */ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// Structure returned by gettimeofday(2) system call, +// and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* time.h:44:1 */ + +// $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 + +// Note: timezone is obsolete. All timezone handling is now in +// userland. Its just here for back compatibility. +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:65:1 */ + +// Operations on timevals. + +// 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 +type Bintime = struct { + Fsec Time_t + Ffrac Uint64_t +} /* time.h:102:1 */ + +// Operations on timespecs. + +// Names of the interval timers, and structure +// defining a timer setting. +// NB: Must match the CLOCK_ constants below. + +type Itimerval = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte + } +} /* time.h:280:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* time.h:289:1 */ + +// $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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $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 + +// This header file defines various signal-related types. We also keep +// the macros to manipulate sigset_t here, to encapsulate knowledge of +// its internals. + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */ + +// Macro for manipulating signal masks. + +type Sigaltstack = struct { + Fss_sp uintptr + Fss_size Size_t + Fss_flags int32 +} /* sigtypes.h:108:9 */ + +// Macro for manipulating signal masks. + +type Stack_t = Sigaltstack /* sigtypes.h:116:3 */ +// $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. + +// 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. +type Idtype_t = int32 /* idtype.h:60:3 */ + +type Locale_t = uintptr /* time.h:188:25 */ + +type Timezone_t = uintptr /* time.h:198:24 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_openbsd_386.go b/vendor/modernc.org/libc/time/time_openbsd_386.go new file mode 100644 index 00000000..3a627a06 --- /dev/null +++ b/vendor/modernc.org/libc/time/time_openbsd_386.go @@ -0,0 +1,516 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_openbsd_386.go -pkgname time', DO NOT EDIT. + +package time + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + X_CLOCKID_T_DEFINED_ = 0 // time.h:87:1: + X_CLOCK_T_DEFINED_ = 0 // time.h:49:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_PID_T_DEFINED_ = 0 // time.h:99:1: + X_SIZE_T_DEFINED_ = 0 // time.h:59:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // time.h:92:1: + X_TIMESPEC_DECLARED = 0 // time.h:75:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // time.h:54:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Clock_t = X__clock_t /* time.h:50:19 */ + +type Time_t = X__time_t /* time.h:55:18 */ + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 +} /* time.h:76:1 */ + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + } +} /* _time.h:56:1 */ + +type Clockid_t = X__clockid_t /* time.h:88:21 */ + +type Timer_t = X__timer_t /* time.h:93:19 */ + +type Pid_t = X__pid_t /* time.h:100:18 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + Ftm_gmtoff int32 + Ftm_zone uintptr +} /* time.h:111:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_openbsd_amd64.go b/vendor/modernc.org/libc/time/time_openbsd_amd64.go index 3b007cbe..7b9ca301 100644 --- a/vendor/modernc.org/libc/time/time_openbsd_amd64.go +++ b/vendor/modernc.org/libc/time/time_openbsd_amd64.go @@ -45,7 +45,7 @@ const ( X_TIMESPEC_DECLARED = 0 // time.h:75:1: X_TIME_H_ = 0 // time.h:42:1: X_TIME_T_DEFINED_ = 0 // time.h:54:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -271,7 +271,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -431,18 +431,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Clock_t = X__clock_t /* time.h:50:19 */ diff --git a/vendor/modernc.org/libc/time/time_openbsd_arm64.go b/vendor/modernc.org/libc/time/time_openbsd_arm64.go new file mode 100644 index 00000000..1e41bb7b --- /dev/null +++ b/vendor/modernc.org/libc/time/time_openbsd_arm64.go @@ -0,0 +1,524 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_openbsd_arm64.go -pkgname time', DO NOT EDIT. + +package time + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLK_TCK = 100 // time.h:68:1: + CLOCKS_PER_SEC = 100 // time.h:71:1: + CLOCK_BOOTTIME = 6 // _time.h:40:1: + CLOCK_MONOTONIC = 3 // _time.h:37:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // _time.h:36:1: + CLOCK_REALTIME = 0 // _time.h:35:1: + CLOCK_THREAD_CPUTIME_ID = 4 // _time.h:38:1: + CLOCK_UPTIME = 5 // _time.h:39:1: + TIMER_ABSTIME = 0x1 // _time.h:62:1: + TIMER_RELTIME = 0x0 // _time.h:61:1: + TIME_UTC = 1 // time.h:179:1: + X_CLOCKID_T_DEFINED_ = 0 // time.h:87:1: + X_CLOCK_T_DEFINED_ = 0 // time.h:49:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LOCALE_T_DEFINED_ = 0 // time.h:106:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_PID_T_DEFINED_ = 0 // time.h:99:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // time.h:59:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TIME_H_ = 0 // _time.h:33:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // time.h:92:1: + X_TIMESPEC_DECLARED = 0 // time.h:75:1: + X_TIME_H_ = 0 // time.h:42:1: + X_TIME_T_DEFINED_ = 0 // time.h:54:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ +// $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd 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. +// +// @(#)time.h 5.12 (Berkeley) 3/9/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Clock_t = X__clock_t /* time.h:50:19 */ + +type Time_t = X__time_t /* time.h:55:18 */ + +// Frequency of the clock ticks reported by times(). Deprecated - use +// sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.) + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* time.h:76:1 */ + +// $OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha 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. + +// Per-process and per-thread clocks encode the PID or TID into the +// high bits, with the type in the bottom bits + +// Structure defined by POSIX 1003.1b to be like a itimerval, +// but with timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* _time.h:56:1 */ + +type Clockid_t = X__clockid_t /* time.h:88:21 */ + +type Timer_t = X__timer_t /* time.h:93:19 */ + +type Pid_t = X__pid_t /* time.h:100:18 */ + +type Locale_t = uintptr /* time.h:107:14 */ + +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* time.h:111:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/time_windows_386.go b/vendor/modernc.org/libc/time/time_windows_386.go index c947a392..c66c7c63 100644 --- a/vendor/modernc.org/libc/time/time_windows_386.go +++ b/vendor/modernc.org/libc/time/time_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo time\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o time\time_windows_386.go -pkgname time', DO NOT EDIT. +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_windows_386.go -pkgname time', DO NOT EDIT. package time @@ -15,109 +15,109 @@ var _ atomic.Value var _ unsafe.Pointer const ( - CLK_TCK = 1000 - CLOCKS_PER_SEC = 1000 - CLOCK_MONOTONIC = 1 - CLOCK_PROCESS_CPUTIME_ID = 2 - CLOCK_REALTIME = 0 - CLOCK_THREAD_CPUTIME_ID = 3 - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - TIMER_ABSTIME = 1 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - WINPTHREAD_API = 0 - WIN_PTHREADS_TIME_H = 0 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CLOCK_T_DEFINED = 0 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC_WTIME_INL = 0 - X_INC_WTIME_S_INL = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_POSIX_CPUTIME = 200809 - X_POSIX_MONOTONIC_CLOCK = 200809 - X_POSIX_THREAD_CPUTIME = 200809 - X_POSIX_TIMERS = 200809 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMEB_DEFINED = 0 - X_TIMEB_H_ = 0 - X_TIMEB_H_S = 0 - X_TIMESPEC_DEFINED = 0 - X_TIMEVAL_DEFINED = 0 - X_TIMEZONE_DEFINED = 0 - X_TIME_H_ = 0 - X_TIME_T_DEFINED = 0 - X_TM_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WTIME_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + CLK_TCK = 1000 // time.h:245:1: + CLOCKS_PER_SEC = 1000 // time.h:110:1: + CLOCK_MONOTONIC = 1 // pthread_time.h:62:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // pthread_time.h:66:1: + CLOCK_REALTIME = 0 // pthread_time.h:58:1: + CLOCK_THREAD_CPUTIME_ID = 3 // pthread_time.h:70:1: + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + TIMER_ABSTIME = 1 // pthread_time.h:54:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + WINPTHREAD_API = 0 // pthread_time.h:80:1: + WIN_PTHREADS_TIME_H = 0 // pthread_time.h:26:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CLOCK_T_DEFINED = 0 // time.h:59:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC_WTIME_INL = 0 // time.h:190:1: + X_INC_WTIME_S_INL = 0 // time.h:202:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_POSIX_CPUTIME = 200809 // pthread_time.h:40:1: + X_POSIX_MONOTONIC_CLOCK = 200809 // pthread_time.h:35:1: + X_POSIX_THREAD_CPUTIME = 200809 // pthread_time.h:45:1: + X_POSIX_TIMERS = 200809 // pthread_time.h:30:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMEB_DEFINED = 0 // timeb.h:51:1: + X_TIMEB_H_ = 0 // timeb.h:7:1: + X_TIMEB_H_S = 0 // timeb_s.h:8:1: + X_TIMESPEC_DEFINED = 0 // timeb.h:90:1: + X_TIMEVAL_DEFINED = 0 // _timeval.h:8:1: + X_TIMEZONE_DEFINED = 0 // time.h:265:1: + X_TIME_H_ = 0 // time.h:7:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_TM_DEFINED = 0 // time.h:96:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WTIME_DEFINED = 0 // time.h:213:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -151,6 +151,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -171,6 +176,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -211,26 +222,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -256,29 +269,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type Clock_t = int32 /* time.h:60:16 */ @@ -294,10 +307,9 @@ type Tm = struct { Ftm_isdst int32 } /* time.h:97:3 */ -var Xdaylight int32 /* time.h:278:22: */ - -var Xtimezone int32 /* time.h:281:23: */ -var Xtzname [2]uintptr /* time.h:282:23: */ +var Xdaylight int32 /* time.h:256:22: */ +var Xtimezone int32 /* time.h:257:23: */ +var Xtzname [2]uintptr /* time.h:258:23: */ // * // This file has no copyright assigned and is placed in the Public Domain. @@ -312,7 +324,7 @@ type Timeval = struct { type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 -} /* time.h:290:1 */ +} /* time.h:266:1 */ // Adding timespec definition. // * @@ -352,7 +364,7 @@ type X__timeb64 = struct { type Timespec = struct { Ftv_sec Time_t Ftv_nsec int32 -} /* timeb.h:90:1 */ +} /* timeb.h:91:1 */ type Itimerspec = struct { Fit_interval struct { @@ -363,7 +375,7 @@ type Itimerspec = struct { Ftv_sec Time_t Ftv_nsec int32 } -} /* timeb.h:95:1 */ +} /* timeb.h:96:1 */ // POSIX 2008 says clock_gettime and timespec are defined in time.h header, // but other systems - like Linux, Solaris, etc - tend to declare such diff --git a/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go b/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go index f1a2922a..a25427f2 100644 --- a/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/unistd/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o unistd/unistd_darwin_amd64.go -pkgname unistd', DO NOT EDIT. +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_darwin_amd64.go -pkgname unistd', DO NOT EDIT. package unistd diff --git a/vendor/modernc.org/libc/unistd/capi_freebsd_arm.go b/vendor/modernc.org/libc/unistd/capi_freebsd_arm.go new file mode 100644 index 00000000..c0a42a8b --- /dev/null +++ b/vendor/modernc.org/libc/unistd/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_freebsd_arm.go -pkgname unistd', DO NOT EDIT. + +package unistd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/unistd/capi_freebsd_arm64.go b/vendor/modernc.org/libc/unistd/capi_freebsd_arm64.go new file mode 100644 index 00000000..a3682165 --- /dev/null +++ b/vendor/modernc.org/libc/unistd/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_freebsd_amd64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/unistd/capi_netbsd_arm.go b/vendor/modernc.org/libc/unistd/capi_netbsd_arm.go new file mode 100644 index 00000000..f0f8698b --- /dev/null +++ b/vendor/modernc.org/libc/unistd/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_netbsd_arm.go -pkgname unistd', DO NOT EDIT. + +package unistd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/unistd/capi_openbsd_386.go b/vendor/modernc.org/libc/unistd/capi_openbsd_386.go new file mode 100644 index 00000000..bb76cbbf --- /dev/null +++ b/vendor/modernc.org/libc/unistd/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_openbsd_386.go -pkgname unistd', DO NOT EDIT. + +package unistd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/unistd/capi_openbsd_arm64.go b/vendor/modernc.org/libc/unistd/capi_openbsd_arm64.go new file mode 100644 index 00000000..1d67ce0a --- /dev/null +++ b/vendor/modernc.org/libc/unistd/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_openbsd_arm64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/unistd/capi_windows_386.go b/vendor/modernc.org/libc/unistd/capi_windows_386.go index 119657c4..177be6d8 100644 --- a/vendor/modernc.org/libc/unistd/capi_windows_386.go +++ b/vendor/modernc.org/libc/unistd/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo unistd\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o unistd\unistd_windows_386.go -pkgname unistd', DO NOT EDIT. +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_windows_386.go -pkgname unistd', DO NOT EDIT. package unistd diff --git a/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go b/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go index cc2e8280..0150b6dd 100644 --- a/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go +++ b/vendor/modernc.org/libc/unistd/unistd_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o unistd/unistd_darwin_amd64.go -pkgname unistd', DO NOT EDIT. +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_darwin_amd64.go -pkgname unistd', DO NOT EDIT. package unistd @@ -15,370 +15,370 @@ var _ atomic.Value var _ unsafe.Pointer const ( - ACCESSX_MAX_DESCRIPTORS = 100 - ACCESSX_MAX_TABLESIZE = 16384 - FD_SETSIZE = 1024 - F_LOCK = 1 - F_OK = 0 - F_TEST = 3 - F_TLOCK = 2 - F_ULOCK = 0 - L_INCR = 1 - L_SET = 0 - L_XTND = 2 - R_OK = 4 - SEEK_CUR = 1 - SEEK_DATA = 4 - SEEK_END = 2 - SEEK_HOLE = 3 - SEEK_SET = 0 - STDERR_FILENO = 2 - STDIN_FILENO = 0 - STDOUT_FILENO = 1 - SYNC_VOLUME_FULLSYNC = 0x01 - SYNC_VOLUME_WAIT = 0x02 - W_OK = 2 - X_OK = 1 - X_ACCESS_EXTENDED_MASK = 4193792 - X_APPEND_OK = 8192 - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_CHOWN_OK = 2097152 - X_CS_DARWIN_USER_CACHE_DIR = 65538 - X_CS_DARWIN_USER_DIR = 65536 - X_CS_DARWIN_USER_TEMP_DIR = 65537 - X_CS_PATH = 1 - X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 - X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 - X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 - X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 - X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 - X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 - X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 - X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 - X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 - X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 - X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 - X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 - X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 - X_CS_XBS5_ILP32_OFF32_CFLAGS = 20 - X_CS_XBS5_ILP32_OFF32_LDFLAGS = 21 - X_CS_XBS5_ILP32_OFF32_LIBS = 22 - X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 23 - X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 24 - X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 25 - X_CS_XBS5_ILP32_OFFBIG_LIBS = 26 - X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 27 - X_CS_XBS5_LP64_OFF64_CFLAGS = 28 - X_CS_XBS5_LP64_OFF64_LDFLAGS = 29 - X_CS_XBS5_LP64_OFF64_LIBS = 30 - X_CS_XBS5_LP64_OFF64_LINTFLAGS = 31 - X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 32 - X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 33 - X_CS_XBS5_LPBIG_OFFBIG_LIBS = 34 - X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 35 - X_CTERMID_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_DELETE_OK = 4096 - X_DEV_T = 0 - X_EXECUTE_OK = 2048 - X_FD_SET = 0 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_GID_T = 0 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_MODE_T = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_OFF_T = 0 - X_PC_2_SYMLINKS = 15 - X_PC_ALLOC_SIZE_MIN = 16 - X_PC_ASYNC_IO = 17 - X_PC_AUTH_OPAQUE_NP = 14 - X_PC_CASE_PRESERVING = 12 - X_PC_CASE_SENSITIVE = 11 - X_PC_CHOWN_RESTRICTED = 7 - X_PC_EXTENDED_SECURITY_NP = 13 - X_PC_FILESIZEBITS = 18 - X_PC_LINK_MAX = 1 - X_PC_MAX_CANON = 2 - X_PC_MAX_INPUT = 3 - X_PC_MIN_HOLE_SIZE = 27 - X_PC_NAME_CHARS_MAX = 10 - X_PC_NAME_MAX = 4 - X_PC_NO_TRUNC = 8 - X_PC_PATH_MAX = 5 - X_PC_PIPE_BUF = 6 - X_PC_PRIO_IO = 19 - X_PC_REC_INCR_XFER_SIZE = 20 - X_PC_REC_MAX_XFER_SIZE = 21 - X_PC_REC_MIN_XFER_SIZE = 22 - X_PC_REC_XFER_ALIGN = 23 - X_PC_SYMLINK_MAX = 24 - X_PC_SYNC_IO = 25 - X_PC_VDISABLE = 9 - X_PC_XATTR_SIZE_BITS = 26 - X_PID_T = 0 - X_POSIX2_CHAR_TERM = 200112 - X_POSIX2_C_BIND = 200112 - X_POSIX2_C_DEV = 200112 - X_POSIX2_FORT_DEV = -1 - X_POSIX2_FORT_RUN = 200112 - X_POSIX2_LOCALEDEF = 200112 - X_POSIX2_PBS = -1 - X_POSIX2_PBS_ACCOUNTING = -1 - X_POSIX2_PBS_CHECKPOINT = -1 - X_POSIX2_PBS_LOCATE = -1 - X_POSIX2_PBS_MESSAGE = -1 - X_POSIX2_PBS_TRACK = -1 - X_POSIX2_SW_DEV = 200112 - X_POSIX2_UPE = 200112 - X_POSIX2_VERSION = 200112 - X_POSIX_ADVISORY_INFO = -1 - X_POSIX_ASYNCHRONOUS_IO = -1 - X_POSIX_BARRIERS = -1 - X_POSIX_CHOWN_RESTRICTED = 200112 - X_POSIX_CLOCK_SELECTION = -1 - X_POSIX_CPUTIME = -1 - X_POSIX_FSYNC = 200112 - X_POSIX_IPV6 = 200112 - X_POSIX_JOB_CONTROL = 200112 - X_POSIX_MAPPED_FILES = 200112 - X_POSIX_MEMLOCK = -1 - X_POSIX_MEMLOCK_RANGE = -1 - X_POSIX_MEMORY_PROTECTION = 200112 - X_POSIX_MESSAGE_PASSING = -1 - X_POSIX_MONOTONIC_CLOCK = -1 - X_POSIX_NO_TRUNC = 200112 - X_POSIX_PRIORITIZED_IO = -1 - X_POSIX_PRIORITY_SCHEDULING = -1 - X_POSIX_RAW_SOCKETS = -1 - X_POSIX_READER_WRITER_LOCKS = 200112 - X_POSIX_REALTIME_SIGNALS = -1 - X_POSIX_REGEXP = 200112 - X_POSIX_SAVED_IDS = 200112 - X_POSIX_SEMAPHORES = -1 - X_POSIX_SHARED_MEMORY_OBJECTS = -1 - X_POSIX_SHELL = 200112 - X_POSIX_SPAWN = -1 - X_POSIX_SPIN_LOCKS = -1 - X_POSIX_SPORADIC_SERVER = -1 - X_POSIX_SYNCHRONIZED_IO = -1 - X_POSIX_THREADS = 200112 - X_POSIX_THREAD_ATTR_STACKADDR = 200112 - X_POSIX_THREAD_ATTR_STACKSIZE = 200112 - X_POSIX_THREAD_CPUTIME = -1 - X_POSIX_THREAD_KEYS_MAX = 128 - X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 - X_POSIX_THREAD_PRIO_INHERIT = -1 - X_POSIX_THREAD_PRIO_PROTECT = -1 - X_POSIX_THREAD_PROCESS_SHARED = 200112 - X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 - X_POSIX_THREAD_SPORADIC_SERVER = -1 - X_POSIX_TIMEOUTS = -1 - X_POSIX_TIMERS = -1 - X_POSIX_TRACE = -1 - X_POSIX_TRACE_EVENT_FILTER = -1 - X_POSIX_TRACE_INHERIT = -1 - X_POSIX_TRACE_LOG = -1 - X_POSIX_TYPED_MEMORY_OBJECTS = -1 - X_POSIX_V6_ILP32_OFF32 = -1 - X_POSIX_V6_ILP32_OFFBIG = -1 - X_POSIX_V6_LP64_OFF64 = 1 - X_POSIX_V6_LPBIG_OFFBIG = 1 - X_POSIX_V7_ILP32_OFF32 = -1 - X_POSIX_V7_ILP32_OFFBIG = -1 - X_POSIX_V7_LP64_OFF64 = 1 - X_POSIX_V7_LPBIG_OFFBIG = 1 - X_POSIX_VERSION = 200112 - X_RATTR_OK = 32768 - X_READ_OK = 512 - X_REXT_OK = 131072 - X_RMFILE_OK = 16384 - X_RPERM_OK = 524288 - X_SC_2_CHAR_TERM = 20 - X_SC_2_C_BIND = 18 - X_SC_2_C_DEV = 19 - X_SC_2_FORT_DEV = 21 - X_SC_2_FORT_RUN = 22 - X_SC_2_LOCALEDEF = 23 - X_SC_2_PBS = 59 - X_SC_2_PBS_ACCOUNTING = 60 - X_SC_2_PBS_CHECKPOINT = 61 - X_SC_2_PBS_LOCATE = 62 - X_SC_2_PBS_MESSAGE = 63 - X_SC_2_PBS_TRACK = 64 - X_SC_2_SW_DEV = 24 - X_SC_2_UPE = 25 - X_SC_2_VERSION = 17 - X_SC_ADVISORY_INFO = 65 - X_SC_AIO_LISTIO_MAX = 42 - X_SC_AIO_MAX = 43 - X_SC_AIO_PRIO_DELTA_MAX = 44 - X_SC_ARG_MAX = 1 - X_SC_ASYNCHRONOUS_IO = 28 - X_SC_ATEXIT_MAX = 107 - X_SC_BARRIERS = 66 - X_SC_BC_BASE_MAX = 9 - X_SC_BC_DIM_MAX = 10 - X_SC_BC_SCALE_MAX = 11 - X_SC_BC_STRING_MAX = 12 - X_SC_CHILD_MAX = 2 - X_SC_CLK_TCK = 3 - X_SC_CLOCK_SELECTION = 67 - X_SC_COLL_WEIGHTS_MAX = 13 - X_SC_CPUTIME = 68 - X_SC_DELAYTIMER_MAX = 45 - X_SC_EXPR_NEST_MAX = 14 - X_SC_FILE_LOCKING = 69 - X_SC_FSYNC = 38 - X_SC_GETGR_R_SIZE_MAX = 70 - X_SC_GETPW_R_SIZE_MAX = 71 - X_SC_HOST_NAME_MAX = 72 - X_SC_IOV_MAX = 56 - X_SC_IPV6 = 118 - X_SC_JOB_CONTROL = 6 - X_SC_LINE_MAX = 15 - X_SC_LOGIN_NAME_MAX = 73 - X_SC_MAPPED_FILES = 47 - X_SC_MEMLOCK = 30 - X_SC_MEMLOCK_RANGE = 31 - X_SC_MEMORY_PROTECTION = 32 - X_SC_MESSAGE_PASSING = 33 - X_SC_MONOTONIC_CLOCK = 74 - X_SC_MQ_OPEN_MAX = 46 - X_SC_MQ_PRIO_MAX = 75 - X_SC_NGROUPS_MAX = 4 - X_SC_NPROCESSORS_CONF = 57 - X_SC_NPROCESSORS_ONLN = 58 - X_SC_OPEN_MAX = 5 - X_SC_PAGESIZE = 29 - X_SC_PAGE_SIZE = 29 - X_SC_PASS_MAX = 131 - X_SC_PHYS_PAGES = 200 - X_SC_PRIORITIZED_IO = 34 - X_SC_PRIORITY_SCHEDULING = 35 - X_SC_RAW_SOCKETS = 119 - X_SC_READER_WRITER_LOCKS = 76 - X_SC_REALTIME_SIGNALS = 36 - X_SC_REGEXP = 77 - X_SC_RE_DUP_MAX = 16 - X_SC_RTSIG_MAX = 48 - X_SC_SAVED_IDS = 7 - X_SC_SEMAPHORES = 37 - X_SC_SEM_NSEMS_MAX = 49 - X_SC_SEM_VALUE_MAX = 50 - X_SC_SHARED_MEMORY_OBJECTS = 39 - X_SC_SHELL = 78 - X_SC_SIGQUEUE_MAX = 51 - X_SC_SPAWN = 79 - X_SC_SPIN_LOCKS = 80 - X_SC_SPORADIC_SERVER = 81 - X_SC_SS_REPL_MAX = 126 - X_SC_STREAM_MAX = 26 - X_SC_SYMLOOP_MAX = 120 - X_SC_SYNCHRONIZED_IO = 40 - X_SC_THREADS = 96 - X_SC_THREAD_ATTR_STACKADDR = 82 - X_SC_THREAD_ATTR_STACKSIZE = 83 - X_SC_THREAD_CPUTIME = 84 - X_SC_THREAD_DESTRUCTOR_ITERATIONS = 85 - X_SC_THREAD_KEYS_MAX = 86 - X_SC_THREAD_PRIORITY_SCHEDULING = 89 - X_SC_THREAD_PRIO_INHERIT = 87 - X_SC_THREAD_PRIO_PROTECT = 88 - X_SC_THREAD_PROCESS_SHARED = 90 - X_SC_THREAD_SAFE_FUNCTIONS = 91 - X_SC_THREAD_SPORADIC_SERVER = 92 - X_SC_THREAD_STACK_MIN = 93 - X_SC_THREAD_THREADS_MAX = 94 - X_SC_TIMEOUTS = 95 - X_SC_TIMERS = 41 - X_SC_TIMER_MAX = 52 - X_SC_TRACE = 97 - X_SC_TRACE_EVENT_FILTER = 98 - X_SC_TRACE_EVENT_NAME_MAX = 127 - X_SC_TRACE_INHERIT = 99 - X_SC_TRACE_LOG = 100 - X_SC_TRACE_NAME_MAX = 128 - X_SC_TRACE_SYS_MAX = 129 - X_SC_TRACE_USER_EVENT_MAX = 130 - X_SC_TTY_NAME_MAX = 101 - X_SC_TYPED_MEMORY_OBJECTS = 102 - X_SC_TZNAME_MAX = 27 - X_SC_V6_ILP32_OFF32 = 103 - X_SC_V6_ILP32_OFFBIG = 104 - X_SC_V6_LP64_OFF64 = 105 - X_SC_V6_LPBIG_OFFBIG = 106 - X_SC_VERSION = 8 - X_SC_XBS5_ILP32_OFF32 = 122 - X_SC_XBS5_ILP32_OFFBIG = 123 - X_SC_XBS5_LP64_OFF64 = 124 - X_SC_XBS5_LPBIG_OFFBIG = 125 - X_SC_XOPEN_CRYPT = 108 - X_SC_XOPEN_ENH_I18N = 109 - X_SC_XOPEN_LEGACY = 110 - X_SC_XOPEN_REALTIME = 111 - X_SC_XOPEN_REALTIME_THREADS = 112 - X_SC_XOPEN_SHM = 113 - X_SC_XOPEN_STREAMS = 114 - X_SC_XOPEN_UNIX = 115 - X_SC_XOPEN_VERSION = 116 - X_SC_XOPEN_XCU_VERSION = 121 - X_SIGSET_T = 0 - X_SIZE_T = 0 - X_SSIZE_T = 0 - X_SUSECONDS_T = 0 - X_SYS_SELECT_H_ = 0 - X_SYS_UNISTD_H_ = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__SELECT_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UID_T = 0 - X_UINT32_T = 0 - X_UINT64_T = 0 - X_UINTPTR_T = 0 - X_UNISTD_H_ = 0 - X_USECONDS_T = 0 - X_UUID_T = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 - X_V6_ILP32_OFF32 = -1 - X_V6_ILP32_OFFBIG = -1 - X_V6_LP64_OFF64 = 1 - X_V6_LPBIG_OFFBIG = 1 - X_WATTR_OK = 65536 - X_WEXT_OK = 262144 - X_WPERM_OK = 1048576 - X_WRITE_OK = 1024 - X_XBS5_ILP32_OFF32 = -1 - X_XBS5_ILP32_OFFBIG = -1 - X_XBS5_LP64_OFF64 = 1 - X_XBS5_LPBIG_OFFBIG = 1 - X_XOPEN_CRYPT = 1 - X_XOPEN_ENH_I18N = 1 - X_XOPEN_LEGACY = -1 - X_XOPEN_REALTIME = -1 - X_XOPEN_REALTIME_THREADS = -1 - X_XOPEN_SHM = 1 - X_XOPEN_STREAMS = -1 - X_XOPEN_UNIX = 1 - X_XOPEN_VERSION = 600 - X_XOPEN_XCU_VERSION = 4 + ACCESSX_MAX_DESCRIPTORS = 100 // unistd.h:137:1: + ACCESSX_MAX_TABLESIZE = 16384 // unistd.h:138:1: + FD_SETSIZE = 1024 // _fd_setsize.h:29:1: + F_LOCK = 1 // unistd.h:528:1: + F_OK = 0 // unistd.h:89:1: + F_TEST = 3 // unistd.h:530:1: + F_TLOCK = 2 // unistd.h:529:1: + F_ULOCK = 0 // unistd.h:527:1: + L_INCR = 1 // unistd.h:127:1: + L_SET = 0 // unistd.h:126:1: + L_XTND = 2 // unistd.h:128:1: + R_OK = 4 // unistd.h:92:1: + SEEK_CUR = 1 // _seek_set.h:34:1: + SEEK_DATA = 4 // _seek_set.h:44:1: + SEEK_END = 2 // _seek_set.h:35:1: + SEEK_HOLE = 3 // _seek_set.h:40:1: + SEEK_SET = 0 // _seek_set.h:33:1: + STDERR_FILENO = 2 // unistd.h:88:1: + STDIN_FILENO = 0 // unistd.h:86:1: + STDOUT_FILENO = 1 // unistd.h:87:1: + SYNC_VOLUME_FULLSYNC = 0x01 // unistd.h:776:1: + SYNC_VOLUME_WAIT = 0x02 // unistd.h:777:1: + W_OK = 2 // unistd.h:91:1: + X_OK = 1 // unistd.h:90:1: + X_ACCESS_EXTENDED_MASK = 4193792 // unistd.h:114:1: + X_APPEND_OK = 8192 // unistd.h:104:1: + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CHOWN_OK = 2097152 // unistd.h:112:1: + X_CS_DARWIN_USER_CACHE_DIR = 65538 // unistd.h:415:1: + X_CS_DARWIN_USER_DIR = 65536 // unistd.h:413:1: + X_CS_DARWIN_USER_TEMP_DIR = 65537 // unistd.h:414:1: + X_CS_PATH = 1 // unistd.h:175:1: + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:377:1: + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:378:1: + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:379:1: + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:380:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:381:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:382:1: + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:383:1: + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:384:1: + X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:385:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:386:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:387:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:388:1: + X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:389:1: + X_CS_XBS5_ILP32_OFF32_CFLAGS = 20 // unistd.h:394:1: + X_CS_XBS5_ILP32_OFF32_LDFLAGS = 21 // unistd.h:395:1: + X_CS_XBS5_ILP32_OFF32_LIBS = 22 // unistd.h:396:1: + X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 23 // unistd.h:397:1: + X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 24 // unistd.h:398:1: + X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 25 // unistd.h:399:1: + X_CS_XBS5_ILP32_OFFBIG_LIBS = 26 // unistd.h:400:1: + X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 27 // unistd.h:401:1: + X_CS_XBS5_LP64_OFF64_CFLAGS = 28 // unistd.h:402:1: + X_CS_XBS5_LP64_OFF64_LDFLAGS = 29 // unistd.h:403:1: + X_CS_XBS5_LP64_OFF64_LIBS = 30 // unistd.h:404:1: + X_CS_XBS5_LP64_OFF64_LINTFLAGS = 31 // unistd.h:405:1: + X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 32 // unistd.h:406:1: + X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 33 // unistd.h:407:1: + X_CS_XBS5_LPBIG_OFFBIG_LIBS = 34 // unistd.h:408:1: + X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 35 // unistd.h:409:1: + X_CTERMID_H_ = 0 // _ctermid.h:25:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_DELETE_OK = 4096 // unistd.h:103:1: + X_DEV_T = 0 // _dev_t.h:29:1: + X_EXECUTE_OK = 2048 // unistd.h:102:1: + X_FD_SET = 0 // _fd_def.h:29:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_GID_T = 0 // _gid_t.h:29:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_MODE_T = 0 // _mode_t.h:29:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_OFF_T = 0 // _off_t.h:29:1: + X_PC_2_SYMLINKS = 15 // unistd.h:160:1: + X_PC_ALLOC_SIZE_MIN = 16 // unistd.h:161:1: + X_PC_ASYNC_IO = 17 // unistd.h:162:1: + X_PC_AUTH_OPAQUE_NP = 14 // unistd.h:157:1: + X_PC_CASE_PRESERVING = 12 // unistd.h:155:1: + X_PC_CASE_SENSITIVE = 11 // unistd.h:154:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:148:1: + X_PC_EXTENDED_SECURITY_NP = 13 // unistd.h:156:1: + X_PC_FILESIZEBITS = 18 // unistd.h:163:1: + X_PC_LINK_MAX = 1 // unistd.h:142:1: + X_PC_MAX_CANON = 2 // unistd.h:143:1: + X_PC_MAX_INPUT = 3 // unistd.h:144:1: + X_PC_MIN_HOLE_SIZE = 27 // unistd.h:172:1: + X_PC_NAME_CHARS_MAX = 10 // unistd.h:153:1: + X_PC_NAME_MAX = 4 // unistd.h:145:1: + X_PC_NO_TRUNC = 8 // unistd.h:149:1: + X_PC_PATH_MAX = 5 // unistd.h:146:1: + X_PC_PIPE_BUF = 6 // unistd.h:147:1: + X_PC_PRIO_IO = 19 // unistd.h:164:1: + X_PC_REC_INCR_XFER_SIZE = 20 // unistd.h:165:1: + X_PC_REC_MAX_XFER_SIZE = 21 // unistd.h:166:1: + X_PC_REC_MIN_XFER_SIZE = 22 // unistd.h:167:1: + X_PC_REC_XFER_ALIGN = 23 // unistd.h:168:1: + X_PC_SYMLINK_MAX = 24 // unistd.h:169:1: + X_PC_SYNC_IO = 25 // unistd.h:170:1: + X_PC_VDISABLE = 9 // unistd.h:150:1: + X_PC_XATTR_SIZE_BITS = 26 // unistd.h:171:1: + X_PID_T = 0 // _pid_t.h:29:1: + X_POSIX2_CHAR_TERM = 200112 // unistd.h:152:1: + X_POSIX2_C_BIND = 200112 // unistd.h:150:1: + X_POSIX2_C_DEV = 200112 // unistd.h:151:1: + X_POSIX2_FORT_DEV = -1 // unistd.h:153:1: + X_POSIX2_FORT_RUN = 200112 // unistd.h:154:1: + X_POSIX2_LOCALEDEF = 200112 // unistd.h:155:1: + X_POSIX2_PBS = -1 // unistd.h:156:1: + X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:157:1: + X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:158:1: + X_POSIX2_PBS_LOCATE = -1 // unistd.h:159:1: + X_POSIX2_PBS_MESSAGE = -1 // unistd.h:160:1: + X_POSIX2_PBS_TRACK = -1 // unistd.h:161:1: + X_POSIX2_SW_DEV = 200112 // unistd.h:162:1: + X_POSIX2_UPE = 200112 // unistd.h:163:1: + X_POSIX2_VERSION = 200112 // unistd.h:80:1: + X_POSIX_ADVISORY_INFO = -1 // unistd.h:98:1: + X_POSIX_ASYNCHRONOUS_IO = -1 // unistd.h:99:1: + X_POSIX_BARRIERS = -1 // unistd.h:100:1: + X_POSIX_CHOWN_RESTRICTED = 200112 // unistd.h:101:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:102:1: + X_POSIX_CPUTIME = -1 // unistd.h:103:1: + X_POSIX_FSYNC = 200112 // unistd.h:104:1: + X_POSIX_IPV6 = 200112 // unistd.h:105:1: + X_POSIX_JOB_CONTROL = 200112 // unistd.h:106:1: + X_POSIX_MAPPED_FILES = 200112 // unistd.h:107:1: + X_POSIX_MEMLOCK = -1 // unistd.h:108:1: + X_POSIX_MEMLOCK_RANGE = -1 // unistd.h:109:1: + X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:110:1: + X_POSIX_MESSAGE_PASSING = -1 // unistd.h:111:1: + X_POSIX_MONOTONIC_CLOCK = -1 // unistd.h:112:1: + X_POSIX_NO_TRUNC = 200112 // unistd.h:113:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:114:1: + X_POSIX_PRIORITY_SCHEDULING = -1 // unistd.h:115:1: + X_POSIX_RAW_SOCKETS = -1 // unistd.h:116:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:117:1: + X_POSIX_REALTIME_SIGNALS = -1 // unistd.h:118:1: + X_POSIX_REGEXP = 200112 // unistd.h:119:1: + X_POSIX_SAVED_IDS = 200112 // unistd.h:120:1: + X_POSIX_SEMAPHORES = -1 // unistd.h:121:1: + X_POSIX_SHARED_MEMORY_OBJECTS = -1 // unistd.h:122:1: + X_POSIX_SHELL = 200112 // unistd.h:123:1: + X_POSIX_SPAWN = -1 // unistd.h:124:1: + X_POSIX_SPIN_LOCKS = -1 // unistd.h:125:1: + X_POSIX_SPORADIC_SERVER = -1 // unistd.h:126:1: + X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:127:1: + X_POSIX_THREADS = 200112 // unistd.h:137:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:128:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:129:1: + X_POSIX_THREAD_CPUTIME = -1 // unistd.h:130:1: + X_POSIX_THREAD_KEYS_MAX = 128 // unistd.h:86:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 // unistd.h:133:1: + X_POSIX_THREAD_PRIO_INHERIT = -1 // unistd.h:131:1: + X_POSIX_THREAD_PRIO_PROTECT = -1 // unistd.h:132:1: + X_POSIX_THREAD_PROCESS_SHARED = 200112 // unistd.h:134:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 // unistd.h:135:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:136:1: + X_POSIX_TIMEOUTS = -1 // unistd.h:138:1: + X_POSIX_TIMERS = -1 // unistd.h:139:1: + X_POSIX_TRACE = -1 // unistd.h:140:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:141:1: + X_POSIX_TRACE_INHERIT = -1 // unistd.h:142:1: + X_POSIX_TRACE_LOG = -1 // unistd.h:143:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:144:1: + X_POSIX_V6_ILP32_OFF32 = -1 // unistd.h:173:1: + X_POSIX_V6_ILP32_OFFBIG = -1 // unistd.h:174:1: + X_POSIX_V6_LP64_OFF64 = 1 // unistd.h:175:1: + X_POSIX_V6_LPBIG_OFFBIG = 1 // unistd.h:176:1: + X_POSIX_V7_ILP32_OFF32 = -1 // unistd.h:180:1: + X_POSIX_V7_ILP32_OFFBIG = -1 // unistd.h:181:1: + X_POSIX_V7_LP64_OFF64 = 1 // unistd.h:182:1: + X_POSIX_V7_LPBIG_OFFBIG = 1 // unistd.h:183:1: + X_POSIX_VERSION = 200112 // unistd.h:79:1: + X_RATTR_OK = 32768 // unistd.h:106:1: + X_READ_OK = 512 // unistd.h:100:1: + X_REXT_OK = 131072 // unistd.h:108:1: + X_RMFILE_OK = 16384 // unistd.h:105:1: + X_RPERM_OK = 524288 // unistd.h:110:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:232:1: + X_SC_2_C_BIND = 18 // unistd.h:230:1: + X_SC_2_C_DEV = 19 // unistd.h:231:1: + X_SC_2_FORT_DEV = 21 // unistd.h:233:1: + X_SC_2_FORT_RUN = 22 // unistd.h:234:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:235:1: + X_SC_2_PBS = 59 // unistd.h:275:1: + X_SC_2_PBS_ACCOUNTING = 60 // unistd.h:276:1: + X_SC_2_PBS_CHECKPOINT = 61 // unistd.h:277:1: + X_SC_2_PBS_LOCATE = 62 // unistd.h:278:1: + X_SC_2_PBS_MESSAGE = 63 // unistd.h:279:1: + X_SC_2_PBS_TRACK = 64 // unistd.h:280:1: + X_SC_2_SW_DEV = 24 // unistd.h:236:1: + X_SC_2_UPE = 25 // unistd.h:237:1: + X_SC_2_VERSION = 17 // unistd.h:229:1: + X_SC_ADVISORY_INFO = 65 // unistd.h:281:1: + X_SC_AIO_LISTIO_MAX = 42 // unistd.h:256:1: + X_SC_AIO_MAX = 43 // unistd.h:257:1: + X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:258:1: + X_SC_ARG_MAX = 1 // unistd.h:213:1: + X_SC_ASYNCHRONOUS_IO = 28 // unistd.h:242:1: + X_SC_ATEXIT_MAX = 107 // unistd.h:329:1: + X_SC_BARRIERS = 66 // unistd.h:282:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:221:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:222:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:223:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:224:1: + X_SC_CHILD_MAX = 2 // unistd.h:214:1: + X_SC_CLK_TCK = 3 // unistd.h:215:1: + X_SC_CLOCK_SELECTION = 67 // unistd.h:283:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:225:1: + X_SC_CPUTIME = 68 // unistd.h:284:1: + X_SC_DELAYTIMER_MAX = 45 // unistd.h:259:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:226:1: + X_SC_FILE_LOCKING = 69 // unistd.h:285:1: + X_SC_FSYNC = 38 // unistd.h:252:1: + X_SC_GETGR_R_SIZE_MAX = 70 // unistd.h:286:1: + X_SC_GETPW_R_SIZE_MAX = 71 // unistd.h:287:1: + X_SC_HOST_NAME_MAX = 72 // unistd.h:288:1: + X_SC_IOV_MAX = 56 // unistd.h:330:1: + X_SC_IPV6 = 118 // unistd.h:323:1: + X_SC_JOB_CONTROL = 6 // unistd.h:218:1: + X_SC_LINE_MAX = 15 // unistd.h:227:1: + X_SC_LOGIN_NAME_MAX = 73 // unistd.h:289:1: + X_SC_MAPPED_FILES = 47 // unistd.h:261:1: + X_SC_MEMLOCK = 30 // unistd.h:244:1: + X_SC_MEMLOCK_RANGE = 31 // unistd.h:245:1: + X_SC_MEMORY_PROTECTION = 32 // unistd.h:246:1: + X_SC_MESSAGE_PASSING = 33 // unistd.h:247:1: + X_SC_MONOTONIC_CLOCK = 74 // unistd.h:290:1: + X_SC_MQ_OPEN_MAX = 46 // unistd.h:260:1: + X_SC_MQ_PRIO_MAX = 75 // unistd.h:291:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:216:1: + X_SC_NPROCESSORS_CONF = 57 // unistd.h:270:1: + X_SC_NPROCESSORS_ONLN = 58 // unistd.h:271:1: + X_SC_OPEN_MAX = 5 // unistd.h:217:1: + X_SC_PAGESIZE = 29 // unistd.h:243:1: + X_SC_PAGE_SIZE = 29 // unistd.h:331:1: + X_SC_PASS_MAX = 131 // unistd.h:362:1: + X_SC_PHYS_PAGES = 200 // unistd.h:367:1: + X_SC_PRIORITIZED_IO = 34 // unistd.h:248:1: + X_SC_PRIORITY_SCHEDULING = 35 // unistd.h:249:1: + X_SC_RAW_SOCKETS = 119 // unistd.h:324:1: + X_SC_READER_WRITER_LOCKS = 76 // unistd.h:292:1: + X_SC_REALTIME_SIGNALS = 36 // unistd.h:250:1: + X_SC_REGEXP = 77 // unistd.h:293:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:228:1: + X_SC_RTSIG_MAX = 48 // unistd.h:262:1: + X_SC_SAVED_IDS = 7 // unistd.h:219:1: + X_SC_SEMAPHORES = 37 // unistd.h:251:1: + X_SC_SEM_NSEMS_MAX = 49 // unistd.h:263:1: + X_SC_SEM_VALUE_MAX = 50 // unistd.h:264:1: + X_SC_SHARED_MEMORY_OBJECTS = 39 // unistd.h:253:1: + X_SC_SHELL = 78 // unistd.h:294:1: + X_SC_SIGQUEUE_MAX = 51 // unistd.h:265:1: + X_SC_SPAWN = 79 // unistd.h:295:1: + X_SC_SPIN_LOCKS = 80 // unistd.h:296:1: + X_SC_SPORADIC_SERVER = 81 // unistd.h:297:1: + X_SC_SS_REPL_MAX = 126 // unistd.h:353:1: + X_SC_STREAM_MAX = 26 // unistd.h:238:1: + X_SC_SYMLOOP_MAX = 120 // unistd.h:325:1: + X_SC_SYNCHRONIZED_IO = 40 // unistd.h:254:1: + X_SC_THREADS = 96 // unistd.h:312:1: + X_SC_THREAD_ATTR_STACKADDR = 82 // unistd.h:298:1: + X_SC_THREAD_ATTR_STACKSIZE = 83 // unistd.h:299:1: + X_SC_THREAD_CPUTIME = 84 // unistd.h:300:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 85 // unistd.h:301:1: + X_SC_THREAD_KEYS_MAX = 86 // unistd.h:302:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 89 // unistd.h:305:1: + X_SC_THREAD_PRIO_INHERIT = 87 // unistd.h:303:1: + X_SC_THREAD_PRIO_PROTECT = 88 // unistd.h:304:1: + X_SC_THREAD_PROCESS_SHARED = 90 // unistd.h:306:1: + X_SC_THREAD_SAFE_FUNCTIONS = 91 // unistd.h:307:1: + X_SC_THREAD_SPORADIC_SERVER = 92 // unistd.h:308:1: + X_SC_THREAD_STACK_MIN = 93 // unistd.h:309:1: + X_SC_THREAD_THREADS_MAX = 94 // unistd.h:310:1: + X_SC_TIMEOUTS = 95 // unistd.h:311:1: + X_SC_TIMERS = 41 // unistd.h:255:1: + X_SC_TIMER_MAX = 52 // unistd.h:266:1: + X_SC_TRACE = 97 // unistd.h:313:1: + X_SC_TRACE_EVENT_FILTER = 98 // unistd.h:314:1: + X_SC_TRACE_EVENT_NAME_MAX = 127 // unistd.h:354:1: + X_SC_TRACE_INHERIT = 99 // unistd.h:315:1: + X_SC_TRACE_LOG = 100 // unistd.h:316:1: + X_SC_TRACE_NAME_MAX = 128 // unistd.h:355:1: + X_SC_TRACE_SYS_MAX = 129 // unistd.h:356:1: + X_SC_TRACE_USER_EVENT_MAX = 130 // unistd.h:357:1: + X_SC_TTY_NAME_MAX = 101 // unistd.h:317:1: + X_SC_TYPED_MEMORY_OBJECTS = 102 // unistd.h:318:1: + X_SC_TZNAME_MAX = 27 // unistd.h:239:1: + X_SC_V6_ILP32_OFF32 = 103 // unistd.h:319:1: + X_SC_V6_ILP32_OFFBIG = 104 // unistd.h:320:1: + X_SC_V6_LP64_OFF64 = 105 // unistd.h:321:1: + X_SC_V6_LPBIG_OFFBIG = 106 // unistd.h:322:1: + X_SC_VERSION = 8 // unistd.h:220:1: + X_SC_XBS5_ILP32_OFF32 = 122 // unistd.h:346:1: + X_SC_XBS5_ILP32_OFFBIG = 123 // unistd.h:347:1: + X_SC_XBS5_LP64_OFF64 = 124 // unistd.h:348:1: + X_SC_XBS5_LPBIG_OFFBIG = 125 // unistd.h:349:1: + X_SC_XOPEN_CRYPT = 108 // unistd.h:332:1: + X_SC_XOPEN_ENH_I18N = 109 // unistd.h:333:1: + X_SC_XOPEN_LEGACY = 110 // unistd.h:334:1: + X_SC_XOPEN_REALTIME = 111 // unistd.h:335:1: + X_SC_XOPEN_REALTIME_THREADS = 112 // unistd.h:336:1: + X_SC_XOPEN_SHM = 113 // unistd.h:337:1: + X_SC_XOPEN_STREAMS = 114 // unistd.h:338:1: + X_SC_XOPEN_UNIX = 115 // unistd.h:339:1: + X_SC_XOPEN_VERSION = 116 // unistd.h:340:1: + X_SC_XOPEN_XCU_VERSION = 121 // unistd.h:341:1: + X_SIGSET_T = 0 // _sigset_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SSIZE_T = 0 // _ssize_t.h:29:1: + X_SUSECONDS_T = 0 // _suseconds_t.h:29:1: + X_SYS_SELECT_H_ = 0 // select.h:64:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:65:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__SELECT_H_ = 0 // _select.h:37:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UID_T = 0 // _uid_t.h:29:1: + X_UINT32_T = 0 // _uint32_t.h:30:1: + X_UINT64_T = 0 // _uint64_t.h:30:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_UNISTD_H_ = 0 // unistd.h:69:1: + X_USECONDS_T = 0 // _useconds_t.h:29:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: + X_V6_ILP32_OFF32 = -1 // unistd.h:187:1: + X_V6_ILP32_OFFBIG = -1 // unistd.h:188:1: + X_V6_LP64_OFF64 = 1 // unistd.h:189:1: + X_V6_LPBIG_OFFBIG = 1 // unistd.h:190:1: + X_WATTR_OK = 65536 // unistd.h:107:1: + X_WEXT_OK = 262144 // unistd.h:109:1: + X_WPERM_OK = 1048576 // unistd.h:111:1: + X_WRITE_OK = 1024 // unistd.h:101:1: + X_XBS5_ILP32_OFF32 = -1 // unistd.h:195:1: + X_XBS5_ILP32_OFFBIG = -1 // unistd.h:196:1: + X_XBS5_LP64_OFF64 = 1 // unistd.h:197:1: + X_XBS5_LPBIG_OFFBIG = 1 // unistd.h:198:1: + X_XOPEN_CRYPT = 1 // unistd.h:202:1: + X_XOPEN_ENH_I18N = 1 // unistd.h:203:1: + X_XOPEN_LEGACY = -1 // unistd.h:204:1: + X_XOPEN_REALTIME = -1 // unistd.h:205:1: + X_XOPEN_REALTIME_THREADS = -1 // unistd.h:206:1: + X_XOPEN_SHM = 1 // unistd.h:207:1: + X_XOPEN_STREAMS = -1 // unistd.h:208:1: + X_XOPEN_UNIX = 1 // unistd.h:209:1: + X_XOPEN_VERSION = 600 // unistd.h:93:1: + X_XOPEN_XCU_VERSION = 4 // unistd.h:94:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_freebsd_386.go b/vendor/modernc.org/libc/unistd/unistd_freebsd_386.go index 2a8037ab..0a7af087 100644 --- a/vendor/modernc.org/libc/unistd/unistd_freebsd_386.go +++ b/vendor/modernc.org/libc/unistd/unistd_freebsd_386.go @@ -17,6 +17,7 @@ var _ unsafe.Pointer const ( BIG_ENDIAN = 4321 // _endian.h:70:1: BYTE_ORDER = 1234 // _endian.h:72:1: + CLOSE_RANGE_CLOEXEC = 4 // unistd.h:205:1: FD_SETSIZE = 1024 // select.h:61:1: F_LOCK = 1 // unistd.h:85:1: F_OK = 0 // unistd.h:102:1: @@ -1009,8 +1010,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/unistd/unistd_freebsd_amd64.go b/vendor/modernc.org/libc/unistd/unistd_freebsd_amd64.go index 3ca0ef94..1449eb33 100644 --- a/vendor/modernc.org/libc/unistd/unistd_freebsd_amd64.go +++ b/vendor/modernc.org/libc/unistd/unistd_freebsd_amd64.go @@ -15,19 +15,20 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // endian.h:63:1: - BYTE_ORDER = 1234 // endian.h:65:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLOSE_RANGE_CLOEXEC = 4 // unistd.h:205:1: FD_SETSIZE = 1024 // select.h:61:1: F_LOCK = 1 // unistd.h:85:1: F_OK = 0 // unistd.h:102:1: F_TEST = 3 // unistd.h:87:1: F_TLOCK = 2 // unistd.h:86:1: F_ULOCK = 0 // unistd.h:84:1: - LITTLE_ENDIAN = 1234 // endian.h:62:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: L_INCR = 1 // unistd.h:121:1: L_SET = 0 // unistd.h:120:1: L_XTND = 2 // unistd.h:122:1: - PDP_ENDIAN = 3412 // endian.h:64:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: RFCENVG = 2048 // unistd.h:178:1: RFCFDG = 4096 // unistd.h:179:1: RFCNAMEG = 1024 // unistd.h:177:1: @@ -60,13 +61,14 @@ const ( STDERR_FILENO = 2 // unistd.h:81:1: STDIN_FILENO = 0 // unistd.h:79:1: STDOUT_FILENO = 1 // unistd.h:80:1: + SWAPOFF_FORCE = 0x00000001 // unistd.h:200:1: W_OK = 0x02 // unistd.h:104:1: X_OK = 0x01 // unistd.h:103:1: X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // endian.h:52:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: X_BLKCNT_T_DECLARED = 0 // types.h:90:1: X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // endian.h:55:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: X_CLOCKID_T_DECLARED = 0 // types.h:100:1: @@ -103,7 +105,7 @@ const ( X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: X_IN_PORT_T_DECLARED = 0 // types.h:136:1: X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // endian.h:51:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: X_LP64 = 1 // <predefined>:1:1: X_LSEEK_DECLARED = 0 // types.h:421:1: X_LWPID_T_DECLARED = 0 // types.h:156:1: @@ -118,12 +120,12 @@ const ( X_MODE_T_DECLARED = 0 // types.h:161:1: X_MQD_T_DECLARED = 0 // types.h:227:1: X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF64_T_DECLARED = 0 // types.h:181:1: X_OFF_T_DECLARED = 0 // types.h:176:1: - X_OPTRESET_DECLARED = 0 // unistd.h:591:1: + X_OPTRESET_DECLARED = 0 // unistd.h:592:1: X_PC_ACL_EXTENDED = 59 // unistd.h:153:1: X_PC_ACL_NFS4 = 64 // unistd.h:158:1: X_PC_ACL_PATH_MAX = 60 // unistd.h:154:1: @@ -150,7 +152,7 @@ const ( X_PC_SYMLINK_MAX = 18 // unistd.h:149:1: X_PC_SYNC_IO = 55 // unistd.h:139:1: X_PC_VDISABLE = 9 // unistd.h:134:1: - X_PDP_ENDIAN = 3412 // endian.h:53:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: X_PID_T_DECLARED = 0 // types.h:186:1: X_POSIX2_CHAR_TERM = 1 // unistd.h:127:1: X_POSIX2_C_BIND = 200112 // unistd.h:125:1: @@ -216,8 +218,8 @@ const ( X_POSIX_VDISABLE = 0xff // unistd.h:80:1: X_POSIX_VERSION = 200112 // unistd.h:99:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // endian.h:44:1: - X_QUAD_LOWWORD = 0 // endian.h:45:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: X_RLIM_T_DECLARED = 0 // types.h:193:1: X_SC_2_CHAR_TERM = 20 // unistd.h:184:1: X_SC_2_C_BIND = 18 // unistd.h:182:1: @@ -352,6 +354,7 @@ const ( X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: @@ -382,7 +385,7 @@ const ( X_XOPEN_SHM = 1 // unistd.h:83:1: X_XOPEN_STREAMS = -1 // unistd.h:84:1: X_XOPEN_UNIX = -1 // unistd.h:150:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -652,12 +655,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-3-Clause // @@ -771,42 +777,6 @@ type X__float128 = float64 /* <builtin>:47:21 */ // $FreeBSD$ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. Neither the name of the University nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -// SUCH DAMAGE. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> @@ -1048,8 +1018,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/unistd/unistd_freebsd_arm.go b/vendor/modernc.org/libc/unistd/unistd_freebsd_arm.go new file mode 100644 index 00000000..438d03f4 --- /dev/null +++ b/vendor/modernc.org/libc/unistd/unistd_freebsd_arm.go @@ -0,0 +1,1720 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_freebsd_arm.go -pkgname unistd', DO NOT EDIT. + +package unistd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLOSE_RANGE_CLOEXEC = 4 // unistd.h:205:1: + FD_SETSIZE = 1024 // select.h:61:1: + F_LOCK = 1 // unistd.h:85:1: + F_OK = 0 // unistd.h:102:1: + F_TEST = 3 // unistd.h:87:1: + F_TLOCK = 2 // unistd.h:86:1: + F_ULOCK = 0 // unistd.h:84:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + L_INCR = 1 // unistd.h:121:1: + L_SET = 0 // unistd.h:120:1: + L_XTND = 2 // unistd.h:122:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + RFCENVG = 2048 // unistd.h:178:1: + RFCFDG = 4096 // unistd.h:179:1: + RFCNAMEG = 1024 // unistd.h:177:1: + RFENVG = 2 // unistd.h:171:1: + RFFDG = 4 // unistd.h:172:1: + RFFLAGS = 2416930932 // unistd.h:195:1: + RFHIGHPID = 262144 // unistd.h:184:1: + RFKERNELONLY = 268828672 // unistd.h:198:1: + RFLINUXTHPN = 65536 // unistd.h:182:1: + RFMEM = 32 // unistd.h:175:1: + RFNAMEG = 1 // unistd.h:170:1: + RFNOTEG = 8 // unistd.h:173:1: + RFNOWAIT = 64 // unistd.h:176:1: + RFPPWAIT = 2147483648 // unistd.h:192:1: + RFPROC = 16 // unistd.h:174:1: + RFPROCDESC = 268435456 // unistd.h:190:1: + RFSIGSHARE = 16384 // unistd.h:181:1: + RFSPAWN = 2147483648 // unistd.h:194:1: + RFSTOPPED = 131072 // unistd.h:183:1: + RFTHREAD = 8192 // unistd.h:180:1: + RFTSIGMASK = 0xFF // unistd.h:187:1: + RFTSIGSHIFT = 20 // unistd.h:186:1: + RFTSIGZMB = 524288 // unistd.h:185:1: + R_OK = 0x04 // unistd.h:105:1: + SEEK_CUR = 1 // unistd.h:110:1: + SEEK_DATA = 3 // unistd.h:114:1: + SEEK_END = 2 // unistd.h:111:1: + SEEK_HOLE = 4 // unistd.h:115:1: + SEEK_SET = 0 // unistd.h:109:1: + STDERR_FILENO = 2 // unistd.h:81:1: + STDIN_FILENO = 0 // unistd.h:79:1: + STDOUT_FILENO = 1 // unistd.h:80:1: + SWAPOFF_FORCE = 0x00000001 // unistd.h:200:1: + W_OK = 0x02 // unistd.h:104:1: + X_OK = 0x01 // unistd.h:103:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_CS_PATH = 1 // unistd.h:302:1: + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:306:1: + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:307:1: + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:308:1: + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:309:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:310:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:311:1: + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:312:1: + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:313:1: + X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:314:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:315:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:316:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:317:1: + X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:318:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GETOPT_DECLARED = 0 // unistd.h:378:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKDTEMP_DECLARED = 0 // unistd.h:528:1: + X_MKNOD_DECLARED = 0 // unistd.h:532:1: + X_MKSTEMP_DECLARED = 0 // unistd.h:536:1: + X_MKTEMP_DECLARED = 0 // unistd.h:541:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_OPTRESET_DECLARED = 0 // unistd.h:592:1: + X_PC_ACL_EXTENDED = 59 // unistd.h:153:1: + X_PC_ACL_NFS4 = 64 // unistd.h:158:1: + X_PC_ACL_PATH_MAX = 60 // unistd.h:154:1: + X_PC_ALLOC_SIZE_MIN = 10 // unistd.h:143:1: + X_PC_ASYNC_IO = 53 // unistd.h:137:1: + X_PC_CAP_PRESENT = 61 // unistd.h:155:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:132:1: + X_PC_FILESIZEBITS = 12 // unistd.h:144:1: + X_PC_INF_PRESENT = 62 // unistd.h:156:1: + X_PC_LINK_MAX = 1 // unistd.h:126:1: + X_PC_MAC_PRESENT = 63 // unistd.h:157:1: + X_PC_MAX_CANON = 2 // unistd.h:127:1: + X_PC_MAX_INPUT = 3 // unistd.h:128:1: + X_PC_MIN_HOLE_SIZE = 21 // unistd.h:162:1: + X_PC_NAME_MAX = 4 // unistd.h:129:1: + X_PC_NO_TRUNC = 8 // unistd.h:133:1: + X_PC_PATH_MAX = 5 // unistd.h:130:1: + X_PC_PIPE_BUF = 6 // unistd.h:131:1: + X_PC_PRIO_IO = 54 // unistd.h:138:1: + X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:145:1: + X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:146:1: + X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:147:1: + X_PC_REC_XFER_ALIGN = 17 // unistd.h:148:1: + X_PC_SYMLINK_MAX = 18 // unistd.h:149:1: + X_PC_SYNC_IO = 55 // unistd.h:139:1: + X_PC_VDISABLE = 9 // unistd.h:134:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_POSIX2_CHAR_TERM = 1 // unistd.h:127:1: + X_POSIX2_C_BIND = 200112 // unistd.h:125:1: + X_POSIX2_C_DEV = -1 // unistd.h:126:1: + X_POSIX2_FORT_DEV = -1 // unistd.h:128:1: + X_POSIX2_FORT_RUN = 200112 // unistd.h:129:1: + X_POSIX2_LOCALEDEF = -1 // unistd.h:130:1: + X_POSIX2_PBS = -1 // unistd.h:131:1: + X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:132:1: + X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:133:1: + X_POSIX2_PBS_LOCATE = -1 // unistd.h:134:1: + X_POSIX2_PBS_MESSAGE = -1 // unistd.h:135:1: + X_POSIX2_PBS_TRACK = -1 // unistd.h:136:1: + X_POSIX2_SW_DEV = -1 // unistd.h:137:1: + X_POSIX2_UPE = 200112 // unistd.h:138:1: + X_POSIX2_VERSION = 199212 // unistd.h:154:1: + X_POSIX_ADVISORY_INFO = 200112 // unistd.h:54:1: + X_POSIX_ASYNCHRONOUS_IO = 200112 // unistd.h:55:1: + X_POSIX_BARRIERS = 200112 // unistd.h:104:1: + X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:56:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:57:1: + X_POSIX_CPUTIME = 200112 // unistd.h:105:1: + X_POSIX_FSYNC = 200112 // unistd.h:59:1: + X_POSIX_IPV6 = 0 // unistd.h:60:1: + X_POSIX_JOB_CONTROL = 1 // unistd.h:61:1: + X_POSIX_MAPPED_FILES = 200112 // unistd.h:62:1: + X_POSIX_MEMLOCK = -1 // unistd.h:63:1: + X_POSIX_MEMLOCK_RANGE = 200112 // unistd.h:64:1: + X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:65:1: + X_POSIX_MESSAGE_PASSING = 200112 // unistd.h:66:1: + X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:67:1: + X_POSIX_NO_TRUNC = 1 // unistd.h:68:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:69:1: + X_POSIX_PRIORITY_SCHEDULING = 0 // unistd.h:70:1: + X_POSIX_RAW_SOCKETS = 200112 // unistd.h:71:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:106:1: + X_POSIX_REALTIME_SIGNALS = 200112 // unistd.h:72:1: + X_POSIX_REGEXP = 1 // unistd.h:107:1: + X_POSIX_SEMAPHORES = 200112 // unistd.h:73:1: + X_POSIX_SHARED_MEMORY_OBJECTS = 200112 // unistd.h:74:1: + X_POSIX_SHELL = 1 // unistd.h:108:1: + X_POSIX_SPAWN = 200112 // unistd.h:109:1: + X_POSIX_SPIN_LOCKS = 200112 // unistd.h:110:1: + X_POSIX_SPORADIC_SERVER = -1 // unistd.h:75:1: + X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:76:1: + X_POSIX_THREADS = 200112 // unistd.h:120:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:111:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:112:1: + X_POSIX_THREAD_CPUTIME = 200112 // unistd.h:113:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = 200112 // unistd.h:116:1: + X_POSIX_THREAD_PRIO_INHERIT = 200112 // unistd.h:114:1: + X_POSIX_THREAD_PRIO_PROTECT = 200112 // unistd.h:115:1: + X_POSIX_THREAD_PROCESS_SHARED = 200112 // unistd.h:117:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = -1 // unistd.h:118:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:119:1: + X_POSIX_TIMEOUTS = 200112 // unistd.h:77:1: + X_POSIX_TIMERS = 200112 // unistd.h:78:1: + X_POSIX_TRACE = -1 // unistd.h:121:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:122:1: + X_POSIX_TRACE_INHERIT = -1 // unistd.h:123:1: + X_POSIX_TRACE_LOG = -1 // unistd.h:124:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:79:1: + X_POSIX_VDISABLE = 0xff // unistd.h:80:1: + X_POSIX_VERSION = 200112 // unistd.h:99:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:184:1: + X_SC_2_C_BIND = 18 // unistd.h:182:1: + X_SC_2_C_DEV = 19 // unistd.h:183:1: + X_SC_2_FORT_DEV = 21 // unistd.h:185:1: + X_SC_2_FORT_RUN = 22 // unistd.h:186:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:187:1: + X_SC_2_PBS = 59 // unistd.h:222:1: + X_SC_2_PBS_ACCOUNTING = 60 // unistd.h:223:1: + X_SC_2_PBS_CHECKPOINT = 61 // unistd.h:224:1: + X_SC_2_PBS_LOCATE = 62 // unistd.h:225:1: + X_SC_2_PBS_MESSAGE = 63 // unistd.h:226:1: + X_SC_2_PBS_TRACK = 64 // unistd.h:227:1: + X_SC_2_SW_DEV = 24 // unistd.h:188:1: + X_SC_2_UPE = 25 // unistd.h:189:1: + X_SC_2_VERSION = 17 // unistd.h:181:1: + X_SC_ADVISORY_INFO = 65 // unistd.h:228:1: + X_SC_AIO_LISTIO_MAX = 42 // unistd.h:208:1: + X_SC_AIO_MAX = 43 // unistd.h:209:1: + X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:210:1: + X_SC_ARG_MAX = 1 // unistd.h:165:1: + X_SC_ASYNCHRONOUS_IO = 28 // unistd.h:194:1: + X_SC_ATEXIT_MAX = 107 // unistd.h:276:1: + X_SC_BARRIERS = 66 // unistd.h:229:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:173:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:174:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:175:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:176:1: + X_SC_CHILD_MAX = 2 // unistd.h:166:1: + X_SC_CLK_TCK = 3 // unistd.h:167:1: + X_SC_CLOCK_SELECTION = 67 // unistd.h:230:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:177:1: + X_SC_CPUSET_SIZE = 122 // unistd.h:294:1: + X_SC_CPUTIME = 68 // unistd.h:231:1: + X_SC_DELAYTIMER_MAX = 45 // unistd.h:211:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:178:1: + X_SC_FILE_LOCKING = 69 // unistd.h:232:1: + X_SC_FSYNC = 38 // unistd.h:204:1: + X_SC_GETGR_R_SIZE_MAX = 70 // unistd.h:233:1: + X_SC_GETPW_R_SIZE_MAX = 71 // unistd.h:234:1: + X_SC_HOST_NAME_MAX = 72 // unistd.h:235:1: + X_SC_IOV_MAX = 56 // unistd.h:277:1: + X_SC_IPV6 = 118 // unistd.h:270:1: + X_SC_JOB_CONTROL = 6 // unistd.h:170:1: + X_SC_LINE_MAX = 15 // unistd.h:179:1: + X_SC_LOGIN_NAME_MAX = 73 // unistd.h:236:1: + X_SC_MAPPED_FILES = 29 // unistd.h:195:1: + X_SC_MEMLOCK = 30 // unistd.h:196:1: + X_SC_MEMLOCK_RANGE = 31 // unistd.h:197:1: + X_SC_MEMORY_PROTECTION = 32 // unistd.h:198:1: + X_SC_MESSAGE_PASSING = 33 // unistd.h:199:1: + X_SC_MONOTONIC_CLOCK = 74 // unistd.h:237:1: + X_SC_MQ_OPEN_MAX = 46 // unistd.h:212:1: + X_SC_MQ_PRIO_MAX = 75 // unistd.h:238:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:168:1: + X_SC_NPROCESSORS_CONF = 57 // unistd.h:292:1: + X_SC_NPROCESSORS_ONLN = 58 // unistd.h:293:1: + X_SC_OPEN_MAX = 5 // unistd.h:169:1: + X_SC_PAGESIZE = 47 // unistd.h:213:1: + X_SC_PAGE_SIZE = 47 // unistd.h:278:1: + X_SC_PHYS_PAGES = 121 // unistd.h:298:1: + X_SC_PRIORITIZED_IO = 34 // unistd.h:200:1: + X_SC_PRIORITY_SCHEDULING = 35 // unistd.h:201:1: + X_SC_RAW_SOCKETS = 119 // unistd.h:271:1: + X_SC_READER_WRITER_LOCKS = 76 // unistd.h:239:1: + X_SC_REALTIME_SIGNALS = 36 // unistd.h:202:1: + X_SC_REGEXP = 77 // unistd.h:240:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:180:1: + X_SC_RTSIG_MAX = 48 // unistd.h:214:1: + X_SC_SAVED_IDS = 7 // unistd.h:171:1: + X_SC_SEMAPHORES = 37 // unistd.h:203:1: + X_SC_SEM_NSEMS_MAX = 49 // unistd.h:215:1: + X_SC_SEM_VALUE_MAX = 50 // unistd.h:216:1: + X_SC_SHARED_MEMORY_OBJECTS = 39 // unistd.h:205:1: + X_SC_SHELL = 78 // unistd.h:241:1: + X_SC_SIGQUEUE_MAX = 51 // unistd.h:217:1: + X_SC_SPAWN = 79 // unistd.h:242:1: + X_SC_SPIN_LOCKS = 80 // unistd.h:243:1: + X_SC_SPORADIC_SERVER = 81 // unistd.h:244:1: + X_SC_STREAM_MAX = 26 // unistd.h:190:1: + X_SC_SYMLOOP_MAX = 120 // unistd.h:272:1: + X_SC_SYNCHRONIZED_IO = 40 // unistd.h:206:1: + X_SC_THREADS = 96 // unistd.h:259:1: + X_SC_THREAD_ATTR_STACKADDR = 82 // unistd.h:245:1: + X_SC_THREAD_ATTR_STACKSIZE = 83 // unistd.h:246:1: + X_SC_THREAD_CPUTIME = 84 // unistd.h:247:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 85 // unistd.h:248:1: + X_SC_THREAD_KEYS_MAX = 86 // unistd.h:249:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 89 // unistd.h:252:1: + X_SC_THREAD_PRIO_INHERIT = 87 // unistd.h:250:1: + X_SC_THREAD_PRIO_PROTECT = 88 // unistd.h:251:1: + X_SC_THREAD_PROCESS_SHARED = 90 // unistd.h:253:1: + X_SC_THREAD_SAFE_FUNCTIONS = 91 // unistd.h:254:1: + X_SC_THREAD_SPORADIC_SERVER = 92 // unistd.h:255:1: + X_SC_THREAD_STACK_MIN = 93 // unistd.h:256:1: + X_SC_THREAD_THREADS_MAX = 94 // unistd.h:257:1: + X_SC_TIMEOUTS = 95 // unistd.h:258:1: + X_SC_TIMERS = 41 // unistd.h:207:1: + X_SC_TIMER_MAX = 52 // unistd.h:218:1: + X_SC_TRACE = 97 // unistd.h:260:1: + X_SC_TRACE_EVENT_FILTER = 98 // unistd.h:261:1: + X_SC_TRACE_INHERIT = 99 // unistd.h:262:1: + X_SC_TRACE_LOG = 100 // unistd.h:263:1: + X_SC_TTY_NAME_MAX = 101 // unistd.h:264:1: + X_SC_TYPED_MEMORY_OBJECTS = 102 // unistd.h:265:1: + X_SC_TZNAME_MAX = 27 // unistd.h:191:1: + X_SC_V6_ILP32_OFF32 = 103 // unistd.h:266:1: + X_SC_V6_ILP32_OFFBIG = 104 // unistd.h:267:1: + X_SC_V6_LP64_OFF64 = 105 // unistd.h:268:1: + X_SC_V6_LPBIG_OFFBIG = 106 // unistd.h:269:1: + X_SC_VERSION = 8 // unistd.h:172:1: + X_SC_XOPEN_CRYPT = 108 // unistd.h:279:1: + X_SC_XOPEN_ENH_I18N = 109 // unistd.h:280:1: + X_SC_XOPEN_LEGACY = 110 // unistd.h:281:1: + X_SC_XOPEN_REALTIME = 111 // unistd.h:282:1: + X_SC_XOPEN_REALTIME_THREADS = 112 // unistd.h:283:1: + X_SC_XOPEN_SHM = 113 // unistd.h:284:1: + X_SC_XOPEN_STREAMS = 114 // unistd.h:285:1: + X_SC_XOPEN_UNIX = 115 // unistd.h:286:1: + X_SC_XOPEN_VERSION = 116 // unistd.h:287:1: + X_SC_XOPEN_XCU_VERSION = 117 // unistd.h:288:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SWAB_DECLARED = 0 // unistd.h:461:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_UNISTD_H_ = 0 // unistd.h:36:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_V6_ILP32_OFF32 = -1 // unistd.h:139:1: + X_V6_ILP32_OFFBIG = 0 // unistd.h:140:1: + X_V6_LP64_OFF64 = 0 // unistd.h:141:1: + X_V6_LPBIG_OFFBIG = -1 // unistd.h:142:1: + X_XOPEN_CRYPT = -1 // unistd.h:145:1: + X_XOPEN_ENH_I18N = -1 // unistd.h:146:1: + X_XOPEN_LEGACY = -1 // unistd.h:147:1: + X_XOPEN_REALTIME = -1 // unistd.h:148:1: + X_XOPEN_REALTIME_THREADS = -1 // unistd.h:149:1: + X_XOPEN_SHM = 1 // unistd.h:83:1: + X_XOPEN_STREAMS = -1 // unistd.h:84:1: + X_XOPEN_UNIX = -1 // unistd.h:150:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)unistd.h 8.12 (Berkeley) 4/27/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Machine type dependent parameters. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2001 David E. O'Brien +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 8.1 (Berkeley) 6/10/93 +// $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint32 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint32 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint32 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ // select(2) + +type Crypt_data = struct { + Finitialized int32 + F__buf [256]uint8 +} /* unistd.h:489:1 */ + +// getopt(3) external variable + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/unistd_freebsd_arm64.go b/vendor/modernc.org/libc/unistd/unistd_freebsd_arm64.go new file mode 100644 index 00000000..1449eb33 --- /dev/null +++ b/vendor/modernc.org/libc/unistd/unistd_freebsd_arm64.go @@ -0,0 +1,1780 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_freebsd_amd64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + CLOSE_RANGE_CLOEXEC = 4 // unistd.h:205:1: + FD_SETSIZE = 1024 // select.h:61:1: + F_LOCK = 1 // unistd.h:85:1: + F_OK = 0 // unistd.h:102:1: + F_TEST = 3 // unistd.h:87:1: + F_TLOCK = 2 // unistd.h:86:1: + F_ULOCK = 0 // unistd.h:84:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + L_INCR = 1 // unistd.h:121:1: + L_SET = 0 // unistd.h:120:1: + L_XTND = 2 // unistd.h:122:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + RFCENVG = 2048 // unistd.h:178:1: + RFCFDG = 4096 // unistd.h:179:1: + RFCNAMEG = 1024 // unistd.h:177:1: + RFENVG = 2 // unistd.h:171:1: + RFFDG = 4 // unistd.h:172:1: + RFFLAGS = 2416930932 // unistd.h:195:1: + RFHIGHPID = 262144 // unistd.h:184:1: + RFKERNELONLY = 268828672 // unistd.h:198:1: + RFLINUXTHPN = 65536 // unistd.h:182:1: + RFMEM = 32 // unistd.h:175:1: + RFNAMEG = 1 // unistd.h:170:1: + RFNOTEG = 8 // unistd.h:173:1: + RFNOWAIT = 64 // unistd.h:176:1: + RFPPWAIT = 2147483648 // unistd.h:192:1: + RFPROC = 16 // unistd.h:174:1: + RFPROCDESC = 268435456 // unistd.h:190:1: + RFSIGSHARE = 16384 // unistd.h:181:1: + RFSPAWN = 2147483648 // unistd.h:194:1: + RFSTOPPED = 131072 // unistd.h:183:1: + RFTHREAD = 8192 // unistd.h:180:1: + RFTSIGMASK = 0xFF // unistd.h:187:1: + RFTSIGSHIFT = 20 // unistd.h:186:1: + RFTSIGZMB = 524288 // unistd.h:185:1: + R_OK = 0x04 // unistd.h:105:1: + SEEK_CUR = 1 // unistd.h:110:1: + SEEK_DATA = 3 // unistd.h:114:1: + SEEK_END = 2 // unistd.h:111:1: + SEEK_HOLE = 4 // unistd.h:115:1: + SEEK_SET = 0 // unistd.h:109:1: + STDERR_FILENO = 2 // unistd.h:81:1: + STDIN_FILENO = 0 // unistd.h:79:1: + STDOUT_FILENO = 1 // unistd.h:80:1: + SWAPOFF_FORCE = 0x00000001 // unistd.h:200:1: + W_OK = 0x02 // unistd.h:104:1: + X_OK = 0x01 // unistd.h:103:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_CS_PATH = 1 // unistd.h:302:1: + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:306:1: + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:307:1: + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:308:1: + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:309:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:310:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:311:1: + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:312:1: + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:313:1: + X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:314:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:315:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:316:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:317:1: + X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:318:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GETOPT_DECLARED = 0 // unistd.h:378:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MKDTEMP_DECLARED = 0 // unistd.h:528:1: + X_MKNOD_DECLARED = 0 // unistd.h:532:1: + X_MKSTEMP_DECLARED = 0 // unistd.h:536:1: + X_MKTEMP_DECLARED = 0 // unistd.h:541:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_OPTRESET_DECLARED = 0 // unistd.h:592:1: + X_PC_ACL_EXTENDED = 59 // unistd.h:153:1: + X_PC_ACL_NFS4 = 64 // unistd.h:158:1: + X_PC_ACL_PATH_MAX = 60 // unistd.h:154:1: + X_PC_ALLOC_SIZE_MIN = 10 // unistd.h:143:1: + X_PC_ASYNC_IO = 53 // unistd.h:137:1: + X_PC_CAP_PRESENT = 61 // unistd.h:155:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:132:1: + X_PC_FILESIZEBITS = 12 // unistd.h:144:1: + X_PC_INF_PRESENT = 62 // unistd.h:156:1: + X_PC_LINK_MAX = 1 // unistd.h:126:1: + X_PC_MAC_PRESENT = 63 // unistd.h:157:1: + X_PC_MAX_CANON = 2 // unistd.h:127:1: + X_PC_MAX_INPUT = 3 // unistd.h:128:1: + X_PC_MIN_HOLE_SIZE = 21 // unistd.h:162:1: + X_PC_NAME_MAX = 4 // unistd.h:129:1: + X_PC_NO_TRUNC = 8 // unistd.h:133:1: + X_PC_PATH_MAX = 5 // unistd.h:130:1: + X_PC_PIPE_BUF = 6 // unistd.h:131:1: + X_PC_PRIO_IO = 54 // unistd.h:138:1: + X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:145:1: + X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:146:1: + X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:147:1: + X_PC_REC_XFER_ALIGN = 17 // unistd.h:148:1: + X_PC_SYMLINK_MAX = 18 // unistd.h:149:1: + X_PC_SYNC_IO = 55 // unistd.h:139:1: + X_PC_VDISABLE = 9 // unistd.h:134:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_POSIX2_CHAR_TERM = 1 // unistd.h:127:1: + X_POSIX2_C_BIND = 200112 // unistd.h:125:1: + X_POSIX2_C_DEV = -1 // unistd.h:126:1: + X_POSIX2_FORT_DEV = -1 // unistd.h:128:1: + X_POSIX2_FORT_RUN = 200112 // unistd.h:129:1: + X_POSIX2_LOCALEDEF = -1 // unistd.h:130:1: + X_POSIX2_PBS = -1 // unistd.h:131:1: + X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:132:1: + X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:133:1: + X_POSIX2_PBS_LOCATE = -1 // unistd.h:134:1: + X_POSIX2_PBS_MESSAGE = -1 // unistd.h:135:1: + X_POSIX2_PBS_TRACK = -1 // unistd.h:136:1: + X_POSIX2_SW_DEV = -1 // unistd.h:137:1: + X_POSIX2_UPE = 200112 // unistd.h:138:1: + X_POSIX2_VERSION = 199212 // unistd.h:154:1: + X_POSIX_ADVISORY_INFO = 200112 // unistd.h:54:1: + X_POSIX_ASYNCHRONOUS_IO = 200112 // unistd.h:55:1: + X_POSIX_BARRIERS = 200112 // unistd.h:104:1: + X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:56:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:57:1: + X_POSIX_CPUTIME = 200112 // unistd.h:105:1: + X_POSIX_FSYNC = 200112 // unistd.h:59:1: + X_POSIX_IPV6 = 0 // unistd.h:60:1: + X_POSIX_JOB_CONTROL = 1 // unistd.h:61:1: + X_POSIX_MAPPED_FILES = 200112 // unistd.h:62:1: + X_POSIX_MEMLOCK = -1 // unistd.h:63:1: + X_POSIX_MEMLOCK_RANGE = 200112 // unistd.h:64:1: + X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:65:1: + X_POSIX_MESSAGE_PASSING = 200112 // unistd.h:66:1: + X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:67:1: + X_POSIX_NO_TRUNC = 1 // unistd.h:68:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:69:1: + X_POSIX_PRIORITY_SCHEDULING = 0 // unistd.h:70:1: + X_POSIX_RAW_SOCKETS = 200112 // unistd.h:71:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:106:1: + X_POSIX_REALTIME_SIGNALS = 200112 // unistd.h:72:1: + X_POSIX_REGEXP = 1 // unistd.h:107:1: + X_POSIX_SEMAPHORES = 200112 // unistd.h:73:1: + X_POSIX_SHARED_MEMORY_OBJECTS = 200112 // unistd.h:74:1: + X_POSIX_SHELL = 1 // unistd.h:108:1: + X_POSIX_SPAWN = 200112 // unistd.h:109:1: + X_POSIX_SPIN_LOCKS = 200112 // unistd.h:110:1: + X_POSIX_SPORADIC_SERVER = -1 // unistd.h:75:1: + X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:76:1: + X_POSIX_THREADS = 200112 // unistd.h:120:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:111:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:112:1: + X_POSIX_THREAD_CPUTIME = 200112 // unistd.h:113:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = 200112 // unistd.h:116:1: + X_POSIX_THREAD_PRIO_INHERIT = 200112 // unistd.h:114:1: + X_POSIX_THREAD_PRIO_PROTECT = 200112 // unistd.h:115:1: + X_POSIX_THREAD_PROCESS_SHARED = 200112 // unistd.h:117:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = -1 // unistd.h:118:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:119:1: + X_POSIX_TIMEOUTS = 200112 // unistd.h:77:1: + X_POSIX_TIMERS = 200112 // unistd.h:78:1: + X_POSIX_TRACE = -1 // unistd.h:121:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:122:1: + X_POSIX_TRACE_INHERIT = -1 // unistd.h:123:1: + X_POSIX_TRACE_LOG = -1 // unistd.h:124:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:79:1: + X_POSIX_VDISABLE = 0xff // unistd.h:80:1: + X_POSIX_VERSION = 200112 // unistd.h:99:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:184:1: + X_SC_2_C_BIND = 18 // unistd.h:182:1: + X_SC_2_C_DEV = 19 // unistd.h:183:1: + X_SC_2_FORT_DEV = 21 // unistd.h:185:1: + X_SC_2_FORT_RUN = 22 // unistd.h:186:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:187:1: + X_SC_2_PBS = 59 // unistd.h:222:1: + X_SC_2_PBS_ACCOUNTING = 60 // unistd.h:223:1: + X_SC_2_PBS_CHECKPOINT = 61 // unistd.h:224:1: + X_SC_2_PBS_LOCATE = 62 // unistd.h:225:1: + X_SC_2_PBS_MESSAGE = 63 // unistd.h:226:1: + X_SC_2_PBS_TRACK = 64 // unistd.h:227:1: + X_SC_2_SW_DEV = 24 // unistd.h:188:1: + X_SC_2_UPE = 25 // unistd.h:189:1: + X_SC_2_VERSION = 17 // unistd.h:181:1: + X_SC_ADVISORY_INFO = 65 // unistd.h:228:1: + X_SC_AIO_LISTIO_MAX = 42 // unistd.h:208:1: + X_SC_AIO_MAX = 43 // unistd.h:209:1: + X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:210:1: + X_SC_ARG_MAX = 1 // unistd.h:165:1: + X_SC_ASYNCHRONOUS_IO = 28 // unistd.h:194:1: + X_SC_ATEXIT_MAX = 107 // unistd.h:276:1: + X_SC_BARRIERS = 66 // unistd.h:229:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:173:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:174:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:175:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:176:1: + X_SC_CHILD_MAX = 2 // unistd.h:166:1: + X_SC_CLK_TCK = 3 // unistd.h:167:1: + X_SC_CLOCK_SELECTION = 67 // unistd.h:230:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:177:1: + X_SC_CPUSET_SIZE = 122 // unistd.h:294:1: + X_SC_CPUTIME = 68 // unistd.h:231:1: + X_SC_DELAYTIMER_MAX = 45 // unistd.h:211:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:178:1: + X_SC_FILE_LOCKING = 69 // unistd.h:232:1: + X_SC_FSYNC = 38 // unistd.h:204:1: + X_SC_GETGR_R_SIZE_MAX = 70 // unistd.h:233:1: + X_SC_GETPW_R_SIZE_MAX = 71 // unistd.h:234:1: + X_SC_HOST_NAME_MAX = 72 // unistd.h:235:1: + X_SC_IOV_MAX = 56 // unistd.h:277:1: + X_SC_IPV6 = 118 // unistd.h:270:1: + X_SC_JOB_CONTROL = 6 // unistd.h:170:1: + X_SC_LINE_MAX = 15 // unistd.h:179:1: + X_SC_LOGIN_NAME_MAX = 73 // unistd.h:236:1: + X_SC_MAPPED_FILES = 29 // unistd.h:195:1: + X_SC_MEMLOCK = 30 // unistd.h:196:1: + X_SC_MEMLOCK_RANGE = 31 // unistd.h:197:1: + X_SC_MEMORY_PROTECTION = 32 // unistd.h:198:1: + X_SC_MESSAGE_PASSING = 33 // unistd.h:199:1: + X_SC_MONOTONIC_CLOCK = 74 // unistd.h:237:1: + X_SC_MQ_OPEN_MAX = 46 // unistd.h:212:1: + X_SC_MQ_PRIO_MAX = 75 // unistd.h:238:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:168:1: + X_SC_NPROCESSORS_CONF = 57 // unistd.h:292:1: + X_SC_NPROCESSORS_ONLN = 58 // unistd.h:293:1: + X_SC_OPEN_MAX = 5 // unistd.h:169:1: + X_SC_PAGESIZE = 47 // unistd.h:213:1: + X_SC_PAGE_SIZE = 47 // unistd.h:278:1: + X_SC_PHYS_PAGES = 121 // unistd.h:298:1: + X_SC_PRIORITIZED_IO = 34 // unistd.h:200:1: + X_SC_PRIORITY_SCHEDULING = 35 // unistd.h:201:1: + X_SC_RAW_SOCKETS = 119 // unistd.h:271:1: + X_SC_READER_WRITER_LOCKS = 76 // unistd.h:239:1: + X_SC_REALTIME_SIGNALS = 36 // unistd.h:202:1: + X_SC_REGEXP = 77 // unistd.h:240:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:180:1: + X_SC_RTSIG_MAX = 48 // unistd.h:214:1: + X_SC_SAVED_IDS = 7 // unistd.h:171:1: + X_SC_SEMAPHORES = 37 // unistd.h:203:1: + X_SC_SEM_NSEMS_MAX = 49 // unistd.h:215:1: + X_SC_SEM_VALUE_MAX = 50 // unistd.h:216:1: + X_SC_SHARED_MEMORY_OBJECTS = 39 // unistd.h:205:1: + X_SC_SHELL = 78 // unistd.h:241:1: + X_SC_SIGQUEUE_MAX = 51 // unistd.h:217:1: + X_SC_SPAWN = 79 // unistd.h:242:1: + X_SC_SPIN_LOCKS = 80 // unistd.h:243:1: + X_SC_SPORADIC_SERVER = 81 // unistd.h:244:1: + X_SC_STREAM_MAX = 26 // unistd.h:190:1: + X_SC_SYMLOOP_MAX = 120 // unistd.h:272:1: + X_SC_SYNCHRONIZED_IO = 40 // unistd.h:206:1: + X_SC_THREADS = 96 // unistd.h:259:1: + X_SC_THREAD_ATTR_STACKADDR = 82 // unistd.h:245:1: + X_SC_THREAD_ATTR_STACKSIZE = 83 // unistd.h:246:1: + X_SC_THREAD_CPUTIME = 84 // unistd.h:247:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 85 // unistd.h:248:1: + X_SC_THREAD_KEYS_MAX = 86 // unistd.h:249:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 89 // unistd.h:252:1: + X_SC_THREAD_PRIO_INHERIT = 87 // unistd.h:250:1: + X_SC_THREAD_PRIO_PROTECT = 88 // unistd.h:251:1: + X_SC_THREAD_PROCESS_SHARED = 90 // unistd.h:253:1: + X_SC_THREAD_SAFE_FUNCTIONS = 91 // unistd.h:254:1: + X_SC_THREAD_SPORADIC_SERVER = 92 // unistd.h:255:1: + X_SC_THREAD_STACK_MIN = 93 // unistd.h:256:1: + X_SC_THREAD_THREADS_MAX = 94 // unistd.h:257:1: + X_SC_TIMEOUTS = 95 // unistd.h:258:1: + X_SC_TIMERS = 41 // unistd.h:207:1: + X_SC_TIMER_MAX = 52 // unistd.h:218:1: + X_SC_TRACE = 97 // unistd.h:260:1: + X_SC_TRACE_EVENT_FILTER = 98 // unistd.h:261:1: + X_SC_TRACE_INHERIT = 99 // unistd.h:262:1: + X_SC_TRACE_LOG = 100 // unistd.h:263:1: + X_SC_TTY_NAME_MAX = 101 // unistd.h:264:1: + X_SC_TYPED_MEMORY_OBJECTS = 102 // unistd.h:265:1: + X_SC_TZNAME_MAX = 27 // unistd.h:191:1: + X_SC_V6_ILP32_OFF32 = 103 // unistd.h:266:1: + X_SC_V6_ILP32_OFFBIG = 104 // unistd.h:267:1: + X_SC_V6_LP64_OFF64 = 105 // unistd.h:268:1: + X_SC_V6_LPBIG_OFFBIG = 106 // unistd.h:269:1: + X_SC_VERSION = 8 // unistd.h:172:1: + X_SC_XOPEN_CRYPT = 108 // unistd.h:279:1: + X_SC_XOPEN_ENH_I18N = 109 // unistd.h:280:1: + X_SC_XOPEN_LEGACY = 110 // unistd.h:281:1: + X_SC_XOPEN_REALTIME = 111 // unistd.h:282:1: + X_SC_XOPEN_REALTIME_THREADS = 112 // unistd.h:283:1: + X_SC_XOPEN_SHM = 113 // unistd.h:284:1: + X_SC_XOPEN_STREAMS = 114 // unistd.h:285:1: + X_SC_XOPEN_UNIX = 115 // unistd.h:286:1: + X_SC_XOPEN_VERSION = 116 // unistd.h:287:1: + X_SC_XOPEN_XCU_VERSION = 117 // unistd.h:288:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SWAB_DECLARED = 0 // unistd.h:461:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_UNISTD_H_ = 0 // unistd.h:36:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_V6_ILP32_OFF32 = -1 // unistd.h:139:1: + X_V6_ILP32_OFFBIG = 0 // unistd.h:140:1: + X_V6_LP64_OFF64 = 0 // unistd.h:141:1: + X_V6_LPBIG_OFFBIG = -1 // unistd.h:142:1: + X_XOPEN_CRYPT = -1 // unistd.h:145:1: + X_XOPEN_ENH_I18N = -1 // unistd.h:146:1: + X_XOPEN_LEGACY = -1 // unistd.h:147:1: + X_XOPEN_REALTIME = -1 // unistd.h:148:1: + X_XOPEN_REALTIME_THREADS = -1 // unistd.h:149:1: + X_XOPEN_SHM = 1 // unistd.h:83:1: + X_XOPEN_STREAMS = -1 // unistd.h:84:1: + X_XOPEN_UNIX = -1 // unistd.h:150:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)unistd.h 8.12 (Berkeley) 4/27/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Machine type dependent parameters. +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint64 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint64 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint64 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [16]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ // select(2) + +type Crypt_data = struct { + Finitialized int32 + F__buf [256]int8 +} /* unistd.h:489:1 */ + +// getopt(3) external variable + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_386.go b/vendor/modernc.org/libc/unistd/unistd_linux_386.go index ffc5faca..fc9fc516 100644 --- a/vendor/modernc.org/libc/unistd/unistd_linux_386.go +++ b/vendor/modernc.org/libc/unistd/unistd_linux_386.go @@ -1500,7 +1500,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1511,13 +1512,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ @@ -1533,7 +1536,8 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* unistd.h:232:17 */ type Uid_t = X__uid_t /* unistd.h:237:17 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_amd64.go b/vendor/modernc.org/libc/unistd/unistd_linux_amd64.go index 3a0058ca..7a83d48f 100644 --- a/vendor/modernc.org/libc/unistd/unistd_linux_amd64.go +++ b/vendor/modernc.org/libc/unistd/unistd_linux_amd64.go @@ -1518,7 +1518,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1529,8 +1530,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1550,7 +1552,8 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* unistd.h:232:17 */ type Uid_t = X__uid_t /* unistd.h:237:17 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_arm.go b/vendor/modernc.org/libc/unistd/unistd_linux_arm.go index c9ad971b..7288ac24 100644 --- a/vendor/modernc.org/libc/unistd/unistd_linux_arm.go +++ b/vendor/modernc.org/libc/unistd/unistd_linux_arm.go @@ -1572,7 +1572,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1583,13 +1584,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ @@ -1605,7 +1608,8 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* unistd.h:232:17 */ type Uid_t = X__uid_t /* unistd.h:237:17 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_arm64.go b/vendor/modernc.org/libc/unistd/unistd_linux_arm64.go index 30e9e66b..c0d39b14 100644 --- a/vendor/modernc.org/libc/unistd/unistd_linux_arm64.go +++ b/vendor/modernc.org/libc/unistd/unistd_linux_arm64.go @@ -1598,7 +1598,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1609,8 +1610,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1630,7 +1632,8 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* unistd.h:232:17 */ type Uid_t = X__uid_t /* unistd.h:237:17 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_ppc64le.go b/vendor/modernc.org/libc/unistd/unistd_linux_ppc64le.go index dac896d4..3b027e50 100644 --- a/vendor/modernc.org/libc/unistd/unistd_linux_ppc64le.go +++ b/vendor/modernc.org/libc/unistd/unistd_linux_ppc64le.go @@ -1526,7 +1526,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1537,8 +1538,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1558,7 +1560,8 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* unistd.h:232:17 */ type Uid_t = X__uid_t /* unistd.h:237:17 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go b/vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go index a10adc11..323e986f 100644 --- a/vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go +++ b/vendor/modernc.org/libc/unistd/unistd_linux_riscv64.go @@ -1705,7 +1705,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -1716,8 +1717,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1737,7 +1739,8 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* unistd.h:232:17 */ type Uid_t = X__uid_t /* unistd.h:237:17 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_s390x.go b/vendor/modernc.org/libc/unistd/unistd_linux_s390x.go index b32fa9aa..8de837e0 100644 --- a/vendor/modernc.org/libc/unistd/unistd_linux_s390x.go +++ b/vendor/modernc.org/libc/unistd/unistd_linux_s390x.go @@ -1515,7 +1515,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -1526,8 +1527,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1547,7 +1549,8 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */ // A null pointer constant. // The Single Unix specification says that some more types are -// available here. +// +// available here. type Gid_t = X__gid_t /* unistd.h:232:17 */ type Uid_t = X__uid_t /* unistd.h:237:17 */ diff --git a/vendor/modernc.org/libc/unistd/unistd_netbsd_arm.go b/vendor/modernc.org/libc/unistd/unistd_netbsd_arm.go new file mode 100644 index 00000000..d9dc770a --- /dev/null +++ b/vendor/modernc.org/libc/unistd/unistd_netbsd_arm.go @@ -0,0 +1,1775 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_netbsd_arm.go -pkgname unistd', DO NOT EDIT. + +package unistd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + FDATASYNC = 0x0010 // unistd.h:196:1: + FDISKSYNC = 0x0040 // unistd.h:198:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + FFILESYNC = 0x0020 // unistd.h:197:1: + F_LOCK = 1 // unistd.h:253:1: + F_OK = 0 // unistd.h:172:1: + F_TEST = 3 // unistd.h:255:1: + F_TLOCK = 2 // unistd.h:254:1: + F_ULOCK = 0 // unistd.h:252:1: + GETPASS_7BIT = 0x080 // unistd.h:351:1: + GETPASS_BUF_LIMIT = 0x004 // unistd.h:346:1: + GETPASS_ECHO = 0x020 // unistd.h:349:1: + GETPASS_ECHO_NL = 0x400 // unistd.h:354:1: + GETPASS_ECHO_STAR = 0x040 // unistd.h:350:1: + GETPASS_FAIL_EOF = 0x002 // unistd.h:345:1: + GETPASS_FORCE_LOWER = 0x100 // unistd.h:352:1: + GETPASS_FORCE_UPPER = 0x200 // unistd.h:353:1: + GETPASS_NEED_TTY = 0x001 // unistd.h:344:1: + GETPASS_NO_BEEP = 0x010 // unistd.h:348:1: + GETPASS_NO_SIGNAL = 0x008 // unistd.h:347:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + L_INCR = 1 // unistd.h:185:1: + L_SET = 0 // unistd.h:184:1: + L_XTND = 2 // unistd.h:186:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + R_OK = 0x04 // unistd.h:175:1: + SEEK_CUR = 1 // unistd.h:179:1: + SEEK_END = 2 // unistd.h:180:1: + SEEK_SET = 0 // unistd.h:178:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + STDERR_FILENO = 2 // unistd.h:82:1: + STDIN_FILENO = 0 // unistd.h:80:1: + STDOUT_FILENO = 1 // unistd.h:81:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + W_OK = 0x02 // unistd.h:174:1: + X_OK = 0x01 // unistd.h:173:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_CS_PATH = 1 // unistd.h:338:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_O_SC_CLK_TCK = 3 // unistd.h:227:1: + X_PC_2_SYMLINKS = 13 // unistd.h:214:1: + X_PC_ACL_EXTENDED = 14 // unistd.h:215:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:208:1: + X_PC_FILESIZEBITS = 11 // unistd.h:212:1: + X_PC_LINK_MAX = 1 // unistd.h:202:1: + X_PC_MAX_CANON = 2 // unistd.h:203:1: + X_PC_MAX_INPUT = 3 // unistd.h:204:1: + X_PC_MIN_HOLE_SIZE = 15 // unistd.h:218:1: + X_PC_NAME_MAX = 4 // unistd.h:205:1: + X_PC_NO_TRUNC = 8 // unistd.h:209:1: + X_PC_PATH_MAX = 5 // unistd.h:206:1: + X_PC_PIPE_BUF = 6 // unistd.h:207:1: + X_PC_SYMLINK_MAX = 12 // unistd.h:213:1: + X_PC_SYNC_IO = 10 // unistd.h:211:1: + X_PC_VDISABLE = 9 // unistd.h:210:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_POSIX2_C_BIND = 200112 // unistd.h:166:1: + X_POSIX2_VERSION = 200112 // unistd.h:63:1: + X_POSIX_ASYNCHRONOUS_IO = 200112 // unistd.h:89:1: + X_POSIX_BARRIERS = 200112 // unistd.h:91:1: + X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:93:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:95:1: + X_POSIX_CPUTIME = 200112 // unistd.h:97:1: + X_POSIX_FSYNC = 1 // unistd.h:101:1: + X_POSIX_IPV6 = 0 // unistd.h:103:1: + X_POSIX_JOB_CONTROL = 1 // unistd.h:105:1: + X_POSIX_MAPPED_FILES = 1 // unistd.h:107:1: + X_POSIX_MEMLOCK = 1 // unistd.h:109:1: + X_POSIX_MEMLOCK_RANGE = 1 // unistd.h:111:1: + X_POSIX_MEMORY_PROTECTION = 1 // unistd.h:113:1: + X_POSIX_MESSAGE_PASSING = 200112 // unistd.h:115:1: + X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:117:1: + X_POSIX_NO_TRUNC = 1 // unistd.h:119:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:121:1: + X_POSIX_PRIORITY_SCHEDULING = 200112 // unistd.h:123:1: + X_POSIX_RAW_SOCKETS = 200112 // unistd.h:125:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:127:1: + X_POSIX_REGEXP = 1 // unistd.h:131:1: + X_POSIX_SEMAPHORES = 0 // unistd.h:133:1: + X_POSIX_SHARED_MEMORY_OBJECTS = 0 // unistd.h:135:1: + X_POSIX_SHELL = 1 // unistd.h:137:1: + X_POSIX_SPAWN = 200809 // unistd.h:68:1: + X_POSIX_SPIN_LOCKS = 200112 // unistd.h:139:1: + X_POSIX_SYNCHRONIZED_IO = 1 // unistd.h:143:1: + X_POSIX_THREADS = 200112 // unistd.h:145:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:149:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:147:1: + X_POSIX_THREAD_CPUTIME = 200112 // unistd.h:151:1: + X_POSIX_THREAD_PRIO_PROTECT = 200112 // unistd.h:153:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 // unistd.h:155:1: + X_POSIX_TIMERS = 200112 // unistd.h:159:1: + X_POSIX_VERSION = 200112 // unistd.h:62:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:244:1: + X_SC_2_C_BIND = 18 // unistd.h:242:1: + X_SC_2_C_DEV = 19 // unistd.h:243:1: + X_SC_2_FORT_DEV = 21 // unistd.h:245:1: + X_SC_2_FORT_RUN = 22 // unistd.h:246:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:247:1: + X_SC_2_PBS = 80 // unistd.h:305:1: + X_SC_2_PBS_ACCOUNTING = 81 // unistd.h:306:1: + X_SC_2_PBS_CHECKPOINT = 82 // unistd.h:307:1: + X_SC_2_PBS_LOCATE = 83 // unistd.h:308:1: + X_SC_2_PBS_MESSAGE = 84 // unistd.h:309:1: + X_SC_2_PBS_TRACK = 85 // unistd.h:310:1: + X_SC_2_SW_DEV = 24 // unistd.h:248:1: + X_SC_2_UPE = 25 // unistd.h:249:1: + X_SC_2_VERSION = 17 // unistd.h:241:1: + X_SC_AIO_LISTIO_MAX = 51 // unistd.h:276:1: + X_SC_AIO_MAX = 52 // unistd.h:277:1: + X_SC_ARG_MAX = 1 // unistd.h:225:1: + X_SC_ASYNCHRONOUS_IO = 50 // unistd.h:275:1: + X_SC_ATEXIT_MAX = 40 // unistd.h:265:1: + X_SC_BARRIERS = 43 // unistd.h:268:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:233:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:234:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:235:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:236:1: + X_SC_CHILD_MAX = 2 // unistd.h:226:1: + X_SC_CLK_TCK = 39 // unistd.h:264:1: + X_SC_CLOCK_SELECTION = 49 // unistd.h:274:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:237:1: + X_SC_CPUTIME = 90 // unistd.h:318:1: + X_SC_DELAYTIMER_MAX = 92 // unistd.h:320:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:238:1: + X_SC_FSYNC = 29 // unistd.h:254:1: + X_SC_GETGR_R_SIZE_MAX = 47 // unistd.h:272:1: + X_SC_GETPW_R_SIZE_MAX = 48 // unistd.h:273:1: + X_SC_HOST_NAME_MAX = 69 // unistd.h:294:1: + X_SC_IOV_MAX = 32 // unistd.h:257:1: + X_SC_JOB_CONTROL = 6 // unistd.h:230:1: + X_SC_LINE_MAX = 15 // unistd.h:239:1: + X_SC_LOGIN_NAME_MAX = 37 // unistd.h:262:1: + X_SC_MAPPED_FILES = 33 // unistd.h:258:1: + X_SC_MEMLOCK = 34 // unistd.h:259:1: + X_SC_MEMLOCK_RANGE = 35 // unistd.h:260:1: + X_SC_MEMORY_PROTECTION = 36 // unistd.h:261:1: + X_SC_MESSAGE_PASSING = 53 // unistd.h:278:1: + X_SC_MONOTONIC_CLOCK = 38 // unistd.h:263:1: + X_SC_MQ_OPEN_MAX = 54 // unistd.h:279:1: + X_SC_MQ_PRIO_MAX = 55 // unistd.h:280:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:228:1: + X_SC_NPROCESSORS_CONF = 1001 // unistd.h:329:1: + X_SC_NPROCESSORS_ONLN = 1002 // unistd.h:330:1: + X_SC_OPEN_MAX = 5 // unistd.h:229:1: + X_SC_PAGESIZE = 28 // unistd.h:252:1: + X_SC_PAGE_SIZE = 28 // unistd.h:253:1: + X_SC_PASS_MAX = 70 // unistd.h:295:1: + X_SC_PHYS_PAGES = 121 // unistd.h:325:1: + X_SC_PRIORITY_SCHEDULING = 56 // unistd.h:281:1: + X_SC_READER_WRITER_LOCKS = 46 // unistd.h:271:1: + X_SC_REALTIME_SIGNALS = 94 // unistd.h:322:1: + X_SC_REGEXP = 71 // unistd.h:296:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:240:1: + X_SC_SAVED_IDS = 7 // unistd.h:231:1: + X_SC_SCHED_PRI_MAX = 2003 // unistd.h:334:1: + X_SC_SCHED_PRI_MIN = 2002 // unistd.h:333:1: + X_SC_SCHED_RT_TS = 2001 // unistd.h:332:1: + X_SC_SEMAPHORES = 42 // unistd.h:267:1: + X_SC_SEM_NSEMS_MAX = 89 // unistd.h:317:1: + X_SC_SHARED_MEMORY_OBJECTS = 87 // unistd.h:314:1: + X_SC_SHELL = 72 // unistd.h:297:1: + X_SC_SIGQUEUE_MAX = 93 // unistd.h:321:1: + X_SC_SPAWN = 86 // unistd.h:313:1: + X_SC_SPIN_LOCKS = 45 // unistd.h:270:1: + X_SC_STREAM_MAX = 26 // unistd.h:250:1: + X_SC_SYMLOOP_MAX = 73 // unistd.h:298:1: + X_SC_SYNCHRONIZED_IO = 31 // unistd.h:256:1: + X_SC_THREADS = 41 // unistd.h:266:1: + X_SC_THREAD_ATTR_STACKADDR = 61 // unistd.h:286:1: + X_SC_THREAD_ATTR_STACKSIZE = 62 // unistd.h:287:1: + X_SC_THREAD_CPUTIME = 91 // unistd.h:319:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 57 // unistd.h:282:1: + X_SC_THREAD_KEYS_MAX = 58 // unistd.h:283:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 63 // unistd.h:288:1: + X_SC_THREAD_PRIO_INHERIT = 64 // unistd.h:289:1: + X_SC_THREAD_PRIO_PROTECT = 65 // unistd.h:290:1: + X_SC_THREAD_PROCESS_SHARED = 66 // unistd.h:291:1: + X_SC_THREAD_SAFE_FUNCTIONS = 67 // unistd.h:292:1: + X_SC_THREAD_STACK_MIN = 59 // unistd.h:284:1: + X_SC_THREAD_THREADS_MAX = 60 // unistd.h:285:1: + X_SC_TIMERS = 44 // unistd.h:269:1: + X_SC_TIMER_MAX = 88 // unistd.h:316:1: + X_SC_TTY_NAME_MAX = 68 // unistd.h:293:1: + X_SC_TZNAME_MAX = 27 // unistd.h:251:1: + X_SC_V6_ILP32_OFF32 = 74 // unistd.h:301:1: + X_SC_V6_ILP32_OFFBIG = 75 // unistd.h:302:1: + X_SC_V6_LP64_OFF64 = 76 // unistd.h:303:1: + X_SC_V6_LPBIG_OFFBIG = 77 // unistd.h:304:1: + X_SC_VERSION = 8 // unistd.h:232:1: + X_SC_XOPEN_SHM = 30 // unistd.h:255:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_NULL_H_ = 0 // null.h:9:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:35:1: + X_UNISTD_H_ = 0 // unistd.h:64:1: + X_XOPEN_SHM = 0 // unistd.h:169:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Machine type dependent parameters. +// $NetBSD: types.h,v 1.38 2019/04/06 03:06:25 thorpej 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ // getsubopt(3) external variable + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/unistd_openbsd_386.go b/vendor/modernc.org/libc/unistd/unistd_openbsd_386.go new file mode 100644 index 00000000..c9e3de37 --- /dev/null +++ b/vendor/modernc.org/libc/unistd/unistd_openbsd_386.go @@ -0,0 +1,1083 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_openbsd_386.go -pkgname unistd', DO NOT EDIT. + +package unistd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + F_LOCK = 1 // unistd.h:48:1: + F_OK = 0 // unistd.h:49:1: + F_TEST = 3 // unistd.h:50:1: + F_TLOCK = 2 // unistd.h:49:1: + F_ULOCK = 0 // unistd.h:47:1: + KBIND_BLOCK_MAX = 2 // unistd.h:77:1: + KBIND_DATA_MAX = 24 // unistd.h:78:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + L_INCR = 1 // unistd.h:62:1: + L_SET = 0 // unistd.h:61:1: + L_XTND = 2 // unistd.h:63:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + R_OK = 0x04 // unistd.h:52:1: + SEEK_CUR = 1 // unistd.h:56:1: + SEEK_END = 2 // unistd.h:57:1: + SEEK_SET = 0 // unistd.h:55:1: + STDERR_FILENO = 2 // unistd.h:44:1: + STDIN_FILENO = 0 // unistd.h:42:1: + STDOUT_FILENO = 1 // unistd.h:43:1: + W_OK = 0x02 // unistd.h:51:1: + X_OK = 0x01 // unistd.h:50:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_CS_PATH = 1 // unistd.h:286:1: + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:287:1: + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:288:1: + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:289:1: + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:290:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:291:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:292:1: + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:293:1: + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:294:1: + X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:295:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:296:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:297:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:298:1: + X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:299:1: + X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 16 // unistd.h:301:1: + X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 17 // unistd.h:302:1: + X_CS_POSIX_V7_ILP32_OFF32_LIBS = 18 // unistd.h:303:1: + X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 19 // unistd.h:304:1: + X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 20 // unistd.h:305:1: + X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 21 // unistd.h:306:1: + X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 22 // unistd.h:307:1: + X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 23 // unistd.h:308:1: + X_CS_POSIX_V7_LP64_OFF64_LIBS = 24 // unistd.h:309:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 25 // unistd.h:310:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 26 // unistd.h:311:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 27 // unistd.h:312:1: + X_CS_POSIX_V7_THREADS_CFLAGS = 28 // unistd.h:313:1: + X_CS_POSIX_V7_THREADS_LDFLAGS = 29 // unistd.h:314:1: + X_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = 30 // unistd.h:315:1: + X_CS_V6_ENV = 15 // unistd.h:300:1: + X_CS_V7_ENV = 31 // unistd.h:316:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GETOPT_DEFINED_ = 0 // unistd.h:385:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_INTPTR_T_DEFINED_ = 0 // unistd.h:319:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PC_2_SYMLINKS = 10 // unistd.h:93:1: + X_PC_ALLOC_SIZE_MIN = 11 // unistd.h:94:1: + X_PC_ASYNC_IO = 12 // unistd.h:95:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:90:1: + X_PC_FILESIZEBITS = 13 // unistd.h:96:1: + X_PC_LINK_MAX = 1 // unistd.h:84:1: + X_PC_MAX_CANON = 2 // unistd.h:85:1: + X_PC_MAX_INPUT = 3 // unistd.h:86:1: + X_PC_NAME_MAX = 4 // unistd.h:87:1: + X_PC_NO_TRUNC = 8 // unistd.h:91:1: + X_PC_PATH_MAX = 5 // unistd.h:88:1: + X_PC_PIPE_BUF = 6 // unistd.h:89:1: + X_PC_PRIO_IO = 14 // unistd.h:97:1: + X_PC_REC_INCR_XFER_SIZE = 15 // unistd.h:98:1: + X_PC_REC_MAX_XFER_SIZE = 16 // unistd.h:99:1: + X_PC_REC_MIN_XFER_SIZE = 17 // unistd.h:100:1: + X_PC_REC_XFER_ALIGN = 18 // unistd.h:101:1: + X_PC_SYMLINK_MAX = 19 // unistd.h:102:1: + X_PC_SYNC_IO = 20 // unistd.h:103:1: + X_PC_TIMESTAMP_RESOLUTION = 21 // unistd.h:104:1: + X_PC_VDISABLE = 9 // unistd.h:92:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_POSIX2_CHAR_TERM = 1 // unistd.h:116:1: + X_POSIX2_C_BIND = 200112 // unistd.h:114:1: + X_POSIX2_C_DEV = -1 // unistd.h:115:1: + X_POSIX2_FORT_DEV = -1 // unistd.h:117:1: + X_POSIX2_FORT_RUN = -1 // unistd.h:118:1: + X_POSIX2_LOCALEDEF = -1 // unistd.h:119:1: + X_POSIX2_PBS = -1 // unistd.h:120:1: + X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:121:1: + X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:122:1: + X_POSIX2_PBS_LOCATE = -1 // unistd.h:123:1: + X_POSIX2_PBS_MESSAGE = -1 // unistd.h:124:1: + X_POSIX2_PBS_TRACK = -1 // unistd.h:125:1: + X_POSIX2_SW_DEV = 200112 // unistd.h:126:1: + X_POSIX2_UPE = 200112 // unistd.h:127:1: + X_POSIX2_VERSION = 200809 // unistd.h:148:1: + X_POSIX_ADVISORY_INFO = -1 // unistd.h:65:1: + X_POSIX_ASYNCHRONOUS_IO = -1 // unistd.h:66:1: + X_POSIX_ASYNC_IO = -1 // unistd.h:41:1: + X_POSIX_BARRIERS = 200112 // unistd.h:67:1: + X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:68:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:69:1: + X_POSIX_CPUTIME = 200809 // unistd.h:70:1: + X_POSIX_FSYNC = 200112 // unistd.h:71:1: + X_POSIX_IPV6 = 0 // unistd.h:72:1: + X_POSIX_JOB_CONTROL = 1 // unistd.h:73:1: + X_POSIX_MAPPED_FILES = 200112 // unistd.h:74:1: + X_POSIX_MEMLOCK = 200112 // unistd.h:75:1: + X_POSIX_MEMLOCK_RANGE = 200112 // unistd.h:76:1: + X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:77:1: + X_POSIX_MESSAGE_PASSING = -1 // unistd.h:78:1: + X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:79:1: + X_POSIX_NO_TRUNC = 1 // unistd.h:80:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:81:1: + X_POSIX_PRIORITY_SCHEDULING = -1 // unistd.h:82:1: + X_POSIX_PRIO_IO = -1 // unistd.h:42:1: + X_POSIX_RAW_SOCKETS = 200112 // unistd.h:83:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:84:1: + X_POSIX_REALTIME_SIGNALS = -1 // unistd.h:85:1: + X_POSIX_REGEXP = 1 // unistd.h:86:1: + X_POSIX_SAVED_IDS = 1 // unistd.h:87:1: + X_POSIX_SEMAPHORES = 200112 // unistd.h:88:1: + X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // unistd.h:89:1: + X_POSIX_SHELL = 1 // unistd.h:90:1: + X_POSIX_SPAWN = 200112 // unistd.h:91:1: + X_POSIX_SPIN_LOCKS = 200112 // unistd.h:92:1: + X_POSIX_SPORADIC_SERVER = -1 // unistd.h:93:1: + X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:94:1: + X_POSIX_SYNC_IO = -1 // unistd.h:43:1: + X_POSIX_THREADS = 200112 // unistd.h:106:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:95:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:96:1: + X_POSIX_THREAD_CPUTIME = 200809 // unistd.h:97:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 // unistd.h:100:1: + X_POSIX_THREAD_PRIO_INHERIT = -1 // unistd.h:98:1: + X_POSIX_THREAD_PRIO_PROTECT = -1 // unistd.h:99:1: + X_POSIX_THREAD_PROCESS_SHARED = -1 // unistd.h:101:1: + X_POSIX_THREAD_ROBUST_PRIO_INHERIT = -1 // unistd.h:102:1: + X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // unistd.h:103:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 // unistd.h:104:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:105:1: + X_POSIX_TIMEOUTS = 200112 // unistd.h:107:1: + X_POSIX_TIMERS = -1 // unistd.h:108:1: + X_POSIX_TRACE = -1 // unistd.h:109:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:110:1: + X_POSIX_TRACE_INHERIT = -1 // unistd.h:111:1: + X_POSIX_TRACE_LOG = -1 // unistd.h:112:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:113:1: + X_POSIX_V6_ILP32_OFF32 = -1 // unistd.h:128:1: + X_POSIX_V6_ILP32_OFFBIG = 0 // unistd.h:129:1: + X_POSIX_V6_LP64_OFF64 = 0 // unistd.h:130:1: + X_POSIX_V6_LPBIG_OFFBIG = 0 // unistd.h:131:1: + X_POSIX_V7_ILP32_OFF32 = -1 // unistd.h:132:1: + X_POSIX_V7_ILP32_OFFBIG = 0 // unistd.h:133:1: + X_POSIX_V7_LP64_OFF64 = 0 // unistd.h:134:1: + X_POSIX_V7_LPBIG_OFFBIG = 0 // unistd.h:135:1: + X_POSIX_VDISABLE = 255 // unistd.h:40:1: + X_POSIX_VERSION = 200809 // unistd.h:46:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:172:1: + X_SC_2_C_BIND = 18 // unistd.h:170:1: + X_SC_2_C_DEV = 19 // unistd.h:171:1: + X_SC_2_FORT_DEV = 21 // unistd.h:173:1: + X_SC_2_FORT_RUN = 22 // unistd.h:174:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:175:1: + X_SC_2_PBS = 35 // unistd.h:188:1: + X_SC_2_PBS_ACCOUNTING = 36 // unistd.h:189:1: + X_SC_2_PBS_CHECKPOINT = 37 // unistd.h:190:1: + X_SC_2_PBS_LOCATE = 38 // unistd.h:191:1: + X_SC_2_PBS_MESSAGE = 39 // unistd.h:192:1: + X_SC_2_PBS_TRACK = 40 // unistd.h:193:1: + X_SC_2_SW_DEV = 24 // unistd.h:176:1: + X_SC_2_UPE = 25 // unistd.h:177:1: + X_SC_2_VERSION = 17 // unistd.h:169:1: + X_SC_ADVISORY_INFO = 41 // unistd.h:194:1: + X_SC_AIO_LISTIO_MAX = 42 // unistd.h:195:1: + X_SC_AIO_MAX = 43 // unistd.h:196:1: + X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:197:1: + X_SC_ARG_MAX = 1 // unistd.h:153:1: + X_SC_ASYNCHRONOUS_IO = 45 // unistd.h:198:1: + X_SC_ATEXIT_MAX = 46 // unistd.h:199:1: + X_SC_AVPHYS_PAGES = 501 // unistd.h:281:1: + X_SC_BARRIERS = 47 // unistd.h:200:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:161:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:162:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:163:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:164:1: + X_SC_CHILD_MAX = 2 // unistd.h:154:1: + X_SC_CLK_TCK = 3 // unistd.h:155:1: + X_SC_CLOCK_SELECTION = 48 // unistd.h:201:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:165:1: + X_SC_CPUTIME = 49 // unistd.h:202:1: + X_SC_DELAYTIMER_MAX = 50 // unistd.h:203:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:166:1: + X_SC_FSYNC = 29 // unistd.h:182:1: + X_SC_GETGR_R_SIZE_MAX = 100 // unistd.h:253:1: + X_SC_GETPW_R_SIZE_MAX = 101 // unistd.h:254:1: + X_SC_HOST_NAME_MAX = 33 // unistd.h:186:1: + X_SC_IOV_MAX = 51 // unistd.h:204:1: + X_SC_IPV6 = 52 // unistd.h:205:1: + X_SC_JOB_CONTROL = 6 // unistd.h:158:1: + X_SC_LINE_MAX = 15 // unistd.h:167:1: + X_SC_LOGIN_NAME_MAX = 102 // unistd.h:255:1: + X_SC_MAPPED_FILES = 53 // unistd.h:206:1: + X_SC_MEMLOCK = 54 // unistd.h:207:1: + X_SC_MEMLOCK_RANGE = 55 // unistd.h:208:1: + X_SC_MEMORY_PROTECTION = 56 // unistd.h:209:1: + X_SC_MESSAGE_PASSING = 57 // unistd.h:210:1: + X_SC_MONOTONIC_CLOCK = 34 // unistd.h:187:1: + X_SC_MQ_OPEN_MAX = 58 // unistd.h:211:1: + X_SC_MQ_PRIO_MAX = 59 // unistd.h:212:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:156:1: + X_SC_NPROCESSORS_CONF = 502 // unistd.h:282:1: + X_SC_NPROCESSORS_ONLN = 503 // unistd.h:283:1: + X_SC_OPEN_MAX = 5 // unistd.h:157:1: + X_SC_PAGESIZE = 28 // unistd.h:180:1: + X_SC_PAGE_SIZE = 28 // unistd.h:181:1: + X_SC_PHYS_PAGES = 500 // unistd.h:280:1: + X_SC_PRIORITIZED_IO = 60 // unistd.h:213:1: + X_SC_PRIORITY_SCHEDULING = 61 // unistd.h:214:1: + X_SC_RAW_SOCKETS = 62 // unistd.h:215:1: + X_SC_READER_WRITER_LOCKS = 63 // unistd.h:216:1: + X_SC_REALTIME_SIGNALS = 64 // unistd.h:217:1: + X_SC_REGEXP = 65 // unistd.h:218:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:168:1: + X_SC_RTSIG_MAX = 66 // unistd.h:219:1: + X_SC_SAVED_IDS = 7 // unistd.h:159:1: + X_SC_SEMAPHORES = 67 // unistd.h:220:1: + X_SC_SEM_NSEMS_MAX = 31 // unistd.h:184:1: + X_SC_SEM_VALUE_MAX = 32 // unistd.h:185:1: + X_SC_SHARED_MEMORY_OBJECTS = 68 // unistd.h:221:1: + X_SC_SHELL = 69 // unistd.h:222:1: + X_SC_SIGQUEUE_MAX = 70 // unistd.h:223:1: + X_SC_SPAWN = 71 // unistd.h:224:1: + X_SC_SPIN_LOCKS = 72 // unistd.h:225:1: + X_SC_SPORADIC_SERVER = 73 // unistd.h:226:1: + X_SC_SS_REPL_MAX = 74 // unistd.h:227:1: + X_SC_STREAM_MAX = 26 // unistd.h:178:1: + X_SC_SYMLOOP_MAX = 76 // unistd.h:229:1: + X_SC_SYNCHRONIZED_IO = 75 // unistd.h:228:1: + X_SC_THREADS = 91 // unistd.h:244:1: + X_SC_THREAD_ATTR_STACKADDR = 77 // unistd.h:230:1: + X_SC_THREAD_ATTR_STACKSIZE = 78 // unistd.h:231:1: + X_SC_THREAD_CPUTIME = 79 // unistd.h:232:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 80 // unistd.h:233:1: + X_SC_THREAD_KEYS_MAX = 81 // unistd.h:234:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 84 // unistd.h:237:1: + X_SC_THREAD_PRIO_INHERIT = 82 // unistd.h:235:1: + X_SC_THREAD_PRIO_PROTECT = 83 // unistd.h:236:1: + X_SC_THREAD_PROCESS_SHARED = 85 // unistd.h:238:1: + X_SC_THREAD_ROBUST_PRIO_INHERIT = 86 // unistd.h:239:1: + X_SC_THREAD_ROBUST_PRIO_PROTECT = 87 // unistd.h:240:1: + X_SC_THREAD_SAFE_FUNCTIONS = 103 // unistd.h:256:1: + X_SC_THREAD_SPORADIC_SERVER = 88 // unistd.h:241:1: + X_SC_THREAD_STACK_MIN = 89 // unistd.h:242:1: + X_SC_THREAD_THREADS_MAX = 90 // unistd.h:243:1: + X_SC_TIMEOUTS = 92 // unistd.h:245:1: + X_SC_TIMERS = 94 // unistd.h:247:1: + X_SC_TIMER_MAX = 93 // unistd.h:246:1: + X_SC_TRACE = 95 // unistd.h:248:1: + X_SC_TRACE_EVENT_FILTER = 96 // unistd.h:249:1: + X_SC_TRACE_EVENT_NAME_MAX = 97 // unistd.h:250:1: + X_SC_TRACE_INHERIT = 98 // unistd.h:251:1: + X_SC_TRACE_LOG = 99 // unistd.h:252:1: + X_SC_TRACE_NAME_MAX = 104 // unistd.h:257:1: + X_SC_TRACE_SYS_MAX = 105 // unistd.h:258:1: + X_SC_TRACE_USER_EVENT_MAX = 106 // unistd.h:259:1: + X_SC_TTY_NAME_MAX = 107 // unistd.h:260:1: + X_SC_TYPED_MEMORY_OBJECTS = 108 // unistd.h:261:1: + X_SC_TZNAME_MAX = 27 // unistd.h:179:1: + X_SC_V6_ILP32_OFF32 = 109 // unistd.h:262:1: + X_SC_V6_ILP32_OFFBIG = 110 // unistd.h:263:1: + X_SC_V6_LP64_OFF64 = 111 // unistd.h:264:1: + X_SC_V6_LPBIG_OFFBIG = 112 // unistd.h:265:1: + X_SC_V7_ILP32_OFF32 = 113 // unistd.h:266:1: + X_SC_V7_ILP32_OFFBIG = 114 // unistd.h:267:1: + X_SC_V7_LP64_OFF64 = 115 // unistd.h:268:1: + X_SC_V7_LPBIG_OFFBIG = 116 // unistd.h:269:1: + X_SC_VERSION = 8 // unistd.h:160:1: + X_SC_XOPEN_CRYPT = 117 // unistd.h:270:1: + X_SC_XOPEN_ENH_I18N = 118 // unistd.h:271:1: + X_SC_XOPEN_LEGACY = 119 // unistd.h:272:1: + X_SC_XOPEN_REALTIME = 120 // unistd.h:273:1: + X_SC_XOPEN_REALTIME_THREADS = 121 // unistd.h:274:1: + X_SC_XOPEN_SHM = 30 // unistd.h:183:1: + X_SC_XOPEN_STREAMS = 122 // unistd.h:275:1: + X_SC_XOPEN_UNIX = 123 // unistd.h:276:1: + X_SC_XOPEN_UUCP = 124 // unistd.h:277:1: + X_SC_XOPEN_VERSION = 125 // unistd.h:278:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_UNISTD_H_ = 0 // unistd.h:36:1: + X_XOPEN_CRYPT = 1 // unistd.h:137:1: + X_XOPEN_ENH_I18N = -1 // unistd.h:138:1: + X_XOPEN_LEGACY = -1 // unistd.h:139:1: + X_XOPEN_REALTIME = -1 // unistd.h:140:1: + X_XOPEN_REALTIME_THREADS = -1 // unistd.h:141:1: + X_XOPEN_SHM = 1 // unistd.h:142:1: + X_XOPEN_STREAMS = -1 // unistd.h:143:1: + X_XOPEN_UNIX = -1 // unistd.h:145:1: + X_XOPEN_UUCP = -1 // unistd.h:144:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: unistd.h,v 1.106 2018/07/13 09:25:22 beck Exp $ +// $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ + +// - +// Copyright (c) 1991 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 5.13 (Berkeley) 6/17/91 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: unistd.h,v 1.31 2015/07/20 00:56:10 guenther Exp $ +// $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// Define the POSIX.1 version we target for compliance. + +// access function + +// whence values for lseek(2) + +// old BSD whence values for lseek(2); renamed by POSIX 1003.1 + +// the parameters argument passed to the __tfork() syscall +type X__tfork = struct { + Ftf_tcb uintptr + Ftf_tid uintptr + Ftf_stack uintptr +} /* unistd.h:66:1 */ + +// the parameters argument for the kbind() syscall +type X__kbind = struct { + Fkb_addr uintptr + Fkb_size Size_t +} /* unistd.h:73:1 */ + +// the pathconf(2) variable values are part of the ABI + +// configurable pathname variables + +// POSIX options and option groups we unconditionally do or don't +// implement. Please keep this list in alphabetical order. +// +// Anything which is defined as zero below **must** have an +// implementation for the corresponding sysconf() which is able to +// determine conclusively whether or not the feature is supported. +// Anything which is defined as other than -1 below **must** have +// complete headers, types, and function declarations as specified by +// the POSIX standard; however, if the relevant sysconf() function +// returns -1, the functions may be stubbed out. + +// Define the POSIX.2 version we target for compliance. + +// the sysconf(3) variable values are part of the ABI + +// configurable system variables + +// configurable system strings + +type Intptr_t = X__intptr_t /* unistd.h:320:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go b/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go index 66424904..58beafef 100644 --- a/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go +++ b/vendor/modernc.org/libc/unistd/unistd_openbsd_amd64.go @@ -40,8 +40,8 @@ const ( X_OK = 0x01 // unistd.h:50:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_CS_PATH = 1 // unistd.h:286:1: X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:287:1: X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:288:1: @@ -86,7 +86,7 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PC_2_SYMLINKS = 10 // unistd.h:93:1: X_PC_ALLOC_SIZE_MIN = 11 // unistd.h:94:1: X_PC_ASYNC_IO = 12 // unistd.h:95:1: @@ -109,7 +109,7 @@ const ( X_PC_TIMESTAMP_RESOLUTION = 21 // unistd.h:104:1: X_PC_VDISABLE = 9 // unistd.h:92:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_POSIX2_CHAR_TERM = 1 // unistd.h:116:1: X_POSIX2_C_BIND = 200112 // unistd.h:114:1: X_POSIX2_C_DEV = -1 // unistd.h:115:1: @@ -320,8 +320,8 @@ const ( X_SC_XOPEN_UNIX = 123 // unistd.h:276:1: X_SC_XOPEN_UUCP = 124 // unistd.h:277:1: X_SC_XOPEN_VERSION = 125 // unistd.h:278:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -329,8 +329,8 @@ const ( X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -345,7 +345,7 @@ const ( X_XOPEN_STREAMS = -1 // unistd.h:143:1: X_XOPEN_UNIX = -1 // unistd.h:145:1: X_XOPEN_UUCP = -1 // unistd.h:144:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -404,7 +404,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Written by Todd C. Miller, September 9, 2016 // Public domain. -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -701,7 +701,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -861,18 +861,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -954,27 +953,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. diff --git a/vendor/modernc.org/libc/unistd/unistd_openbsd_arm64.go b/vendor/modernc.org/libc/unistd/unistd_openbsd_arm64.go new file mode 100644 index 00000000..1c18db41 --- /dev/null +++ b/vendor/modernc.org/libc/unistd/unistd_openbsd_arm64.go @@ -0,0 +1,1090 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_openbsd_arm64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + F_LOCK = 1 // unistd.h:48:1: + F_OK = 0 // unistd.h:49:1: + F_TEST = 3 // unistd.h:50:1: + F_TLOCK = 2 // unistd.h:49:1: + F_ULOCK = 0 // unistd.h:47:1: + KBIND_BLOCK_MAX = 2 // unistd.h:77:1: + KBIND_DATA_MAX = 24 // unistd.h:78:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + L_INCR = 1 // unistd.h:62:1: + L_SET = 0 // unistd.h:61:1: + L_XTND = 2 // unistd.h:63:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + R_OK = 0x04 // unistd.h:52:1: + SEEK_CUR = 1 // unistd.h:56:1: + SEEK_END = 2 // unistd.h:57:1: + SEEK_SET = 0 // unistd.h:55:1: + STDERR_FILENO = 2 // unistd.h:44:1: + STDIN_FILENO = 0 // unistd.h:42:1: + STDOUT_FILENO = 1 // unistd.h:43:1: + W_OK = 0x02 // unistd.h:51:1: + X_OK = 0x01 // unistd.h:50:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_CS_PATH = 1 // unistd.h:286:1: + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:287:1: + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:288:1: + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:289:1: + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:290:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:291:1: + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:292:1: + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:293:1: + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:294:1: + X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:295:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:296:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:297:1: + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:298:1: + X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:299:1: + X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 16 // unistd.h:301:1: + X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 17 // unistd.h:302:1: + X_CS_POSIX_V7_ILP32_OFF32_LIBS = 18 // unistd.h:303:1: + X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 19 // unistd.h:304:1: + X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 20 // unistd.h:305:1: + X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 21 // unistd.h:306:1: + X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 22 // unistd.h:307:1: + X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 23 // unistd.h:308:1: + X_CS_POSIX_V7_LP64_OFF64_LIBS = 24 // unistd.h:309:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 25 // unistd.h:310:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 26 // unistd.h:311:1: + X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 27 // unistd.h:312:1: + X_CS_POSIX_V7_THREADS_CFLAGS = 28 // unistd.h:313:1: + X_CS_POSIX_V7_THREADS_LDFLAGS = 29 // unistd.h:314:1: + X_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = 30 // unistd.h:315:1: + X_CS_V6_ENV = 15 // unistd.h:300:1: + X_CS_V7_ENV = 31 // unistd.h:316:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GETOPT_DEFINED_ = 0 // unistd.h:385:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_INTPTR_T_DEFINED_ = 0 // unistd.h:319:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PC_2_SYMLINKS = 10 // unistd.h:93:1: + X_PC_ALLOC_SIZE_MIN = 11 // unistd.h:94:1: + X_PC_ASYNC_IO = 12 // unistd.h:95:1: + X_PC_CHOWN_RESTRICTED = 7 // unistd.h:90:1: + X_PC_FILESIZEBITS = 13 // unistd.h:96:1: + X_PC_LINK_MAX = 1 // unistd.h:84:1: + X_PC_MAX_CANON = 2 // unistd.h:85:1: + X_PC_MAX_INPUT = 3 // unistd.h:86:1: + X_PC_NAME_MAX = 4 // unistd.h:87:1: + X_PC_NO_TRUNC = 8 // unistd.h:91:1: + X_PC_PATH_MAX = 5 // unistd.h:88:1: + X_PC_PIPE_BUF = 6 // unistd.h:89:1: + X_PC_PRIO_IO = 14 // unistd.h:97:1: + X_PC_REC_INCR_XFER_SIZE = 15 // unistd.h:98:1: + X_PC_REC_MAX_XFER_SIZE = 16 // unistd.h:99:1: + X_PC_REC_MIN_XFER_SIZE = 17 // unistd.h:100:1: + X_PC_REC_XFER_ALIGN = 18 // unistd.h:101:1: + X_PC_SYMLINK_MAX = 19 // unistd.h:102:1: + X_PC_SYNC_IO = 20 // unistd.h:103:1: + X_PC_TIMESTAMP_RESOLUTION = 21 // unistd.h:104:1: + X_PC_VDISABLE = 9 // unistd.h:92:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_POSIX2_CHAR_TERM = 1 // unistd.h:116:1: + X_POSIX2_C_BIND = 200112 // unistd.h:114:1: + X_POSIX2_C_DEV = -1 // unistd.h:115:1: + X_POSIX2_FORT_DEV = -1 // unistd.h:117:1: + X_POSIX2_FORT_RUN = -1 // unistd.h:118:1: + X_POSIX2_LOCALEDEF = -1 // unistd.h:119:1: + X_POSIX2_PBS = -1 // unistd.h:120:1: + X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:121:1: + X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:122:1: + X_POSIX2_PBS_LOCATE = -1 // unistd.h:123:1: + X_POSIX2_PBS_MESSAGE = -1 // unistd.h:124:1: + X_POSIX2_PBS_TRACK = -1 // unistd.h:125:1: + X_POSIX2_SW_DEV = 200112 // unistd.h:126:1: + X_POSIX2_UPE = 200112 // unistd.h:127:1: + X_POSIX2_VERSION = 200809 // unistd.h:148:1: + X_POSIX_ADVISORY_INFO = -1 // unistd.h:65:1: + X_POSIX_ASYNCHRONOUS_IO = -1 // unistd.h:66:1: + X_POSIX_ASYNC_IO = -1 // unistd.h:41:1: + X_POSIX_BARRIERS = 200112 // unistd.h:67:1: + X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:68:1: + X_POSIX_CLOCK_SELECTION = -1 // unistd.h:69:1: + X_POSIX_CPUTIME = 200809 // unistd.h:70:1: + X_POSIX_FSYNC = 200112 // unistd.h:71:1: + X_POSIX_IPV6 = 0 // unistd.h:72:1: + X_POSIX_JOB_CONTROL = 1 // unistd.h:73:1: + X_POSIX_MAPPED_FILES = 200112 // unistd.h:74:1: + X_POSIX_MEMLOCK = 200112 // unistd.h:75:1: + X_POSIX_MEMLOCK_RANGE = 200112 // unistd.h:76:1: + X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:77:1: + X_POSIX_MESSAGE_PASSING = -1 // unistd.h:78:1: + X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:79:1: + X_POSIX_NO_TRUNC = 1 // unistd.h:80:1: + X_POSIX_PRIORITIZED_IO = -1 // unistd.h:81:1: + X_POSIX_PRIORITY_SCHEDULING = -1 // unistd.h:82:1: + X_POSIX_PRIO_IO = -1 // unistd.h:42:1: + X_POSIX_RAW_SOCKETS = 200112 // unistd.h:83:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:84:1: + X_POSIX_REALTIME_SIGNALS = -1 // unistd.h:85:1: + X_POSIX_REGEXP = 1 // unistd.h:86:1: + X_POSIX_SAVED_IDS = 1 // unistd.h:87:1: + X_POSIX_SEMAPHORES = 200112 // unistd.h:88:1: + X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // unistd.h:89:1: + X_POSIX_SHELL = 1 // unistd.h:90:1: + X_POSIX_SPAWN = 200112 // unistd.h:91:1: + X_POSIX_SPIN_LOCKS = 200112 // unistd.h:92:1: + X_POSIX_SPORADIC_SERVER = -1 // unistd.h:93:1: + X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:94:1: + X_POSIX_SYNC_IO = -1 // unistd.h:43:1: + X_POSIX_THREADS = 200112 // unistd.h:106:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:95:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:96:1: + X_POSIX_THREAD_CPUTIME = 200809 // unistd.h:97:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 // unistd.h:100:1: + X_POSIX_THREAD_PRIO_INHERIT = -1 // unistd.h:98:1: + X_POSIX_THREAD_PRIO_PROTECT = -1 // unistd.h:99:1: + X_POSIX_THREAD_PROCESS_SHARED = -1 // unistd.h:101:1: + X_POSIX_THREAD_ROBUST_PRIO_INHERIT = -1 // unistd.h:102:1: + X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // unistd.h:103:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 // unistd.h:104:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:105:1: + X_POSIX_TIMEOUTS = 200112 // unistd.h:107:1: + X_POSIX_TIMERS = -1 // unistd.h:108:1: + X_POSIX_TRACE = -1 // unistd.h:109:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:110:1: + X_POSIX_TRACE_INHERIT = -1 // unistd.h:111:1: + X_POSIX_TRACE_LOG = -1 // unistd.h:112:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:113:1: + X_POSIX_V6_ILP32_OFF32 = -1 // unistd.h:128:1: + X_POSIX_V6_ILP32_OFFBIG = 0 // unistd.h:129:1: + X_POSIX_V6_LP64_OFF64 = 0 // unistd.h:130:1: + X_POSIX_V6_LPBIG_OFFBIG = 0 // unistd.h:131:1: + X_POSIX_V7_ILP32_OFF32 = -1 // unistd.h:132:1: + X_POSIX_V7_ILP32_OFFBIG = 0 // unistd.h:133:1: + X_POSIX_V7_LP64_OFF64 = 0 // unistd.h:134:1: + X_POSIX_V7_LPBIG_OFFBIG = 0 // unistd.h:135:1: + X_POSIX_VDISABLE = 255 // unistd.h:40:1: + X_POSIX_VERSION = 200809 // unistd.h:46:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SC_2_CHAR_TERM = 20 // unistd.h:172:1: + X_SC_2_C_BIND = 18 // unistd.h:170:1: + X_SC_2_C_DEV = 19 // unistd.h:171:1: + X_SC_2_FORT_DEV = 21 // unistd.h:173:1: + X_SC_2_FORT_RUN = 22 // unistd.h:174:1: + X_SC_2_LOCALEDEF = 23 // unistd.h:175:1: + X_SC_2_PBS = 35 // unistd.h:188:1: + X_SC_2_PBS_ACCOUNTING = 36 // unistd.h:189:1: + X_SC_2_PBS_CHECKPOINT = 37 // unistd.h:190:1: + X_SC_2_PBS_LOCATE = 38 // unistd.h:191:1: + X_SC_2_PBS_MESSAGE = 39 // unistd.h:192:1: + X_SC_2_PBS_TRACK = 40 // unistd.h:193:1: + X_SC_2_SW_DEV = 24 // unistd.h:176:1: + X_SC_2_UPE = 25 // unistd.h:177:1: + X_SC_2_VERSION = 17 // unistd.h:169:1: + X_SC_ADVISORY_INFO = 41 // unistd.h:194:1: + X_SC_AIO_LISTIO_MAX = 42 // unistd.h:195:1: + X_SC_AIO_MAX = 43 // unistd.h:196:1: + X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:197:1: + X_SC_ARG_MAX = 1 // unistd.h:153:1: + X_SC_ASYNCHRONOUS_IO = 45 // unistd.h:198:1: + X_SC_ATEXIT_MAX = 46 // unistd.h:199:1: + X_SC_AVPHYS_PAGES = 501 // unistd.h:281:1: + X_SC_BARRIERS = 47 // unistd.h:200:1: + X_SC_BC_BASE_MAX = 9 // unistd.h:161:1: + X_SC_BC_DIM_MAX = 10 // unistd.h:162:1: + X_SC_BC_SCALE_MAX = 11 // unistd.h:163:1: + X_SC_BC_STRING_MAX = 12 // unistd.h:164:1: + X_SC_CHILD_MAX = 2 // unistd.h:154:1: + X_SC_CLK_TCK = 3 // unistd.h:155:1: + X_SC_CLOCK_SELECTION = 48 // unistd.h:201:1: + X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:165:1: + X_SC_CPUTIME = 49 // unistd.h:202:1: + X_SC_DELAYTIMER_MAX = 50 // unistd.h:203:1: + X_SC_EXPR_NEST_MAX = 14 // unistd.h:166:1: + X_SC_FSYNC = 29 // unistd.h:182:1: + X_SC_GETGR_R_SIZE_MAX = 100 // unistd.h:253:1: + X_SC_GETPW_R_SIZE_MAX = 101 // unistd.h:254:1: + X_SC_HOST_NAME_MAX = 33 // unistd.h:186:1: + X_SC_IOV_MAX = 51 // unistd.h:204:1: + X_SC_IPV6 = 52 // unistd.h:205:1: + X_SC_JOB_CONTROL = 6 // unistd.h:158:1: + X_SC_LINE_MAX = 15 // unistd.h:167:1: + X_SC_LOGIN_NAME_MAX = 102 // unistd.h:255:1: + X_SC_MAPPED_FILES = 53 // unistd.h:206:1: + X_SC_MEMLOCK = 54 // unistd.h:207:1: + X_SC_MEMLOCK_RANGE = 55 // unistd.h:208:1: + X_SC_MEMORY_PROTECTION = 56 // unistd.h:209:1: + X_SC_MESSAGE_PASSING = 57 // unistd.h:210:1: + X_SC_MONOTONIC_CLOCK = 34 // unistd.h:187:1: + X_SC_MQ_OPEN_MAX = 58 // unistd.h:211:1: + X_SC_MQ_PRIO_MAX = 59 // unistd.h:212:1: + X_SC_NGROUPS_MAX = 4 // unistd.h:156:1: + X_SC_NPROCESSORS_CONF = 502 // unistd.h:282:1: + X_SC_NPROCESSORS_ONLN = 503 // unistd.h:283:1: + X_SC_OPEN_MAX = 5 // unistd.h:157:1: + X_SC_PAGESIZE = 28 // unistd.h:180:1: + X_SC_PAGE_SIZE = 28 // unistd.h:181:1: + X_SC_PHYS_PAGES = 500 // unistd.h:280:1: + X_SC_PRIORITIZED_IO = 60 // unistd.h:213:1: + X_SC_PRIORITY_SCHEDULING = 61 // unistd.h:214:1: + X_SC_RAW_SOCKETS = 62 // unistd.h:215:1: + X_SC_READER_WRITER_LOCKS = 63 // unistd.h:216:1: + X_SC_REALTIME_SIGNALS = 64 // unistd.h:217:1: + X_SC_REGEXP = 65 // unistd.h:218:1: + X_SC_RE_DUP_MAX = 16 // unistd.h:168:1: + X_SC_RTSIG_MAX = 66 // unistd.h:219:1: + X_SC_SAVED_IDS = 7 // unistd.h:159:1: + X_SC_SEMAPHORES = 67 // unistd.h:220:1: + X_SC_SEM_NSEMS_MAX = 31 // unistd.h:184:1: + X_SC_SEM_VALUE_MAX = 32 // unistd.h:185:1: + X_SC_SHARED_MEMORY_OBJECTS = 68 // unistd.h:221:1: + X_SC_SHELL = 69 // unistd.h:222:1: + X_SC_SIGQUEUE_MAX = 70 // unistd.h:223:1: + X_SC_SPAWN = 71 // unistd.h:224:1: + X_SC_SPIN_LOCKS = 72 // unistd.h:225:1: + X_SC_SPORADIC_SERVER = 73 // unistd.h:226:1: + X_SC_SS_REPL_MAX = 74 // unistd.h:227:1: + X_SC_STREAM_MAX = 26 // unistd.h:178:1: + X_SC_SYMLOOP_MAX = 76 // unistd.h:229:1: + X_SC_SYNCHRONIZED_IO = 75 // unistd.h:228:1: + X_SC_THREADS = 91 // unistd.h:244:1: + X_SC_THREAD_ATTR_STACKADDR = 77 // unistd.h:230:1: + X_SC_THREAD_ATTR_STACKSIZE = 78 // unistd.h:231:1: + X_SC_THREAD_CPUTIME = 79 // unistd.h:232:1: + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 80 // unistd.h:233:1: + X_SC_THREAD_KEYS_MAX = 81 // unistd.h:234:1: + X_SC_THREAD_PRIORITY_SCHEDULING = 84 // unistd.h:237:1: + X_SC_THREAD_PRIO_INHERIT = 82 // unistd.h:235:1: + X_SC_THREAD_PRIO_PROTECT = 83 // unistd.h:236:1: + X_SC_THREAD_PROCESS_SHARED = 85 // unistd.h:238:1: + X_SC_THREAD_ROBUST_PRIO_INHERIT = 86 // unistd.h:239:1: + X_SC_THREAD_ROBUST_PRIO_PROTECT = 87 // unistd.h:240:1: + X_SC_THREAD_SAFE_FUNCTIONS = 103 // unistd.h:256:1: + X_SC_THREAD_SPORADIC_SERVER = 88 // unistd.h:241:1: + X_SC_THREAD_STACK_MIN = 89 // unistd.h:242:1: + X_SC_THREAD_THREADS_MAX = 90 // unistd.h:243:1: + X_SC_TIMEOUTS = 92 // unistd.h:245:1: + X_SC_TIMERS = 94 // unistd.h:247:1: + X_SC_TIMER_MAX = 93 // unistd.h:246:1: + X_SC_TRACE = 95 // unistd.h:248:1: + X_SC_TRACE_EVENT_FILTER = 96 // unistd.h:249:1: + X_SC_TRACE_EVENT_NAME_MAX = 97 // unistd.h:250:1: + X_SC_TRACE_INHERIT = 98 // unistd.h:251:1: + X_SC_TRACE_LOG = 99 // unistd.h:252:1: + X_SC_TRACE_NAME_MAX = 104 // unistd.h:257:1: + X_SC_TRACE_SYS_MAX = 105 // unistd.h:258:1: + X_SC_TRACE_USER_EVENT_MAX = 106 // unistd.h:259:1: + X_SC_TTY_NAME_MAX = 107 // unistd.h:260:1: + X_SC_TYPED_MEMORY_OBJECTS = 108 // unistd.h:261:1: + X_SC_TZNAME_MAX = 27 // unistd.h:179:1: + X_SC_V6_ILP32_OFF32 = 109 // unistd.h:262:1: + X_SC_V6_ILP32_OFFBIG = 110 // unistd.h:263:1: + X_SC_V6_LP64_OFF64 = 111 // unistd.h:264:1: + X_SC_V6_LPBIG_OFFBIG = 112 // unistd.h:265:1: + X_SC_V7_ILP32_OFF32 = 113 // unistd.h:266:1: + X_SC_V7_ILP32_OFFBIG = 114 // unistd.h:267:1: + X_SC_V7_LP64_OFF64 = 115 // unistd.h:268:1: + X_SC_V7_LPBIG_OFFBIG = 116 // unistd.h:269:1: + X_SC_VERSION = 8 // unistd.h:160:1: + X_SC_XOPEN_CRYPT = 117 // unistd.h:270:1: + X_SC_XOPEN_ENH_I18N = 118 // unistd.h:271:1: + X_SC_XOPEN_LEGACY = 119 // unistd.h:272:1: + X_SC_XOPEN_REALTIME = 120 // unistd.h:273:1: + X_SC_XOPEN_REALTIME_THREADS = 121 // unistd.h:274:1: + X_SC_XOPEN_SHM = 30 // unistd.h:183:1: + X_SC_XOPEN_STREAMS = 122 // unistd.h:275:1: + X_SC_XOPEN_UNIX = 123 // unistd.h:276:1: + X_SC_XOPEN_UUCP = 124 // unistd.h:277:1: + X_SC_XOPEN_VERSION = 125 // unistd.h:278:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_UNISTD_H_ = 0 // unistd.h:36:1: + X_XOPEN_CRYPT = 1 // unistd.h:137:1: + X_XOPEN_ENH_I18N = -1 // unistd.h:138:1: + X_XOPEN_LEGACY = -1 // unistd.h:139:1: + X_XOPEN_REALTIME = -1 // unistd.h:140:1: + X_XOPEN_REALTIME_THREADS = -1 // unistd.h:141:1: + X_XOPEN_SHM = 1 // unistd.h:142:1: + X_XOPEN_STREAMS = -1 // unistd.h:143:1: + X_XOPEN_UNIX = -1 // unistd.h:145:1: + X_XOPEN_UUCP = -1 // unistd.h:144:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: unistd.h,v 1.106 2018/07/13 09:25:22 beck Exp $ +// $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ + +// - +// Copyright (c) 1991 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 5.13 (Berkeley) 6/17/91 + +// $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ + +// Written by Todd C. Miller, September 9, 2016 +// Public domain. + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: unistd.h,v 1.31 2015/07/20 00:56:10 guenther Exp $ +// $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd 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 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// Define the POSIX.1 version we target for compliance. + +// access function + +// whence values for lseek(2) + +// old BSD whence values for lseek(2); renamed by POSIX 1003.1 + +// the parameters argument passed to the __tfork() syscall +type X__tfork = struct { + Ftf_tcb uintptr + Ftf_tid uintptr + Ftf_stack uintptr +} /* unistd.h:66:1 */ + +// the parameters argument for the kbind() syscall +type X__kbind = struct { + Fkb_addr uintptr + Fkb_size Size_t +} /* unistd.h:73:1 */ + +// the pathconf(2) variable values are part of the ABI + +// configurable pathname variables + +// POSIX options and option groups we unconditionally do or don't +// implement. Please keep this list in alphabetical order. +// +// Anything which is defined as zero below **must** have an +// implementation for the corresponding sysconf() which is able to +// determine conclusively whether or not the feature is supported. +// Anything which is defined as other than -1 below **must** have +// complete headers, types, and function declarations as specified by +// the POSIX standard; however, if the relevant sysconf() function +// returns -1, the functions may be stubbed out. + +// Define the POSIX.2 version we target for compliance. + +// the sysconf(3) variable values are part of the ABI + +// configurable system variables + +// configurable system strings + +type Intptr_t = X__intptr_t /* unistd.h:320:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/unistd_windows_386.go b/vendor/modernc.org/libc/unistd/unistd_windows_386.go index 83efe51b..db470a22 100644 --- a/vendor/modernc.org/libc/unistd/unistd_windows_386.go +++ b/vendor/modernc.org/libc/unistd/unistd_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo unistd\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o unistd\unistd_windows_386.go -pkgname unistd', DO NOT EDIT. +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_windows_386.go -pkgname unistd', DO NOT EDIT. package unistd @@ -15,164 +15,163 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - FTRUNCATE_DEFINED = 0 - F_OK = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - OLD_P_OVERLAY = 2 - P_DETACH = 4 - P_NOWAIT = 1 - P_NOWAITO = 3 - P_OVERLAY = 2 - P_WAIT = 0 - R_OK = 4 - SEEK_CUR = 1 - SEEK_END = 2 - SEEK_SET = 0 - STDERR_FILENO = 2 - STDIN_FILENO = 0 - STDOUT_FILENO = 1 - UNALIGNED = 0 - USE___UUIDOF = 0 - WAIT_CHILD = 0 - WAIT_GRANDCHILD = 1 - WIN32 = 1 - WINNT = 1 - WIN_PTHREADS_UNISTD_H = 0 - W_OK = 2 - X_OK = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_A_ARCH = 0x20 - X_A_HIDDEN = 0x02 - X_A_NORMAL = 0x00 - X_A_RDONLY = 0x01 - X_A_SUBDIR = 0x10 - X_A_SYSTEM = 0x04 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_DIRECTORY_DEFINED = 0 - X_CRT_GETPID_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_MEMORY_DEFINED = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_SWAB_DEFINED = 0 - X_CRT_SYSTEM_DEFINED = 0 - X_CRT_TERMINATE_DEFINED = 0 - X_CRT_WSYSTEM_DEFINED = 0 - X_DEV_T_DEFINED = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_FILE_OFFSET_BITS_SET_FTRUNCATE = 0 - X_FILE_OFFSET_BITS_SET_LSEEK = 0 - X_FILE_OFFSET_BITS_SET_OFFT = 0 - X_FINDDATA_T_DEFINED = 0 - X_FSIZE_T_DEFINED = 0 - X_INC_CORECRT_STARTUP = 0 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_PROCESS = 0 - X_INC_STRING = 0 - X_INC_STRING_S = 0 - X_INC_TYPES = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INO_T_DEFINED = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_IO_H_ = 0 - X_MODE_T_ = 0 - X_MT = 0 - X_M_IX86 = 600 - X_NLSCMPERROR = 2147483647 - X_NLSCMP_DEFINED = 0 - X_OFF64_T_DEFINED = 0 - X_OFF_T_ = 0 - X_OFF_T_DEFINED = 0 - X_OLD_P_OVERLAY = 2 - X_PGLOBAL = 0 - X_PID_T_ = 0 - X_POSIX_BARRIERS = 200112 - X_POSIX_CLOCK_SELECTION = 200112 - X_POSIX_READER_WRITER_LOCKS = 200112 - X_POSIX_SEMAPHORES = 200112 - X_POSIX_SPIN_LOCKS = 200112 - X_POSIX_THREADS = 200112 - X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 - X_POSIX_TIMEOUTS = 200112 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_P_DETACH = 4 - X_P_NOWAIT = 1 - X_P_NOWAITO = 3 - X_P_OVERLAY = 2 - X_P_WAIT = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIGSET_T_ = 0 - X_SIZE_T_DEFINED = 0 - X_SPAWNV_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIMESPEC_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_UNISTD_H = 0 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WAIT_CHILD = 0 - X_WAIT_GRANDCHILD = 1 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WConst_return = 0 - X_WEXEC_DEFINED = 0 - X_WFINDDATA_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_WIO_DEFINED = 0 - X_WSPAWN_DEFINED = 0 - X_WSTRING_DEFINED = 0 - X_WSTRING_S_DEFINED = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + FTRUNCATE_DEFINED = 0 // unistd.h:56:1: + F_OK = 0 // io.h:182:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + OLD_P_OVERLAY = 2 // process.h:149:1: + P_DETACH = 4 // process.h:151:1: + P_NOWAIT = 1 // process.h:147:1: + P_NOWAITO = 3 // process.h:150:1: + P_OVERLAY = 2 // process.h:148:1: + P_WAIT = 0 // process.h:146:1: + R_OK = 4 // io.h:185:1: + SEEK_CUR = 1 // unistd.h:17:1: + SEEK_END = 2 // unistd.h:18:1: + SEEK_SET = 0 // unistd.h:16:1: + STDERR_FILENO = 2 // unistd.h:25:1: + STDIN_FILENO = 0 // unistd.h:23:1: + STDOUT_FILENO = 1 // unistd.h:24:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WAIT_CHILD = 0 // process.h:152:1: + WAIT_GRANDCHILD = 1 // process.h:153:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + WIN_PTHREADS_UNISTD_H = 0 // pthread_unistd.h:24:1: + W_OK = 2 // io.h:184:1: + X_OK = 1 // io.h:183:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_A_ARCH = 0x20 // io.h:156:1: + X_A_HIDDEN = 0x02 // io.h:153:1: + X_A_NORMAL = 0x00 // io.h:151:1: + X_A_RDONLY = 0x01 // io.h:152:1: + X_A_SUBDIR = 0x10 // io.h:155:1: + X_A_SYSTEM = 0x04 // io.h:154:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1: + X_CRT_GETPID_DEFINED = 0 // process.h:157:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_MEMORY_DEFINED = 0 // string.h:44:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_SWAB_DEFINED = 0 // unistd.h:92:1: + X_CRT_SYSTEM_DEFINED = 0 // process.h:91:1: + X_CRT_TERMINATE_DEFINED = 0 // process.h:41:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WSYSTEM_DEFINED = 0 // process.h:120:1: + X_DEV_T_DEFINED = 0 // types.h:50:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FILE_OFFSET_BITS_SET_FTRUNCATE = 0 // unistd.h:85:1: + X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1: + X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1: + X_FINDDATA_T_DEFINED = 0 // io.h:89:1: + X_FSIZE_T_DEFINED = 0 // io.h:30:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CORECRT_STARTUP = 0 // corecrt_startup.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_PROCESS = 0 // process.h:7:1: + X_INC_STRING = 0 // string.h:7:1: + X_INC_STRING_S = 0 // string_s.h:7:1: + X_INC_TYPES = 0 // types.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INO_T_DEFINED = 0 // types.h:42:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_IO_H_ = 0 // io.h:7:1: + X_MODE_T_ = 0 // types.h:73:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_NLSCMPERROR = 2147483647 // string.h:26:1: + X_NLSCMP_DEFINED = 0 // string.h:25:1: + X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1: + X_OFF_T_ = 0 // _mingw_off_t.h:4:1: + X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1: + X_OLD_P_OVERLAY = 2 // process.h:23:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PID_T_ = 0 // types.h:58:1: + X_POSIX_BARRIERS = 200112 // pthread_unistd.h:130:1: + X_POSIX_CLOCK_SELECTION = 200112 // pthread_unistd.h:173:1: + X_POSIX_READER_WRITER_LOCKS = 200112 // pthread_unistd.h:101:1: + X_POSIX_SEMAPHORES = 200112 // pthread_unistd.h:190:1: + X_POSIX_SPIN_LOCKS = 200112 // pthread_unistd.h:115:1: + X_POSIX_THREADS = 200112 // pthread_unistd.h:81:1: + X_POSIX_TIMEOUTS = 200112 // pthread_unistd.h:145:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_P_DETACH = 4 // process.h:25:1: + X_P_NOWAIT = 1 // process.h:22:1: + X_P_NOWAITO = 3 // process.h:24:1: + X_P_OVERLAY = 2 // process.h:26:1: + X_P_WAIT = 0 // process.h:21:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIGSET_T_ = 0 // types.h:101:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPAWNV_DEFINED = 0 // process.h:83:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIMESPEC_DEFINED = 0 // types.h:88:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_UNISTD_H = 0 // unistd.h:7:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WAIT_CHILD = 0 // process.h:28:1: + X_WAIT_GRANDCHILD = 1 // process.h:29:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WConst_return = 0 // string.h:41:1: + X_WEXEC_DEFINED = 0 // process.h:96:1: + X_WFINDDATA_T_DEFINED = 0 // io.h:148:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_WIO_DEFINED = 0 // io.h:295:1: + X_WSPAWN_DEFINED = 0 // process.h:108:1: + X_WSTRING_DEFINED = 0 // string.h:129:1: + X_WSTRING_S_DEFINED = 0 // string_s.h:48:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -211,6 +210,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -231,6 +235,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -271,26 +281,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -316,29 +328,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_fsize_t = uint32 /* io.h:29:25 */ type X_finddata32_t = struct { @@ -487,6 +499,11 @@ type Itimerspec = struct { type X_sigset_t = uint32 /* types.h:106:23 */ +type X_beginthread_proc_type = uintptr /* process.h:32:16 */ +type X_beginthreadex_proc_type = uintptr /* process.h:33:20 */ + +type X_tls_callback_type = uintptr /* process.h:61:16 */ + // // Copyright (c) 2011-2016 mingw-w64 project // @@ -604,23 +621,6 @@ type X_sigset_t = uint32 /* types.h:106:23 */ // // are present. -// _SC_THREAD_SAFE_FUNCTIONS -// Affected functions are -// -// readdir_r(), -// getgrgid_r(), -// getgrnam_r(), -// getpwnam_r(), -// getpwuid_r(), -// flockfile(), -// ftrylockfile(), -// funlockfile(), -// getc_unlocked(), -// getchar_unlocked(), -// putc_unlocked(), -// putchar_unlocked(), -// strerror_r(), - // _SC_TIMEOUTS // The functions // diff --git a/vendor/modernc.org/libc/utime/capi_darwin_amd64.go b/vendor/modernc.org/libc/utime/capi_darwin_amd64.go index 0c774516..5958f5d9 100644 --- a/vendor/modernc.org/libc/utime/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/utime/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o utime/utime_darwin_amd64.go -pkgname utime', DO NOT EDIT. +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_darwin_amd64.go -pkgname utime', DO NOT EDIT. package utime diff --git a/vendor/modernc.org/libc/utime/capi_freebsd_arm.go b/vendor/modernc.org/libc/utime/capi_freebsd_arm.go new file mode 100644 index 00000000..eb51a444 --- /dev/null +++ b/vendor/modernc.org/libc/utime/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_freebsd_arm.go -pkgname utime', DO NOT EDIT. + +package utime + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/utime/capi_freebsd_arm64.go b/vendor/modernc.org/libc/utime/capi_freebsd_arm64.go new file mode 100644 index 00000000..44faae56 --- /dev/null +++ b/vendor/modernc.org/libc/utime/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_freebsd_amd64.go -pkgname utime', DO NOT EDIT. + +package utime + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/utime/capi_netbsd_arm.go b/vendor/modernc.org/libc/utime/capi_netbsd_arm.go new file mode 100644 index 00000000..8e41174f --- /dev/null +++ b/vendor/modernc.org/libc/utime/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_netbsd_arm.go -pkgname utime', DO NOT EDIT. + +package utime + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/utime/capi_openbsd_386.go b/vendor/modernc.org/libc/utime/capi_openbsd_386.go new file mode 100644 index 00000000..a22ba57b --- /dev/null +++ b/vendor/modernc.org/libc/utime/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_openbsd_386.go -pkgname utime', DO NOT EDIT. + +package utime + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/utime/capi_openbsd_arm64.go b/vendor/modernc.org/libc/utime/capi_openbsd_arm64.go new file mode 100644 index 00000000..6b17f576 --- /dev/null +++ b/vendor/modernc.org/libc/utime/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_openbsd_arm64.go -pkgname utime', DO NOT EDIT. + +package utime + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/utime/capi_windows_386.go b/vendor/modernc.org/libc/utime/capi_windows_386.go index 82bb0f63..cd9c7c47 100644 --- a/vendor/modernc.org/libc/utime/capi_windows_386.go +++ b/vendor/modernc.org/libc/utime/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo utime\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o utime\utime_windows_386.go -pkgname utime', DO NOT EDIT. +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_windows_386.go -pkgname utime', DO NOT EDIT. package utime diff --git a/vendor/modernc.org/libc/utime/utime_darwin_amd64.go b/vendor/modernc.org/libc/utime/utime_darwin_amd64.go index 7c48b350..b2f0ad2a 100644 --- a/vendor/modernc.org/libc/utime/utime_darwin_amd64.go +++ b/vendor/modernc.org/libc/utime/utime_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o utime/utime_darwin_amd64.go -pkgname utime', DO NOT EDIT. +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_darwin_amd64.go -pkgname utime', DO NOT EDIT. package utime @@ -15,34 +15,34 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE_TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_INT16_T = 0 - X_INT32_T = 0 - X_INT64_T = 0 - X_INT8_T = 0 - X_INTPTR_T = 0 - X_LP64 = 1 - X_MACHTYPES_H_ = 0 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_TIME_T = 0 - X_UINTPTR_T = 0 - X_UTIME_H_ = 0 - X_U_INT16_T = 0 - X_U_INT32_T = 0 - X_U_INT64_T = 0 - X_U_INT8_T = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_INT16_T = 0 // _int16_t.h:29:1: + X_INT32_T = 0 // _int32_t.h:29:1: + X_INT64_T = 0 // _int64_t.h:29:1: + X_INT8_T = 0 // _int8_t.h:29:1: + X_INTPTR_T = 0 // _intptr_t.h:29:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHTYPES_H_ = 0 // types.h:67:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_TIME_T = 0 // _time_t.h:29:1: + X_UINTPTR_T = 0 // _uintptr_t.h:29:1: + X_UTIME_H_ = 0 // utime.h:59:1: + X_U_INT16_T = 0 // _u_int16_t.h:29:1: + X_U_INT32_T = 0 // _u_int32_t.h:29:1: + X_U_INT64_T = 0 // _u_int64_t.h:29:1: + X_U_INT8_T = 0 // _u_int8_t.h:29:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/utime/utime_freebsd_386.go b/vendor/modernc.org/libc/utime/utime_freebsd_386.go index 7a1411a2..69d3cc5e 100644 --- a/vendor/modernc.org/libc/utime/utime_freebsd_386.go +++ b/vendor/modernc.org/libc/utime/utime_freebsd_386.go @@ -539,8 +539,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/utime/utime_freebsd_amd64.go b/vendor/modernc.org/libc/utime/utime_freebsd_amd64.go index 2f4b6ca0..72f0e84b 100644 --- a/vendor/modernc.org/libc/utime/utime_freebsd_amd64.go +++ b/vendor/modernc.org/libc/utime/utime_freebsd_amd64.go @@ -19,14 +19,14 @@ const ( X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS__TYPES_H_ = 0 // _types.h:32:1: X_TIME_T_DECLARED = 0 // utime.h:43:1: X_UTIME_H_ = 0 // utime.h:36:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -296,12 +296,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -544,8 +547,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was diff --git a/vendor/modernc.org/libc/utime/utime_freebsd_arm.go b/vendor/modernc.org/libc/utime/utime_freebsd_arm.go new file mode 100644 index 00000000..85ce3e65 --- /dev/null +++ b/vendor/modernc.org/libc/utime/utime_freebsd_arm.go @@ -0,0 +1,547 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_freebsd_arm.go -pkgname utime', DO NOT EDIT. + +package utime + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIME_T_DECLARED = 0 // utime.h:43:1: + X_UTIME_H_ = 0 // utime.h:36:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)utime.h 8.1 (Berkeley) 6/2/93 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Time_t = X__time_t /* utime.h:42:18 */ + +type Utimbuf = struct { + Factime Time_t + Fmodtime Time_t +} /* utime.h:46:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/utime/utime_freebsd_arm64.go b/vendor/modernc.org/libc/utime/utime_freebsd_arm64.go new file mode 100644 index 00000000..72f0e84b --- /dev/null +++ b/vendor/modernc.org/libc/utime/utime_freebsd_arm64.go @@ -0,0 +1,606 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_freebsd_amd64.go -pkgname utime', DO NOT EDIT. + +package utime + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIME_T_DECLARED = 0 // utime.h:43:1: + X_UTIME_H_ = 0 // utime.h:36:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)utime.h 8.1 (Berkeley) 6/2/93 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers + +// When the following macro is defined, the system uses 64-bit inode numbers. +// Programs can use this to avoid including <sys/param.h>, with its associated +// namespace pollution. + +type Time_t = X__time_t /* utime.h:42:18 */ + +type Utimbuf = struct { + Factime Time_t + Fmodtime Time_t +} /* utime.h:46:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/utime/utime_linux_386.go b/vendor/modernc.org/libc/utime/utime_linux_386.go index 3eb9961f..31008aea 100644 --- a/vendor/modernc.org/libc/utime/utime_linux_386.go +++ b/vendor/modernc.org/libc/utime/utime_linux_386.go @@ -709,7 +709,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -720,13 +721,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // bits/types.h -- definitions of __*_t types underlying *_t types. diff --git a/vendor/modernc.org/libc/utime/utime_linux_amd64.go b/vendor/modernc.org/libc/utime/utime_linux_amd64.go index a9995de5..9d673aca 100644 --- a/vendor/modernc.org/libc/utime/utime_linux_amd64.go +++ b/vendor/modernc.org/libc/utime/utime_linux_amd64.go @@ -728,7 +728,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -739,8 +740,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/utime/utime_linux_arm.go b/vendor/modernc.org/libc/utime/utime_linux_arm.go index 67a93eb5..9c6b94f2 100644 --- a/vendor/modernc.org/libc/utime/utime_linux_arm.go +++ b/vendor/modernc.org/libc/utime/utime_linux_arm.go @@ -768,7 +768,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -779,13 +780,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // bits/types.h -- definitions of __*_t types underlying *_t types. diff --git a/vendor/modernc.org/libc/utime/utime_linux_arm64.go b/vendor/modernc.org/libc/utime/utime_linux_arm64.go index 6ac91f2b..b9c3935d 100644 --- a/vendor/modernc.org/libc/utime/utime_linux_arm64.go +++ b/vendor/modernc.org/libc/utime/utime_linux_arm64.go @@ -796,7 +796,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -807,8 +808,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/utime/utime_linux_ppc64le.go b/vendor/modernc.org/libc/utime/utime_linux_ppc64le.go index f5551caa..e2b9eaeb 100644 --- a/vendor/modernc.org/libc/utime/utime_linux_ppc64le.go +++ b/vendor/modernc.org/libc/utime/utime_linux_ppc64le.go @@ -738,7 +738,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -749,8 +750,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/utime/utime_linux_riscv64.go b/vendor/modernc.org/libc/utime/utime_linux_riscv64.go index 56149f5c..8a53f8db 100644 --- a/vendor/modernc.org/libc/utime/utime_linux_riscv64.go +++ b/vendor/modernc.org/libc/utime/utime_linux_riscv64.go @@ -900,7 +900,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -911,8 +912,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/utime/utime_linux_s390x.go b/vendor/modernc.org/libc/utime/utime_linux_s390x.go index 24dca586..8a9cee0d 100644 --- a/vendor/modernc.org/libc/utime/utime_linux_s390x.go +++ b/vendor/modernc.org/libc/utime/utime_linux_s390x.go @@ -727,7 +727,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -738,8 +739,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too diff --git a/vendor/modernc.org/libc/utime/utime_netbsd_arm.go b/vendor/modernc.org/libc/utime/utime_netbsd_arm.go new file mode 100644 index 00000000..410abbf7 --- /dev/null +++ b/vendor/modernc.org/libc/utime/utime_netbsd_arm.go @@ -0,0 +1,139 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_netbsd_arm.go -pkgname utime', DO NOT EDIT. + +package utime + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_UTIME_H_ = 0 // utime.h:35:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +type Time_t = X__int64_t /* utime.h:40:22 */ + +type Utimbuf = struct { + Factime Time_t + Fmodtime Time_t +} /* utime.h:44:1 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/utime/utime_openbsd_386.go b/vendor/modernc.org/libc/utime/utime_openbsd_386.go new file mode 100644 index 00000000..72545168 --- /dev/null +++ b/vendor/modernc.org/libc/utime/utime_openbsd_386.go @@ -0,0 +1,415 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_openbsd_386.go -pkgname utime', DO NOT EDIT. + +package utime + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIME_T_DEFINED_ = 0 // utime.h:42:1: + X_UTIME_H_ = 0 // utime.h:36:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: utime.h,v 1.7 2013/04/02 05:16:14 guenther Exp $ +// $NetBSD: utime.h,v 1.3 1994/10/26 00:56:39 cgd 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. +// +// @(#)utime.h 5.4 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Time_t = X__time_t /* utime.h:43:18 */ + +type Utimbuf = struct { + Factime Time_t + Fmodtime Time_t +} /* utime.h:46:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go b/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go index 51bb9696..5cf95baa 100644 --- a/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go +++ b/vendor/modernc.org/libc/utime/utime_openbsd_amd64.go @@ -26,7 +26,7 @@ const ( X_SYS__TYPES_H_ = 0 // _types.h:35:1: X_TIME_T_DEFINED_ = 0 // utime.h:42:1: X_UTIME_H_ = 0 // utime.h:36:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -242,7 +242,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Default values. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -402,18 +402,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ type Time_t = X__time_t /* utime.h:43:18 */ diff --git a/vendor/modernc.org/libc/utime/utime_openbsd_arm64.go b/vendor/modernc.org/libc/utime/utime_openbsd_arm64.go new file mode 100644 index 00000000..202dd0e2 --- /dev/null +++ b/vendor/modernc.org/libc/utime/utime_openbsd_arm64.go @@ -0,0 +1,422 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_openbsd_arm64.go -pkgname utime', DO NOT EDIT. + +package utime + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIME_T_DEFINED_ = 0 // utime.h:42:1: + X_UTIME_H_ = 0 // utime.h:36:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: utime.h,v 1.7 2013/04/02 05:16:14 guenther Exp $ +// $NetBSD: utime.h,v 1.3 1994/10/26 00:56:39 cgd 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. +// +// @(#)utime.h 5.4 (Berkeley) 4/3/91 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +type Time_t = X__time_t /* utime.h:43:18 */ + +type Utimbuf = struct { + Factime Time_t + Fmodtime Time_t +} /* utime.h:46:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/utime/utime_windows_386.go b/vendor/modernc.org/libc/utime/utime_windows_386.go index 7716e26b..b0326fe7 100644 --- a/vendor/modernc.org/libc/utime/utime_windows_386.go +++ b/vendor/modernc.org/libc/utime/utime_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo utime\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o utime\utime_windows_386.go -pkgname utime', DO NOT EDIT. +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_windows_386.go -pkgname utime', DO NOT EDIT. package utime @@ -15,86 +15,86 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_CONST_RETURN = 0 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_UTIME = 0 - X_INC_VADEFS = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_USE_32BIT_TIME_T = 0 - X_UTIMBUF_DEFINED = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_UTIME = 0 // utime.h:7:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_UTIMBUF_DEFINED = 0 // utime.h:56:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -132,6 +132,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -152,6 +157,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -192,26 +203,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -237,29 +250,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type X_utimbuf = struct { Factime Time_t diff --git a/vendor/modernc.org/libc/uuid/capi_freebsd_arm.go b/vendor/modernc.org/libc/uuid/capi_freebsd_arm.go new file mode 100644 index 00000000..4e133436 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/capi_freebsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_freebsd_arm.go -pkgname uuid', DO NOT EDIT. + +package uuid + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/uuid/capi_freebsd_arm64.go b/vendor/modernc.org/libc/uuid/capi_freebsd_arm64.go new file mode 100644 index 00000000..f29824f5 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/capi_freebsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_freebsd_amd64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/uuid/capi_netbsd_arm.go b/vendor/modernc.org/libc/uuid/capi_netbsd_arm.go new file mode 100644 index 00000000..34be9254 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_netbsd_arm.go -pkgname uuid', DO NOT EDIT. + +package uuid + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/uuid/capi_openbsd_386.go b/vendor/modernc.org/libc/uuid/capi_openbsd_386.go new file mode 100644 index 00000000..b97fe52d --- /dev/null +++ b/vendor/modernc.org/libc/uuid/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_openbsd_386.go -pkgname uuid', DO NOT EDIT. + +package uuid + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/uuid/capi_openbsd_arm64.go b/vendor/modernc.org/libc/uuid/capi_openbsd_arm64.go new file mode 100644 index 00000000..71c46a73 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_openbsd_arm64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go b/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go index d4db5114..9bfd13f2 100644 --- a/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o uuid/uuid/uuid_darwin_amd64.go -pkgname uuid', DO NOT EDIT. +// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid/uuid_darwin_amd64.go -pkgname uuid', DO NOT EDIT. package uuid diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go index ac5acdd9..86525482 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o uuid/uuid/uuid_darwin_amd64.go -pkgname uuid', DO NOT EDIT. +// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid/uuid_darwin_amd64.go -pkgname uuid', DO NOT EDIT. package uuid @@ -15,22 +15,22 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CDEFS_H_ = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_UUID_STRING_T = 0 - X_UUID_T = 0 - X_UUID_UUID_H = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_UUID_STRING_T = 0 // uuid.h:42:1: + X_UUID_T = 0 // _uuid_t.h:29:1: + X_UUID_UUID_H = 0 // uuid.h:36:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_386.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_386.go index 056cba55..10ab31c0 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_386.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_386.go @@ -815,7 +815,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -826,13 +827,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1138,7 +1141,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1185,7 +1189,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1499,18 +1504,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1534,7 +1542,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1546,7 +1555,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]int8 @@ -1632,14 +1642,16 @@ type Pthread_barrierattr_t = struct { // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_amd64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_amd64.go index 3d9cb2f6..dfd5ff6a 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_amd64.go @@ -834,7 +834,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -845,8 +846,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1158,7 +1160,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1205,7 +1208,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1517,18 +1521,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1552,7 +1559,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1564,7 +1572,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 @@ -1650,14 +1659,16 @@ type Pthread_barrierattr_t = struct { // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm.go index 8a7b6515..52914ee2 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm.go @@ -873,7 +873,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -884,13 +885,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ type U_char = X__u_char /* types.h:33:18 */ @@ -1197,7 +1200,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1244,7 +1248,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1609,18 +1614,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint32 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1644,7 +1652,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1656,7 +1665,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint32 F__size [20]uint8 @@ -1742,14 +1752,16 @@ type Pthread_barrierattr_t = struct { // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm64.go index e3d618b6..e91c0e99 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm64.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_arm64.go @@ -902,7 +902,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -913,8 +914,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1225,7 +1227,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1272,7 +1275,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1617,18 +1621,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [8]uint8 @@ -1655,7 +1662,8 @@ type Pthread_mutex_t = struct { type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1667,7 +1675,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1753,14 +1762,16 @@ type Pthread_barrierattr_t = struct { // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_ppc64le.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_ppc64le.go index a3eccf72..f34fea39 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_ppc64le.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_ppc64le.go @@ -844,7 +844,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -855,8 +856,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1167,7 +1169,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1214,7 +1217,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1526,18 +1530,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1561,7 +1568,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1573,7 +1581,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1659,14 +1668,16 @@ type Pthread_barrierattr_t = struct { // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go index 84c78a0e..f34306ec 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_riscv64.go @@ -834,7 +834,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -845,8 +846,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1158,7 +1160,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1205,7 +1208,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1517,18 +1521,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]int8 @@ -1552,7 +1559,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1564,7 +1572,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]int8 @@ -1650,14 +1659,16 @@ type Pthread_barrierattr_t = struct { // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_s390x.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_s390x.go index 0661806f..68b64c1e 100644 --- a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_s390x.go +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_s390x.go @@ -833,7 +833,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -844,8 +845,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1156,7 +1158,8 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ // Never include this file directly; use <sys/types.h> instead. // A time value that is accurate to the nearest -// microsecond but also has a range of years. +// +// microsecond but also has a range of years. type Timeval = struct { Ftv_sec X__time_t Ftv_usec X__suseconds_t @@ -1203,7 +1206,8 @@ type Timeval = struct { // <http://www.gnu.org/licenses/>. // POSIX.1b structure for a time value. This is like a `struct timeval' but -// has nanoseconds instead of microseconds. +// +// has nanoseconds instead of microseconds. type Timespec = struct { Ftv_sec X__time_t Ftv_nsec X__syscall_slong_t @@ -1514,18 +1518,21 @@ type X__pthread_cond_s = struct { } /* thread-shared-types.h:92:1 */ // Thread identifiers. The structure of the attribute type is not -// exposed on purpose. +// +// exposed on purpose. type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ // Data structures for mutex handling. The structure of the attribute -// type is not exposed on purpose. +// +// type is not exposed on purpose. type Pthread_mutexattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 } /* pthreadtypes.h:36:3 */ // Data structure for condition variable handling. The structure of -// the attribute type is not exposed on purpose. +// +// the attribute type is not exposed on purpose. type Pthread_condattr_t = struct { F__ccgo_pad1 [0]uint32 F__size [4]uint8 @@ -1549,7 +1556,8 @@ type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ // Data structure for reader-writer lock variable handling. The -// structure of the attribute type is deliberately not exposed. +// +// structure of the attribute type is deliberately not exposed. type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { @@ -1561,7 +1569,8 @@ type Pthread_rwlockattr_t = struct { type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ // POSIX barriers data type. The structure of the type is -// deliberately not exposed. +// +// deliberately not exposed. type Pthread_barrier_t = struct { F__ccgo_pad1 [0]uint64 F__size [32]uint8 @@ -1647,14 +1656,16 @@ type Pthread_barrierattr_t = struct { // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> // Structure crudely representing a timezone. -// This is obsolete and should never be used. +// +// This is obsolete and should never be used. type Timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* time.h:52:1 */ // Type of the second argument to `getitimer' and -// the second and third arguments `setitimer'. +// +// the second and third arguments `setitimer'. type Itimerval = struct { Fit_interval struct { Ftv_sec X__time_t diff --git a/vendor/modernc.org/libc/uuid/uuid_freebsd_386.go b/vendor/modernc.org/libc/uuid/uuid_freebsd_386.go index 39377256..263448b6 100644 --- a/vendor/modernc.org/libc/uuid/uuid_freebsd_386.go +++ b/vendor/modernc.org/libc/uuid/uuid_freebsd_386.go @@ -690,8 +690,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -1511,8 +1511,9 @@ type Fd_set = Fd_set1 /* select.h:75:3 */ // Length of a node address (an IEEE 802 address). // See also: -// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt -// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm // // A DCE 1.1 compatible source representation of UUIDs. type Uuid = struct { diff --git a/vendor/modernc.org/libc/uuid/uuid_freebsd_amd64.go b/vendor/modernc.org/libc/uuid/uuid_freebsd_amd64.go index 8713d925..d59eb32f 100644 --- a/vendor/modernc.org/libc/uuid/uuid_freebsd_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid_freebsd_amd64.go @@ -15,16 +15,16 @@ var _ atomic.Value var _ unsafe.Pointer const ( - BIG_ENDIAN = 4321 // endian.h:63:1: - BYTE_ORDER = 1234 // endian.h:65:1: + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: FD_SETSIZE = 1024 // select.h:61:1: - LITTLE_ENDIAN = 1234 // endian.h:62:1: - PDP_ENDIAN = 3412 // endian.h:64:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: X_ACCMODE_T_DECLARED = 0 // types.h:166:1: - X_BIG_ENDIAN = 4321 // endian.h:52:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: X_BLKCNT_T_DECLARED = 0 // types.h:90:1: X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: - X_BYTE_ORDER = 1234 // endian.h:55:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: X_CLOCKID_T_DECLARED = 0 // types.h:100:1: @@ -46,7 +46,7 @@ const ( X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: X_IN_PORT_T_DECLARED = 0 // types.h:136:1: X_KEY_T_DECLARED = 0 // types.h:151:1: - X_LITTLE_ENDIAN = 1234 // endian.h:51:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: X_LP64 = 1 // <predefined>:1:1: X_LSEEK_DECLARED = 0 // types.h:421:1: X_LWPID_T_DECLARED = 0 // types.h:156:1: @@ -57,16 +57,16 @@ const ( X_MODE_T_DECLARED = 0 // types.h:161:1: X_MQD_T_DECLARED = 0 // types.h:227:1: X_NLINK_T_DECLARED = 0 // types.h:171:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_OFF64_T_DECLARED = 0 // types.h:181:1: X_OFF_T_DECLARED = 0 // types.h:176:1: - X_PDP_ENDIAN = 3412 // endian.h:53:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: X_PID_T_DECLARED = 0 // types.h:186:1: X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: - X_QUAD_HIGHWORD = 1 // endian.h:44:1: - X_QUAD_LOWWORD = 0 // endian.h:45:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: X_RLIM_T_DECLARED = 0 // types.h:193:1: X_SELECT_DECLARED = 0 // select.h:103:1: X_SIGSET_T_DECLARED = 0 // select.h:50:1: @@ -80,6 +80,7 @@ const ( X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: X_SYS_TYPES_H_ = 0 // types.h:41:1: X_SYS_UUID_H_ = 0 // uuid.h:32:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: @@ -99,7 +100,7 @@ const ( X_USECONDS_T_DECLARED = 0 // types.h:239:1: X_UUID_H_ = 0 // uuid.h:33:1: X_UUID_NODE_LEN = 6 // uuid.h:37:1: - Unix = 1 // <predefined>:337:1: + Unix = 1 // <predefined>:340:1: Uuid_s_bad_version = 1 // uuid.h:46:1: Uuid_s_invalid_string_uuid = 2 // uuid.h:47:1: Uuid_s_no_memory = 3 // uuid.h:48:1: @@ -408,12 +409,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // Machine type dependent parameters. // - // This file is in the public domain. @@ -453,42 +457,6 @@ type X__float128 = float64 /* <builtin>:47:21 */ // $FreeBSD$ // - -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright (c) 1991, 1993 -// The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. Neither the name of the University nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -// SUCH DAMAGE. -// -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 -// $FreeBSD$ - -// - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> @@ -730,8 +698,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -1514,11 +1482,13 @@ type Fd_set = Fd_set1 /* select.h:75:3 */ // - // SPDX-License-Identifier: BSD-3-Clause // -// Copyright (c) 1991, 1993 +// Copyright (c) 1982, 1986, 1991, 1993, 1994 // The Regents of the University of California. All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Berkeley Software Design, Inc. +// (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 @@ -1544,14 +1514,15 @@ type Fd_set = Fd_set1 /* select.h:75:3 */ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. // -// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// @(#)types.h 8.6 (Berkeley) 2/19/95 // $FreeBSD$ // Length of a node address (an IEEE 802 address). // See also: -// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt -// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm // // A DCE 1.1 compatible source representation of UUIDs. type Uuid = struct { diff --git a/vendor/modernc.org/libc/uuid/uuid_freebsd_arm.go b/vendor/modernc.org/libc/uuid/uuid_freebsd_arm.go new file mode 100644 index 00000000..94f27bbe --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid_freebsd_arm.go @@ -0,0 +1,1480 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_freebsd_arm.go -pkgname uuid', DO NOT EDIT. + +package uuid + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UUID_H_ = 0 // uuid.h:32:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_UUID_H_ = 0 // uuid.h:33:1: + X_UUID_NODE_LEN = 6 // uuid.h:37:1: + Unix = 1 // <predefined>:367:1: + Uuid_s_bad_version = 1 // uuid.h:46:1: + Uuid_s_invalid_string_uuid = 2 // uuid.h:47:1: + Uuid_s_no_memory = 3 // uuid.h:48:1: + Uuid_s_ok = 0 // uuid.h:45:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002,2005 Marcel Moolenaar +// Copyright (c) 2002 Hiten Mahesh Pandya +// 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$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// Machine type dependent parameters. +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 2001 David E. O'Brien +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 8.1 (Berkeley) 6/10/93 +// $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint32 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint32 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t + F__ccgo_pad1 [4]byte +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int32 + F__ccgo_pad1 [4]byte + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint32 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// Length of a node address (an IEEE 802 address). + +// See also: +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// A DCE 1.1 compatible source representation of UUIDs. +type Uuid = struct { + Ftime_low Uint32_t + Ftime_mid Uint16_t + Ftime_hi_and_version Uint16_t + Fclock_seq_hi_and_reserved Uint8_t + Fclock_seq_low Uint8_t + Fnode [6]Uint8_t +} /* uuid.h:46:1 */ + +// XXX namespace pollution? +type Uuid_t = Uuid /* uuid.h:93:21 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/uuid/uuid_freebsd_arm64.go b/vendor/modernc.org/libc/uuid/uuid_freebsd_arm64.go new file mode 100644 index 00000000..d59eb32f --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid_freebsd_arm64.go @@ -0,0 +1,1540 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_freebsd_amd64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // _endian.h:70:1: + BYTE_ORDER = 1234 // _endian.h:72:1: + FD_SETSIZE = 1024 // select.h:61:1: + LITTLE_ENDIAN = 1234 // _endian.h:69:1: + PDP_ENDIAN = 3412 // _endian.h:71:1: + X_ACCMODE_T_DECLARED = 0 // types.h:166:1: + X_BIG_ENDIAN = 4321 // _endian.h:47:1: + X_BLKCNT_T_DECLARED = 0 // types.h:90:1: + X_BLKSIZE_T_DECLARED = 0 // types.h:81:1: + X_BYTE_ORDER = 1234 // _endian.h:40:1: + X_CAP_IOCTL_T_DECLARED = 0 // types.h:243:1: + X_CAP_RIGHTS_T_DECLARED = 0 // types.h:248:1: + X_CLOCKID_T_DECLARED = 0 // types.h:100:1: + X_CLOCK_T_DECLARED = 0 // types.h:95:1: + X_DEV_T_DECLARED = 0 // types.h:108:1: + X_FFLAGS_T_DECLARED = 0 // types.h:113:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FSBLKCNT_T_DECLARED = 0 // types.h:121:1: + X_FTRUNCATE_DECLARED = 0 // types.h:417:1: + X_GID_T_DECLARED = 0 // types.h:126:1: + X_ID_T_DECLARED = 0 // types.h:141:1: + X_INO_T_DECLARED = 0 // types.h:146:1: + X_INT16_T_DECLARED = 0 // _stdint.h:42:1: + X_INT32_T_DECLARED = 0 // _stdint.h:47:1: + X_INT64_T_DECLARED = 0 // _stdint.h:52:1: + X_INT8_T_DECLARED = 0 // _stdint.h:37:1: + X_INTMAX_T_DECLARED = 0 // _stdint.h:85:1: + X_INTPTR_T_DECLARED = 0 // _stdint.h:77:1: + X_IN_ADDR_T_DECLARED = 0 // types.h:131:1: + X_IN_PORT_T_DECLARED = 0 // types.h:136:1: + X_KEY_T_DECLARED = 0 // types.h:151:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:46:1: + X_LP64 = 1 // <predefined>:1:1: + X_LSEEK_DECLARED = 0 // types.h:421:1: + X_LWPID_T_DECLARED = 0 // types.h:156:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_MMAP_DECLARED = 0 // types.h:425:1: + X_MODE_T_DECLARED = 0 // types.h:161:1: + X_MQD_T_DECLARED = 0 // types.h:227:1: + X_NLINK_T_DECLARED = 0 // types.h:171:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_OFF64_T_DECLARED = 0 // types.h:181:1: + X_OFF_T_DECLARED = 0 // types.h:176:1: + X_PDP_ENDIAN = 3412 // _endian.h:48:1: + X_PID_T_DECLARED = 0 // types.h:186:1: + X_PTHREAD_T_DECLARED = 0 // _pthreadtypes.h:68:1: + X_QUAD_HIGHWORD = 1 // _endian.h:55:1: + X_QUAD_LOWWORD = 0 // _endian.h:56:1: + X_RLIM_T_DECLARED = 0 // types.h:193:1: + X_SELECT_DECLARED = 0 // select.h:103:1: + X_SIGSET_T_DECLARED = 0 // select.h:50:1: + X_SIG_MAXSIG = 128 // _sigset.h:47:1: + X_SIG_WORDS = 4 // _sigset.h:46:1: + X_SIZE_T_DECLARED = 0 // types.h:202:1: + X_SSIZE_T_DECLARED = 0 // types.h:207:1: + X_SUSECONDS_T_DECLARED = 0 // types.h:212:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_SELECT_H_ = 0 // select.h:35:1: + X_SYS_TIMESPEC_H_ = 0 // timespec.h:37:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UUID_H_ = 0 // uuid.h:32:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1: + X_SYS__PTHREADTYPES_H_ = 0 // _pthreadtypes.h:39:1: + X_SYS__SIGSET_H_ = 0 // _sigset.h:41:1: + X_SYS__STDINT_H_ = 0 // _stdint.h:33:1: + X_SYS__TIMESPEC_H_ = 0 // _timespec.h:37:1: + X_SYS__TIMEVAL_H_ = 0 // _timeval.h:32:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_TIMER_T_DECLARED = 0 // types.h:222:1: + X_TIME_T_DECLARED = 0 // types.h:217:1: + X_TRUNCATE_DECLARED = 0 // types.h:429:1: + X_UID_T_DECLARED = 0 // types.h:234:1: + X_UINT16_T_DECLARED = 0 // _stdint.h:62:1: + X_UINT32_T_DECLARED = 0 // _stdint.h:67:1: + X_UINT64_T_DECLARED = 0 // _stdint.h:72:1: + X_UINT8_T_DECLARED = 0 // _stdint.h:57:1: + X_UINTMAX_T_DECLARED = 0 // _stdint.h:89:1: + X_UINTPTR_T_DECLARED = 0 // _stdint.h:81:1: + X_USECONDS_T_DECLARED = 0 // types.h:239:1: + X_UUID_H_ = 0 // uuid.h:33:1: + X_UUID_NODE_LEN = 6 // uuid.h:37:1: + Unix = 1 // <predefined>:340:1: + Uuid_s_bad_version = 1 // uuid.h:46:1: + Uuid_s_invalid_string_uuid = 2 // uuid.h:47:1: + Uuid_s_no_memory = 3 // uuid.h:48:1: + Uuid_s_ok = 0 // uuid.h:45:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002,2005 Marcel Moolenaar +// Copyright (c) 2002 Hiten Mahesh Pandya +// 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$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// Machine type dependent parameters. +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1987, 1991 Regents of the University of California. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)endian.h 7.8 (Berkeley) 4/3/91 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ +type Pthread_once = struct { + Fstate int32 + F__ccgo_pad1 [4]byte + Fmutex Pthread_mutex_t +} /* _pthreadtypes.h:52:1 */ + +// Primitive system data type definitions required by P1003.1c. +// +// Note that P1003.1c specifies that there are no defined comparison +// or assignment operators for the types pthread_attr_t, pthread_cond_t, +// pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. +type Pthread_t = uintptr /* _pthreadtypes.h:67:26 */ +type Pthread_attr_t = uintptr /* _pthreadtypes.h:70:30 */ +type Pthread_mutex_t = uintptr /* _pthreadtypes.h:71:31 */ +type Pthread_mutexattr_t = uintptr /* _pthreadtypes.h:72:35 */ +type Pthread_cond_t = uintptr /* _pthreadtypes.h:73:30 */ +type Pthread_condattr_t = uintptr /* _pthreadtypes.h:74:34 */ +type Pthread_key_t = int32 /* _pthreadtypes.h:75:20 */ +type Pthread_once_t = Pthread_once /* _pthreadtypes.h:76:30 */ +type Pthread_rwlock_t = uintptr /* _pthreadtypes.h:77:32 */ +type Pthread_rwlockattr_t = uintptr /* _pthreadtypes.h:78:35 */ +type Pthread_barrier_t = uintptr /* _pthreadtypes.h:79:33 */ +type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */ +type Pthread_spinlock_t = uintptr /* _pthreadtypes.h:81:33 */ + +// Additional type definitions: +// +// Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for +// use in header symbols. +type Pthread_addr_t = uintptr /* _pthreadtypes.h:89:14 */ +type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */ + +type U_char = uint8 /* types.h:52:23 */ +type U_short = uint16 /* types.h:53:24 */ +type U_int = uint32 /* types.h:54:22 */ +type U_long = uint64 /* types.h:55:23 */ +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility + +// XXX POSIX sized integrals that should appear only in <sys/stdint.h>. +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> +// Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Int8_t = X__int8_t /* _stdint.h:36:19 */ + +type Int16_t = X__int16_t /* _stdint.h:41:20 */ + +type Int32_t = X__int32_t /* _stdint.h:46:20 */ + +type Int64_t = X__int64_t /* _stdint.h:51:20 */ + +type Uint8_t = X__uint8_t /* _stdint.h:56:20 */ + +type Uint16_t = X__uint16_t /* _stdint.h:61:21 */ + +type Uint32_t = X__uint32_t /* _stdint.h:66:21 */ + +type Uint64_t = X__uint64_t /* _stdint.h:71:21 */ + +type Intptr_t = X__intptr_t /* _stdint.h:76:21 */ +type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */ +type Intmax_t = X__intmax_t /* _stdint.h:84:21 */ +type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */ + +type U_int8_t = X__uint8_t /* types.h:67:19 */ // unsigned integrals (deprecated) +type U_int16_t = X__uint16_t /* types.h:68:20 */ +type U_int32_t = X__uint32_t /* types.h:69:20 */ +type U_int64_t = X__uint64_t /* types.h:70:20 */ + +type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated) +type Quad_t = X__int64_t /* types.h:73:19 */ +type Qaddr_t = uintptr /* types.h:74:16 */ + +type Caddr_t = uintptr /* types.h:76:14 */ // core address +type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const + +type Blksize_t = X__blksize_t /* types.h:80:21 */ + +type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */ +type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */ +type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */ + +type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */ + +type Clock_t = X__clock_t /* types.h:94:19 */ + +type Clockid_t = X__clockid_t /* types.h:99:21 */ + +type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value +type Daddr_t = X__daddr_t /* types.h:104:19 */ // disk address + +type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev + +type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags + +type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */ +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */ + +type Gid_t = X__gid_t /* types.h:125:18 */ // group id + +type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address + +type In_port_t = X__uint16_t /* types.h:135:20 */ + +type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t + +type Ino_t = X__ino_t /* types.h:145:18 */ // inode number + +type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC) + +type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP) + +type Mode_t = X__mode_t /* types.h:160:18 */ // permissions + +type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions + +type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count + +type Off_t = X__off_t /* types.h:175:18 */ // file offset + +type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias) + +type Pid_t = X__pid_t /* types.h:185:18 */ // process id + +type Register_t = X__register_t /* types.h:189:22 */ + +type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit + +type Sbintime_t = X__int64_t /* types.h:196:19 */ + +type Segsz_t = X__segsz_t /* types.h:198:19 */ + +type Ssize_t = X__ssize_t /* types.h:206:19 */ + +type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed) + +type Time_t = X__time_t /* types.h:216:18 */ + +type Timer_t = X__timer_t /* types.h:221:19 */ + +type Mqd_t = X__mqd_t /* types.h:226:17 */ + +type U_register_t = X__u_register_t /* types.h:230:24 */ + +type Uid_t = X__uid_t /* types.h:233:18 */ // user id + +type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned) + +type Cap_ioctl_t = uint64 /* types.h:244:23 */ + +// Types suitable for exporting physical addresses, virtual addresses +// (pointers), and memory object sizes from the kernel independent of native +// word size. These should be used in place of vm_paddr_t, (u)intptr_t, and +// size_t in structs which contain such types that are shared with userspace. +type Kpaddr_t = X__uint64_t /* types.h:260:20 */ +type Kvaddr_t = X__uint64_t /* types.h:261:20 */ +type Ksize_t = X__uint64_t /* types.h:262:20 */ +type Kssize_t = X__int64_t /* types.h:263:19 */ + +type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */ +type Vm_ooffset_t = X__uint64_t /* types.h:266:20 */ +type Vm_paddr_t = X__vm_paddr_t /* types.h:267:22 */ +type Vm_pindex_t = X__uint64_t /* types.h:268:20 */ +type Vm_size_t = X__vm_size_t /* types.h:269:21 */ + +type Rman_res_t = X__rman_res_t /* types.h:271:25 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1992, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1989, 1991, 1993 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)signal.h 8.4 (Berkeley) 5/4/95 +// $FreeBSD$ + +// sigset_t macros. + +type X__sigset_t = X__sigset /* _sigset.h:55:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// Structure returned by gettimeofday(2) system call, and used in other calls. +type Timeval = struct { + Ftv_sec Time_t + Ftv_usec Suseconds_t +} /* _timeval.h:49:1 */ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)time.h 8.5 (Berkeley) 5/4/95 +// from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Timespec = struct { + Ftv_sec Time_t + Ftv_nsec int64 +} /* _timespec.h:46:1 */ + +// Structure defined by POSIX.1b to be like a itimerval, but with +// timespecs. Used in the timer_*() system calls. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec Time_t + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec Time_t + Ftv_nsec int64 + } +} /* timespec.h:60:1 */ + +type X__fd_mask = uint64 /* select.h:44:23 */ +type Fd_mask = X__fd_mask /* select.h:46:19 */ + +type Sigset_t = X__sigset_t /* select.h:51:20 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set1 = struct{ F__fds_bits [16]X__fd_mask } /* select.h:73:9 */ + +// Select uses bit masks of file descriptors in longs. These macros +// manipulate such bit fields (the filesystem macros use chars). +// FD_SETSIZE may be defined by the user, but the default here should +// be enough for most uses. + +type Fd_set = Fd_set1 /* select.h:75:3 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1982, 1986, 1991, 1993, 1994 +// The Regents of the University of California. All rights reserved. +// (c) UNIX System Laboratories, Inc. +// All or some portions of this file are derived from material licensed +// to the University of California by American Telephone and Telegraph +// Co. or Unix System Laboratories, Inc. and are reproduced herein with +// the permission of UNIX System Laboratories, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)types.h 8.6 (Berkeley) 2/19/95 +// $FreeBSD$ + +// Length of a node address (an IEEE 802 address). + +// See also: +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// A DCE 1.1 compatible source representation of UUIDs. +type Uuid = struct { + Ftime_low Uint32_t + Ftime_mid Uint16_t + Ftime_hi_and_version Uint16_t + Fclock_seq_hi_and_reserved Uint8_t + Fclock_seq_low Uint8_t + Fnode [6]Uint8_t +} /* uuid.h:46:1 */ + +// XXX namespace pollution? +type Uuid_t = Uuid /* uuid.h:93:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/uuid/uuid_netbsd_amd64.go b/vendor/modernc.org/libc/uuid/uuid_netbsd_amd64.go index fa120751..034bb6a0 100644 --- a/vendor/modernc.org/libc/uuid/uuid_netbsd_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid_netbsd_amd64.go @@ -1436,8 +1436,9 @@ type Pthread_key_t = int32 /* pthread_types.h:88:13 // Length of a printed UUID. // See also: -// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt -// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm // // A DCE 1.1 compatible source representation of UUIDs. type Uuid = struct { diff --git a/vendor/modernc.org/libc/uuid/uuid_netbsd_arm.go b/vendor/modernc.org/libc/uuid/uuid_netbsd_arm.go new file mode 100644 index 00000000..ba44d479 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid_netbsd_arm.go @@ -0,0 +1,1429 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_netbsd_arm.go -pkgname uuid', DO NOT EDIT. + +package uuid + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:101:1: + BYTE_ORDER = 1234 // endian.h:103:1: + FD_SETSIZE = 256 // fd_set.h:59:1: + INT16_MAX = 32767 // common_int_limits.h:53:1: + INT16_MIN = -32768 // common_int_limits.h:47:1: + INT32_MAX = 2147483647 // common_int_limits.h:54:1: + INT32_MIN = -2147483648 // common_int_limits.h:48:1: + INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1: + INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1: + INT8_MAX = 127 // common_int_limits.h:52:1: + INT8_MIN = -128 // common_int_limits.h:46:1: + INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1: + INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1: + INTPTR_MAX = 2147483647 // common_int_limits.h:105:1: + INTPTR_MIN = -2147483648 // common_int_limits.h:104:1: + INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1: + INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1: + INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1: + INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1: + INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1: + INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1: + INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1: + INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1: + INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1: + INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1: + INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1: + INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1: + INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1: + INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1: + INT_LEAST8_MAX = 127 // common_int_limits.h:72:1: + INT_LEAST8_MIN = -128 // common_int_limits.h:66:1: + LITTLE_ENDIAN = 1234 // endian.h:100:1: + NBBY = 8 // types.h:316:1: + NFDBITS = 32 // fd_set.h:93:1: + NODEVMAJOR = -1 // types.h:258:1: + PDP_ENDIAN = 3412 // endian.h:102:1: + PTRDIFF_MAX = 2147483647 // common_int_limits.h:121:1: + PTRDIFF_MIN = -2147483648 // common_int_limits.h:120:1: + SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1: + SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1: + SIZE_MAX = 4294967295 // common_int_limits.h:128:1: + UINT16_MAX = 65535 // common_int_limits.h:59:1: + UINT32_MAX = 4294967295 // common_int_limits.h:60:1: + UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1: + UINT8_MAX = 255 // common_int_limits.h:58:1: + UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1: + UINTPTR_MAX = 4294967295 // common_int_limits.h:106:1: + UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1: + UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1: + UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1: + UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1: + UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1: + UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1: + UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1: + UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1: + WCHAR_MAX = 2147483647 // wchar_limits.h:50:1: + WCHAR_MIN = -2147483648 // wchar_limits.h:42:1: + WINT_MAX = 2147483647 // wchar_limits.h:68:1: + WINT_MIN = -2147483648 // wchar_limits.h:60:1: + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_BSWAP_H_ = 0 // bswap.h:4:1: + X_ARM_BYTE_SWAP_H_ = 0 // byte_swap.h:33:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_CONST_H_ = 0 // int_const.h:33:1: + X_ARM_INT_LIMITS_H_ = 0 // int_limits.h:33:1: + X_ARM_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_ARM_TYPES_H_ = 0 // types.h:35:1: + X_ARM_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1: + X_BIG_ENDIAN = 4321 // endian.h:44:1: + X_BSD_INT16_T_ = 0 // types.h:65:1: + X_BSD_INT32_T_ = 0 // types.h:75:1: + X_BSD_INT64_T_ = 0 // types.h:85:1: + X_BSD_INT8_T_ = 0 // types.h:55:1: + X_BSD_INTPTR_T_ = 0 // stdint.h:80:1: + X_BSD_UINT16_T_ = 0 // types.h:70:1: + X_BSD_UINT32_T_ = 0 // types.h:80:1: + X_BSD_UINT64_T_ = 0 // types.h:90:1: + X_BSD_UINT8_T_ = 0 // types.h:60:1: + X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1: + X_BYTE_ORDER = 1234 // endian_machdep.h:7:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1: + X_LITTLE_ENDIAN = 1234 // endian.h:43:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_PDP_ENDIAN = 3412 // endian.h:45:1: + X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1: + X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1: + X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1: + X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1: + X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1: + X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1: + X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1: + X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1: + X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1: + X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1: + X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1: + X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1: + X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1: + X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1: + X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1: + X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1: + X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1: + X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1: + X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1: + X_QUAD_HIGHWORD = 1 // endian.h:84:1: + X_QUAD_LOWWORD = 0 // endian.h:85:1: + X_SIZE_T = 0 // types.h:279:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_BSWAP_H_ = 0 // bswap.h:6:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1: + X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:35:1: + X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1: + X_SYS_STDINT_H_ = 0 // stdint.h:33:1: + X_SYS_TYPES_H_ = 0 // types.h:40:1: + X_SYS_UUID_H_ = 0 // uuid.h:32:1: + X_UUID_H_ = 0 // uuid.h:33:1: + X_UUID_NODE_LEN = 6 // uuid.h:37:1: + X_UUID_STR_LEN = 38 // uuid.h:40:1: + Uuid_s_bad_version = 1 // uuid.h:40:1: + Uuid_s_invalid_string_uuid = 2 // uuid.h:41:1: + Uuid_s_no_memory = 3 // uuid.h:42:1: + Uuid_s_ok = 0 // uuid.h:39:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// This should have always been an 8-bit type, but since it's been exposed +// to user-space, we don't want ABI breakage there. +type X__cpu_simple_lock_nv_t = int32 /* types.h:75:14 */ +type X__register_t = int32 /* types.h:77:14 */ + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Int8_t = X__int8_t /* types.h:54:18 */ + +type Uint8_t = X__uint8_t /* types.h:59:19 */ + +type Int16_t = X__int16_t /* types.h:64:19 */ + +type Uint16_t = X__uint16_t /* types.h:69:20 */ + +type Int32_t = X__int32_t /* types.h:74:19 */ + +type Uint32_t = X__uint32_t /* types.h:79:20 */ + +type Int64_t = X__int64_t /* types.h:84:19 */ + +type Uint64_t = X__uint64_t /* types.h:89:20 */ + +type U_int8_t = Uint8_t /* types.h:93:18 */ +type U_int16_t = Uint16_t /* types.h:94:18 */ +type U_int32_t = Uint32_t /* types.h:95:18 */ +type U_int64_t = Uint64_t /* types.h:96:18 */ + +// $NetBSD: endian.h,v 1.3 2001/06/23 12:20:27 bjh21 Exp $ + +// $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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// Definitions for byte order, according to byte significance from low +// address to high. + +// C-family endian-ness definitions + +// $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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya 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 + +type In_addr_t = X__in_addr_t /* endian.h:58:21 */ + +type In_port_t = X__in_port_t /* endian.h:63:21 */ + +// $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $ + +// Written by Manuel Bouyer. Public domain + +// $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +type Intptr_t = X__intptr_t /* stdint.h:79:20 */ + +type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */ + +// $NetBSD: int_mwgwtypes.h,v 1.7 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.2 Minimum-width integer types + +type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */ +type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */ +type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */ +type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */ +type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */ +type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */ +type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */ +type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */ + +// 7.18.1.3 Fastest minimum-width integer types +type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */ +type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */ +type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */ +type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */ +type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */ +type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */ +type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */ +type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */ + +// 7.18.1.5 Greatest-width integer types + +type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */ +type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */ + +type U_char = uint8 /* types.h:101:23 */ +type U_short = uint16 /* types.h:102:24 */ +type U_int = uint32 /* types.h:103:22 */ +type U_long = uint32 /* types.h:104:23 */ + +type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:109:23 */ // Sys V compatibility + +type U_quad_t = Uint64_t /* types.h:112:18 */ // quads +type Quad_t = Int64_t /* types.h:113:18 */ +type Qaddr_t = uintptr /* types.h:114:16 */ + +// 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. + +type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR +type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR + +type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count +type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size + +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs) + +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count + +// We don't and shouldn't use caddr_t in the kernel anymore +type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address + +type Daddr_t = Int64_t /* types.h:154:18 */ // disk address + +type Dev_t = Uint64_t /* types.h:157:18 */ // device number +type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number + +type Gid_t = X__gid_t /* types.h:161:18 */ // group id + +type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id +type Ino_t = Uint64_t /* types.h:166:18 */ // inode number +type Key_t = int32 /* types.h:167:15 */ // IPC key (for Sys V IPC) + +type Mode_t = X__mode_t /* types.h:170:18 */ // permissions + +type Nlink_t = Uint32_t /* types.h:174:18 */ // link count + +type Off_t = X__off_t /* types.h:177:18 */ // file offset + +type Pid_t = X__pid_t /* types.h:182:18 */ // process id +type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id +type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit +type Segsz_t = Int32_t /* types.h:187:18 */ // segment size +type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset + +type Uid_t = X__uid_t /* types.h:191:18 */ // user id + +type Mqd_t = int32 /* types.h:195:14 */ + +type Cpuid_t = uint32 /* types.h:197:23 */ + +type Psetid_t = int32 /* types.h:199:14 */ + +type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */ + +// Major, minor numbers, dev_t's. +type X__devmajor_t = Int32_t /* types.h:255:17 */ +type X__devminor_t = Int32_t /* types.h:255:31 */ + +type Clock_t = uint32 /* types.h:268:24 */ + +type Ssize_t = int32 /* types.h:284:24 */ + +type Time_t = X__int64_t /* types.h:289:23 */ + +type Clockid_t = int32 /* types.h:294:26 */ + +type Timer_t = int32 /* types.h:299:24 */ + +type Suseconds_t = int32 /* types.h:304:27 */ + +type Useconds_t = uint32 /* types.h:309:26 */ + +// $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil 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 + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// Implementation dependent defines, hidden from user space. +// POSIX does not specify them. + +type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */ + +// 32 = 2 ^ 5 + +// Select uses bit fields of file descriptors. These macros manipulate +// such bit fields. Note: FD_SETSIZE may be defined by the user. + +type Fd_set = Fd_set1 /* fd_set.h:68:3 */ + +// Expose our internals if we are not required to hide them. + +type Kauth_cred_t = uintptr /* types.h:318:27 */ + +type Pri_t = int32 /* types.h:320:13 */ + +// $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil 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. + +// 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. +type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */ +type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */ + +// Copied from PTQ_HEAD in pthread_queue.h + +type Pthread_queue_struct_t = struct { + Fptqh_first uintptr + Fptqh_last uintptr +} /* pthread_types.h:61:1 */ + +type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */ +type X__pthread_attr_st = struct { + Fpta_magic uint32 + Fpta_flags int32 + Fpta_private uintptr +} /* pthread_types.h:65:1 */ + +type X__pthread_mutex_st = struct { + Fptm_magic uint32 + Fptm_errorcheck X__pthread_spin_t + F__8 struct { + F__ccgo_pad1 [0]uint32 + Fptm_ceiling uint8 + F__ccgo_pad2 [3]byte + } + Fptm_owner Pthread_t + Fptm_waiters uintptr + Fptm_recursed uint32 + Fptm_spare2 uintptr +} /* pthread_types.h:66:1 */ + +type X__pthread_mutexattr_st = struct { + Fptma_magic uint32 + Fptma_private uintptr +} /* pthread_types.h:67:1 */ + +type X__pthread_cond_st = struct { + Fptc_magic uint32 + Fptc_lock X__pthread_spin_t + Fptc_waiters Pthread_queue_t + Fptc_mutex uintptr + Fptc_private uintptr +} /* pthread_types.h:68:1 */ + +type X__pthread_condattr_st = struct { + Fptca_magic uint32 + Fptca_private uintptr +} /* pthread_types.h:69:1 */ + +type X__pthread_rwlock_st = struct { + Fptr_magic uint32 + Fptr_interlock X__pthread_spin_t + Fptr_rblocked Pthread_queue_t + Fptr_wblocked Pthread_queue_t + Fptr_nreaders uint32 + Fptr_owner Pthread_t + Fptr_private uintptr +} /* pthread_types.h:71:1 */ + +type X__pthread_rwlockattr_st = struct { + Fptra_magic uint32 + Fptra_private uintptr +} /* pthread_types.h:72:1 */ + +type X__pthread_barrier_st = struct { + Fptb_magic uint32 + Fptb_lock Pthread_spin_t + Fptb_waiters Pthread_queue_t + Fptb_initcount uint32 + Fptb_curcount uint32 + Fptb_generation uint32 + Fptb_private uintptr +} /* pthread_types.h:73:1 */ + +type X__pthread_barrierattr_st = struct { + Fptba_magic uint32 + Fptba_private uintptr +} /* pthread_types.h:74:1 */ + +type Pthread_t = uintptr /* pthread_types.h:76:29 */ +type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */ +type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */ +type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */ +type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */ +type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */ +type X__pthread_once_st = struct { + Fpto_mutex Pthread_mutex_t + Fpto_done int32 +} /* pthread_types.h:82:9 */ + +type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */ +type X__pthread_spinlock_st = struct { + Fpts_magic uint32 + Fpts_spin X__pthread_spin_t + Fpts_flags int32 +} /* pthread_types.h:83:9 */ + +type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */ +type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */ +type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */ +type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */ +type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */ +type Pthread_key_t = int32 /* pthread_types.h:88:13 */ + +// $NetBSD: uuid.h,v 1.6 2014/10/04 11:15:44 riastradh Exp $ + +// Copyright (c) 2002 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD: /repoman/r/ncvs/src/sys/sys/uuid.h,v 1.3 2003/05/31 16:47:07 phk Exp $ + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// Length of a node address (an IEEE 802 address). + +// Length of a printed UUID. + +// See also: +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// A DCE 1.1 compatible source representation of UUIDs. +type Uuid = struct { + Ftime_low Uint32_t + Ftime_mid Uint16_t + Ftime_hi_and_version Uint16_t + Fclock_seq_hi_and_reserved Uint8_t + Fclock_seq_low Uint8_t + Fnode [6]Uint8_t +} /* uuid.h:49:1 */ + +type Uuid_t = Uuid /* uuid.h:73:21 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/uuid/uuid_openbsd_386.go b/vendor/modernc.org/libc/uuid/uuid_openbsd_386.go new file mode 100644 index 00000000..98fb8b8c --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid_openbsd_386.go @@ -0,0 +1,731 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_openbsd_386.go -pkgname uuid', DO NOT EDIT. + +package uuid + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + UUID_BUF_LEN = 38 // uuid.h:46:1: + UUID_STR_LEN = 36 // uuid.h:49:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:58:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UUID_H_ = 0 // uuid.h:33:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_UUID_BUF_LEN = 38 // uuid.h:39:1: + X_UUID_H_ = 0 // uuid.h:34:1: + X_UUID_NODE_LEN = 6 // uuid.h:36:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: + Uuid_s_bad_version = 1 // uuid.h:41:1: + Uuid_s_invalid_string_uuid = 2 // uuid.h:42:1: + Uuid_s_no_memory = 3 // uuid.h:43:1: + Uuid_s_ok = 0 // uuid.h:40:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: uuid.h,v 1.1 2014/08/31 09:36:36 miod Exp $ +// $NetBSD: uuid.h,v 1.2 2008/04/23 07:52:32 plunky Exp $ + +// Copyright (c) 2002 Marcel Moolenaar +// Copyright (c) 2002 Hiten Mahesh Pandya +// 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/uuid.h,v 1.2 2002/11/05 10:55:16 jmallett Exp $ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint32 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint32 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: uuid.h,v 1.3 2014/08/31 09:36:39 miod Exp $ +// $NetBSD: uuid.h,v 1.5 2008/11/18 14:01:03 joerg Exp $ + +// Copyright (c) 2002 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD: /repoman/r/ncvs/src/sys/sys/uuid.h,v 1.3 2003/05/31 16:47:07 phk Exp $ + +// Length of a node address (an IEEE 802 address). + +// Length of a printed UUID. + +// See also: +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// A DCE 1.1 compatible source representation of UUIDs. +type Uuid = struct { + Ftime_low Uint32_t + Ftime_mid Uint16_t + Ftime_hi_and_version Uint16_t + Fclock_seq_hi_and_reserved Uint8_t + Fclock_seq_low Uint8_t + Fnode [6]Uint8_t +} /* uuid.h:48:1 */ + +type Uuid_t = Uuid /* uuid.h:71:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go b/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go index 5e0facd1..94cdeac6 100644 --- a/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go +++ b/vendor/modernc.org/libc/uuid/uuid_openbsd_amd64.go @@ -23,8 +23,8 @@ const ( UUID_STR_LEN = 36 // uuid.h:49:1: X_BIG_ENDIAN = 4321 // _endian.h:43:1: X_BYTE_ORDER = 1234 // endian.h:58:1: - X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1: - X_CLOCK_T_DEFINED_ = 0 // types.h:158:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_INT16_T_DEFINED_ = 0 // types.h:84:1: X_INT32_T_DEFINED_ = 0 // types.h:94:1: @@ -36,14 +36,14 @@ const ( X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1: X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: - X_OFF_T_DEFINED_ = 0 // types.h:193:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: X_PDP_ENDIAN = 3412 // _endian.h:44:1: - X_PID_T_DEFINED_ = 0 // types.h:168:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: X_QUAD_HIGHWORD = 1 // _endian.h:95:1: X_QUAD_LOWWORD = 0 // _endian.h:96:1: X_RET_PROTECTOR = 1 // <predefined>:2:1: - X_SIZE_T_DEFINED_ = 0 // types.h:173:1: - X_SSIZE_T_DEFINED_ = 0 // types.h:178:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: X_STACKALIGNBYTES = 15 // _types.h:49:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: @@ -51,8 +51,8 @@ const ( X_SYS_UUID_H_ = 0 // uuid.h:33:1: X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: X_SYS__TYPES_H_ = 0 // _types.h:35:1: - X_TIMER_T_DEFINED_ = 0 // types.h:188:1: - X_TIME_T_DEFINED_ = 0 // types.h:183:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: X_UINT16_T_DEFINED_ = 0 // types.h:89:1: X_UINT32_T_DEFINED_ = 0 // types.h:99:1: X_UINT64_T_DEFINED_ = 0 // types.h:109:1: @@ -60,7 +60,7 @@ const ( X_UUID_BUF_LEN = 38 // uuid.h:39:1: X_UUID_H_ = 0 // uuid.h:34:1: X_UUID_NODE_LEN = 6 // uuid.h:36:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: Uuid_s_bad_version = 1 // uuid.h:41:1: Uuid_s_invalid_string_uuid = 2 // uuid.h:42:1: Uuid_s_no_memory = 3 // uuid.h:43:1: @@ -115,7 +115,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // // $FreeBSD: src/include/uuid.h,v 1.2 2002/11/05 10:55:16 jmallett Exp $ -// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ // - @@ -412,7 +412,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // get the correct setting direction for the platform and sets internal // ('__' prefix) macros appropriately. -// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ // - // Copyright (c) 1990, 1993 @@ -572,18 +572,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) -type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset -type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time -type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers -type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id -type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds // mbstate_t is an opaque object to keep conversion state, during multibyte // stream conversions. The content must not be referenced by user programs. type X__mbstate_t = struct { F__ccgo_pad1 [0]uint64 F__mbstate8 [128]int8 -} /* _types.h:76:3 */ +} /* _types.h:75:3 */ // Tell sys/endian.h we have MD variants of the swap macros. @@ -665,27 +664,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size -type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset -type Uid_t = X__uid_t /* types.h:148:18 */ // user id -type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds -type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed) -type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count -type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count // The following types may be defined in multiple header files. -type Clock_t = X__clock_t /* types.h:159:19 */ +type Clock_t = X__clock_t /* types.h:158:19 */ -type Clockid_t = X__clockid_t /* types.h:164:21 */ +type Clockid_t = X__clockid_t /* types.h:163:21 */ -type Pid_t = X__pid_t /* types.h:169:18 */ +type Pid_t = X__pid_t /* types.h:168:18 */ -type Ssize_t = X__ssize_t /* types.h:179:19 */ +type Ssize_t = X__ssize_t /* types.h:178:19 */ -type Time_t = X__time_t /* types.h:184:18 */ +type Time_t = X__time_t /* types.h:183:18 */ -type Timer_t = X__timer_t /* types.h:189:19 */ +type Timer_t = X__timer_t /* types.h:188:19 */ -type Off_t = X__off_t /* types.h:194:18 */ +type Off_t = X__off_t /* types.h:193:18 */ // Major, minor numbers, dev_t's. @@ -723,8 +721,9 @@ type Off_t = X__off_t /* types.h:194:18 */ // Length of a printed UUID. // See also: -// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt -// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm // // A DCE 1.1 compatible source representation of UUIDs. type Uuid = struct { diff --git a/vendor/modernc.org/libc/uuid/uuid_openbsd_arm64.go b/vendor/modernc.org/libc/uuid/uuid_openbsd_arm64.go new file mode 100644 index 00000000..e817f4a4 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid_openbsd_arm64.go @@ -0,0 +1,738 @@ +// Code generated by 'ccgo uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid_openbsd_arm64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:45:1: + BYTE_ORDER = 1234 // endian.h:47:1: + LITTLE_ENDIAN = 1234 // endian.h:44:1: + PDP_ENDIAN = 3412 // endian.h:46:1: + UUID_BUF_LEN = 38 // uuid.h:46:1: + UUID_STR_LEN = 36 // uuid.h:49:1: + X_BIG_ENDIAN = 4321 // _endian.h:43:1: + X_BYTE_ORDER = 1234 // endian.h:60:1: + X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: + X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_INT16_T_DEFINED_ = 0 // types.h:84:1: + X_INT32_T_DEFINED_ = 0 // types.h:94:1: + X_INT64_T_DEFINED_ = 0 // types.h:104:1: + X_INT8_T_DEFINED_ = 0 // types.h:74:1: + X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_OFF_T_DEFINED_ = 0 // types.h:192:1: + X_PDP_ENDIAN = 3412 // _endian.h:44:1: + X_PID_T_DEFINED_ = 0 // types.h:167:1: + X_QUAD_HIGHWORD = 1 // _endian.h:95:1: + X_QUAD_LOWWORD = 0 // _endian.h:96:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_SIZE_T_DEFINED_ = 0 // types.h:172:1: + X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: + X_SYS_TYPES_H_ = 0 // types.h:41:1: + X_SYS_UUID_H_ = 0 // uuid.h:33:1: + X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: + X_SYS__TYPES_H_ = 0 // _types.h:35:1: + X_TIMER_T_DEFINED_ = 0 // types.h:187:1: + X_TIME_T_DEFINED_ = 0 // types.h:182:1: + X_UINT16_T_DEFINED_ = 0 // types.h:89:1: + X_UINT32_T_DEFINED_ = 0 // types.h:99:1: + X_UINT64_T_DEFINED_ = 0 // types.h:109:1: + X_UINT8_T_DEFINED_ = 0 // types.h:79:1: + X_UUID_BUF_LEN = 38 // uuid.h:39:1: + X_UUID_H_ = 0 // uuid.h:34:1: + X_UUID_NODE_LEN = 6 // uuid.h:36:1: + Unix = 1 // <predefined>:360:1: + Uuid_s_bad_version = 1 // uuid.h:41:1: + Uuid_s_invalid_string_uuid = 2 // uuid.h:42:1: + Uuid_s_no_memory = 3 // uuid.h:43:1: + Uuid_s_ok = 0 // uuid.h:40:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: uuid.h,v 1.1 2014/08/31 09:36:36 miod Exp $ +// $NetBSD: uuid.h,v 1.2 2008/04/23 07:52:32 plunky Exp $ + +// Copyright (c) 2002 Marcel Moolenaar +// Copyright (c) 2002 Hiten Mahesh Pandya +// 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/uuid.h,v 1.2 2002/11/05 10:55:16 jmallett Exp $ + +// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ +// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ + +// - +// 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. +// +// @(#)types.h 8.4 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Public definitions for little- and big-endian systems. +// This file should be included as <endian.h> in userspace and as +// <sys/endian.h> in the kernel. +// +// System headers that need endian information but that can't or don't +// want to export the public names here should include <sys/_endian.h> +// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc. + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $ + +// - +// Copyright (c) 1997 Niklas Hallqvist. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Internal endianness macros. This pulls in <machine/endian.h> to +// get the correct setting direction for the platform and sets internal +// ('__' prefix) macros appropriately. + +// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O +type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers +type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id +type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number +type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number +type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count +type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count +type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id +type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid +type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address +type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type +type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number +type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) +type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions +type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count +type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id +type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit +type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type +type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size +type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls +type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) +type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time +type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers +type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id +type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:75:3 */ + +// Tell sys/endian.h we have MD variants of the swap macros. + +// Note that these macros evaluate their arguments several times. + +// Public names + +// These are specified to be function-like macros to match the spec + +// POSIX names + +// original BSD names + +// these were exposed here before + +// ancient stuff + +type U_char = uint8 /* types.h:51:23 */ +type U_short = uint16 /* types.h:52:24 */ +type U_int = uint32 /* types.h:53:22 */ +type U_long = uint64 /* types.h:54:23 */ + +type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility +type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility +type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility +type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility + +type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id +type Register_t = X__register_t /* types.h:62:22 */ // register-sized type + +// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE +// but the rest of the includes are not ready for that yet. + +type Int8_t = X__int8_t /* types.h:75:19 */ + +type Uint8_t = X__uint8_t /* types.h:80:20 */ + +type Int16_t = X__int16_t /* types.h:85:20 */ + +type Uint16_t = X__uint16_t /* types.h:90:21 */ + +type Int32_t = X__int32_t /* types.h:95:20 */ + +type Uint32_t = X__uint32_t /* types.h:100:21 */ + +type Int64_t = X__int64_t /* types.h:105:20 */ + +type Uint64_t = X__uint64_t /* types.h:110:21 */ + +// BSD-style unsigned bits types +type U_int8_t = X__uint8_t /* types.h:114:19 */ +type U_int16_t = X__uint16_t /* types.h:115:20 */ +type U_int32_t = X__uint32_t /* types.h:116:20 */ +type U_int64_t = X__uint64_t /* types.h:117:20 */ + +// quads, deprecated in favor of 64 bit int types +type Quad_t = X__int64_t /* types.h:120:19 */ +type U_quad_t = X__uint64_t /* types.h:121:20 */ + +// VM system types +type Vaddr_t = X__vaddr_t /* types.h:125:19 */ +type Paddr_t = X__paddr_t /* types.h:126:19 */ +type Vsize_t = X__vsize_t /* types.h:127:19 */ +type Psize_t = X__psize_t /* types.h:128:19 */ + +// Standard system types +type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file +type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O +type Caddr_t = uintptr /* types.h:134:14 */ // core address +type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address +type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address +type Dev_t = X__dev_t /* types.h:137:18 */ // device number +type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number +type Gid_t = X__gid_t /* types.h:139:18 */ // group id +type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid +type Ino_t = X__ino_t /* types.h:141:18 */ // inode number +type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) +type Mode_t = X__mode_t /* types.h:143:18 */ // permissions +type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count +type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit +type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size +type Uid_t = X__uid_t /* types.h:147:18 */ // user id +type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds +type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) +type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count +type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count + +// The following types may be defined in multiple header files. +type Clock_t = X__clock_t /* types.h:158:19 */ + +type Clockid_t = X__clockid_t /* types.h:163:21 */ + +type Pid_t = X__pid_t /* types.h:168:18 */ + +type Ssize_t = X__ssize_t /* types.h:178:19 */ + +type Time_t = X__time_t /* types.h:183:18 */ + +type Timer_t = X__timer_t /* types.h:188:19 */ + +type Off_t = X__off_t /* types.h:193:18 */ + +// Major, minor numbers, dev_t's. + +// $OpenBSD: uuid.h,v 1.3 2014/08/31 09:36:39 miod Exp $ +// $NetBSD: uuid.h,v 1.5 2008/11/18 14:01:03 joerg Exp $ + +// Copyright (c) 2002 Marcel Moolenaar +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// $FreeBSD: /repoman/r/ncvs/src/sys/sys/uuid.h,v 1.3 2003/05/31 16:47:07 phk Exp $ + +// Length of a node address (an IEEE 802 address). + +// Length of a printed UUID. + +// See also: +// +// http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt +// http://www.opengroup.org/onlinepubs/009629399/apdxa.htm +// +// A DCE 1.1 compatible source representation of UUIDs. +type Uuid = struct { + Ftime_low Uint32_t + Ftime_mid Uint16_t + Ftime_hi_and_version Uint16_t + Fclock_seq_hi_and_reserved Uint8_t + Fclock_seq_low Uint8_t + Fnode [6]Uint8_t +} /* uuid.h:48:1 */ + +type Uuid_t = Uuid /* uuid.h:71:21 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go b/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go index d128ab89..c11e2f0d 100644 --- a/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go +++ b/vendor/modernc.org/libc/wctype/capi_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o wctype/wctype_darwin_amd64.go -pkgname wctype', DO NOT EDIT. +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_darwin_amd64.go -pkgname wctype', DO NOT EDIT. package wctype diff --git a/vendor/modernc.org/libc/wctype/capi_freebsd_arm.go b/vendor/modernc.org/libc/wctype/capi_freebsd_arm.go new file mode 100644 index 00000000..43f21b0d --- /dev/null +++ b/vendor/modernc.org/libc/wctype/capi_freebsd_arm.go @@ -0,0 +1,29 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_freebsd_arm.go -pkgname wctype', DO NOT EDIT. + +package wctype + +var CAPI = map[string]struct{}{ + "__istype_l": {}, + "__maskrune_l": {}, + "__wcwidth_l": {}, + "iswalnum_l": {}, + "iswalpha_l": {}, + "iswblank_l": {}, + "iswcntrl_l": {}, + "iswdigit_l": {}, + "iswgraph_l": {}, + "iswhexnumber_l": {}, + "iswideogram_l": {}, + "iswlower_l": {}, + "iswnumber_l": {}, + "iswphonogram_l": {}, + "iswprint_l": {}, + "iswpunct_l": {}, + "iswrune_l": {}, + "iswspace_l": {}, + "iswspecial_l": {}, + "iswupper_l": {}, + "iswxdigit_l": {}, + "towlower_l": {}, + "towupper_l": {}, +} diff --git a/vendor/modernc.org/libc/wctype/capi_freebsd_arm64.go b/vendor/modernc.org/libc/wctype/capi_freebsd_arm64.go new file mode 100644 index 00000000..c4e608f2 --- /dev/null +++ b/vendor/modernc.org/libc/wctype/capi_freebsd_arm64.go @@ -0,0 +1,29 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_freebsd_amd64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +var CAPI = map[string]struct{}{ + "__istype_l": {}, + "__maskrune_l": {}, + "__wcwidth_l": {}, + "iswalnum_l": {}, + "iswalpha_l": {}, + "iswblank_l": {}, + "iswcntrl_l": {}, + "iswdigit_l": {}, + "iswgraph_l": {}, + "iswhexnumber_l": {}, + "iswideogram_l": {}, + "iswlower_l": {}, + "iswnumber_l": {}, + "iswphonogram_l": {}, + "iswprint_l": {}, + "iswpunct_l": {}, + "iswrune_l": {}, + "iswspace_l": {}, + "iswspecial_l": {}, + "iswupper_l": {}, + "iswxdigit_l": {}, + "towlower_l": {}, + "towupper_l": {}, +} diff --git a/vendor/modernc.org/libc/wctype/capi_netbsd_arm.go b/vendor/modernc.org/libc/wctype/capi_netbsd_arm.go new file mode 100644 index 00000000..28426f0c --- /dev/null +++ b/vendor/modernc.org/libc/wctype/capi_netbsd_arm.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_netbsd_arm.go -pkgname wctype', DO NOT EDIT. + +package wctype + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/wctype/capi_openbsd_386.go b/vendor/modernc.org/libc/wctype/capi_openbsd_386.go new file mode 100644 index 00000000..aa1edc8d --- /dev/null +++ b/vendor/modernc.org/libc/wctype/capi_openbsd_386.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_openbsd_386.go -pkgname wctype', DO NOT EDIT. + +package wctype + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/wctype/capi_openbsd_arm64.go b/vendor/modernc.org/libc/wctype/capi_openbsd_arm64.go new file mode 100644 index 00000000..0e9a8a55 --- /dev/null +++ b/vendor/modernc.org/libc/wctype/capi_openbsd_arm64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_openbsd_arm64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/wctype/capi_windows_386.go b/vendor/modernc.org/libc/wctype/capi_windows_386.go index 2f09890d..9ba39f5c 100644 --- a/vendor/modernc.org/libc/wctype/capi_windows_386.go +++ b/vendor/modernc.org/libc/wctype/capi_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo wctype\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o wctype\wctype_windows_386.go -pkgname wctype', DO NOT EDIT. +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_windows_386.go -pkgname wctype', DO NOT EDIT. package wctype diff --git a/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go b/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go index 19ee06d9..6f64a0dc 100644 --- a/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go +++ b/vendor/modernc.org/libc/wctype/wctype_darwin_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o wctype/wctype_darwin_amd64.go -pkgname wctype', DO NOT EDIT. +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_darwin_amd64.go -pkgname wctype', DO NOT EDIT. package wctype @@ -15,53 +15,53 @@ var _ atomic.Value var _ unsafe.Pointer const ( - X_BSD_I386__TYPES_H_ = 0 - X_BSD_MACHINE__TYPES_H_ = 0 - X_CACHED_RUNES = 256 - X_CDEFS_H_ = 0 - X_CRMASK = -256 - X_CTYPE_A = 0x00000100 - X_CTYPE_B = 0x00020000 - X_CTYPE_C = 0x00000200 - X_CTYPE_D = 0x00000400 - X_CTYPE_G = 0x00000800 - X_CTYPE_H_ = 0 - X_CTYPE_I = 0x00080000 - X_CTYPE_L = 0x00001000 - X_CTYPE_P = 0x00002000 - X_CTYPE_Q = 0x00200000 - X_CTYPE_R = 0x00040000 - X_CTYPE_S = 0x00004000 - X_CTYPE_SW0 = 0x20000000 - X_CTYPE_SW1 = 0x40000000 - X_CTYPE_SW2 = 0x80000000 - X_CTYPE_SW3 = 0xc0000000 - X_CTYPE_SWM = 0xe0000000 - X_CTYPE_SWS = 30 - X_CTYPE_T = 0x00100000 - X_CTYPE_U = 0x00008000 - X_CTYPE_X = 0x00010000 - X_CT_RUNE_T = 0 - X_DARWIN_FEATURE_64_BIT_INODE = 1 - X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 - X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 - X_FILE_OFFSET_BITS = 64 - X_FORTIFY_SOURCE = 2 - X_LP64 = 1 - X_Nonnull = 0 - X_Null_unspecified = 0 - X_Nullable = 0 - X_RUNETYPE_H_ = 0 - X_RUNE_MAGIC_A = "RuneMagA" - X_RUNE_T = 0 - X_SIZE_T = 0 - X_SYS__PTHREAD_TYPES_H_ = 0 - X_SYS__TYPES_H_ = 0 - X_WCHAR_T = 0 - X_WCTRANS_T = 0 - X_WCTYPE_H_ = 0 - X_WCTYPE_T = 0 - X_WINT_T = 0 + X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1: + X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1: + X_CACHED_RUNES = 256 // runetype.h:54:1: + X_CDEFS_H_ = 0 // cdefs.h:68:1: + X_CRMASK = -256 // runetype.h:55:1: + X_CTYPE_A = 0x00000100 // _ctype.h:72:1: + X_CTYPE_B = 0x00020000 // _ctype.h:81:1: + X_CTYPE_C = 0x00000200 // _ctype.h:73:1: + X_CTYPE_D = 0x00000400 // _ctype.h:74:1: + X_CTYPE_G = 0x00000800 // _ctype.h:75:1: + X_CTYPE_H_ = 0 // ctype.h:67:1: + X_CTYPE_I = 0x00080000 // _ctype.h:83:1: + X_CTYPE_L = 0x00001000 // _ctype.h:76:1: + X_CTYPE_P = 0x00002000 // _ctype.h:77:1: + X_CTYPE_Q = 0x00200000 // _ctype.h:85:1: + X_CTYPE_R = 0x00040000 // _ctype.h:82:1: + X_CTYPE_S = 0x00004000 // _ctype.h:78:1: + X_CTYPE_SW0 = 0x20000000 // _ctype.h:86:1: + X_CTYPE_SW1 = 0x40000000 // _ctype.h:87:1: + X_CTYPE_SW2 = 0x80000000 // _ctype.h:88:1: + X_CTYPE_SW3 = 0xc0000000 // _ctype.h:89:1: + X_CTYPE_SWM = 0xe0000000 // _ctype.h:90:1: + X_CTYPE_SWS = 30 // _ctype.h:91:1: + X_CTYPE_T = 0x00100000 // _ctype.h:84:1: + X_CTYPE_U = 0x00008000 // _ctype.h:79:1: + X_CTYPE_X = 0x00010000 // _ctype.h:80:1: + X_CT_RUNE_T = 0 // _ct_rune_t.h:30:1: + X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1: + X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1: + X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FORTIFY_SOURCE = 2 // _types.h:65:1: + X_LP64 = 1 // <predefined>:1:1: + X_Nonnull = 0 // cdefs.h:243:1: + X_Null_unspecified = 0 // cdefs.h:246:1: + X_Nullable = 0 // cdefs.h:240:1: + X_RUNETYPE_H_ = 0 // runetype.h:40:1: + X_RUNE_MAGIC_A = "RuneMagA" // runetype.h:108:1: + X_RUNE_T = 0 // _rune_t.h:29:1: + X_SIZE_T = 0 // _size_t.h:29:1: + X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1: + X_SYS__TYPES_H_ = 0 // _types.h:30:1: + X_WCHAR_T = 0 // _wchar_t.h:32:1: + X_WCTRANS_T = 0 // _wctrans_t.h:30:1: + X_WCTYPE_H_ = 0 // wctype.h:32:1: + X_WCTYPE_T = 0 // _wctype_t.h:30:1: + X_WINT_T = 0 // _wint_t.h:30:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/wctype/wctype_freebsd_386.go b/vendor/modernc.org/libc/wctype/wctype_freebsd_386.go index 08b7dd24..27da9b4e 100644 --- a/vendor/modernc.org/libc/wctype/wctype_freebsd_386.go +++ b/vendor/modernc.org/libc/wctype/wctype_freebsd_386.go @@ -40,7 +40,7 @@ const ( X_CTYPE_X = 0x00010000 // _ctype.h:58:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_ILP32 = 1 // <predefined>:1:1: - X_LOCALE_T_DEFINED = 0 // _ctype.h:45:1: + X_LOCALE_T_DEFINED = 0 // _ctype.h:44:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: X_Nonnull = 0 // cdefs.h:790:1: @@ -54,8 +54,8 @@ const ( X_WCTYPE_H_ = 0 // wctype.h:34:1: X_WCTYPE_T = 0 // wctype.h:48:1: X_WINT_T_DECLARED = 0 // wctype.h:53:1: - X_XLOCALE_RUN_FUNCTIONS_DEFINED = 1 // _ctype.h:50:1: - X_XLOCALE_WCTYPE_H = 0 // _ctype.h:39:1: + X_XLOCALE_RUN_FUNCTIONS_DEFINED = 1 // _ctype.h:49:1: + X_XLOCALE_WCTYPE_H = 0 // _ctype.h:38:1: I386 = 1 // <predefined>:335:1: Unix = 1 // <predefined>:336:1: ) @@ -567,8 +567,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -754,7 +754,6 @@ type Wint_t = X__wint_t /* wctype.h:52:18 */ // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -782,6 +781,6 @@ type Wint_t = X__wint_t /* wctype.h:52:18 */ // // $FreeBSD$ -type Locale_t = uintptr /* _ctype.h:46:25 */ +type Locale_t = uintptr /* _ctype.h:45:25 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_freebsd_amd64.go b/vendor/modernc.org/libc/wctype/wctype_freebsd_amd64.go index c44a92b1..f0cc786e 100644 --- a/vendor/modernc.org/libc/wctype/wctype_freebsd_amd64.go +++ b/vendor/modernc.org/libc/wctype/wctype_freebsd_amd64.go @@ -39,13 +39,13 @@ const ( X_CTYPE_U = 0x00008000 // _ctype.h:57:1: X_CTYPE_X = 0x00010000 // _ctype.h:58:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: - X_LOCALE_T_DEFINED = 0 // _ctype.h:45:1: + X_LOCALE_T_DEFINED = 0 // _ctype.h:44:1: X_LP64 = 1 // <predefined>:1:1: X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: - X_Nonnull = 0 // cdefs.h:783:1: - X_Null_unspecified = 0 // cdefs.h:785:1: - X_Nullable = 0 // cdefs.h:784:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: X_RUNETYPE_H_ = 0 // runetype.h:39:1: X_RUNE_MAGIC_1 = "RuneMagi" // runetype.h:87:1: X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: @@ -54,9 +54,9 @@ const ( X_WCTYPE_H_ = 0 // wctype.h:34:1: X_WCTYPE_T = 0 // wctype.h:48:1: X_WINT_T_DECLARED = 0 // wctype.h:53:1: - X_XLOCALE_RUN_FUNCTIONS_DEFINED = 1 // _ctype.h:50:1: - X_XLOCALE_WCTYPE_H = 0 // _ctype.h:39:1: - Unix = 1 // <predefined>:337:1: + X_XLOCALE_RUN_FUNCTIONS_DEFINED = 1 // _ctype.h:49:1: + X_XLOCALE_WCTYPE_H = 0 // _ctype.h:38:1: + Unix = 1 // <predefined>:340:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ @@ -324,12 +324,15 @@ type X__float128 = float64 /* <builtin>:47:21 */ // Function should not be analyzed. -// Function or variable should not be sanitized, i.e. by AddressSanitizer. +// Function or variable should not be sanitized, e.g., by AddressSanitizer. // GCC has the nosanitize attribute, but as a function attribute only, and // warns on use as a variable attribute. // Guard variables and structure members by lock. +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + // - // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // @@ -572,8 +575,8 @@ type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc // Unusual type definitions. -// rune_t is declared to be an ``int'' instead of the more natural -// ``unsigned long'' or ``long''. Two things are happening here. It is not +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not // unsigned so that EOF (-1) can be naturally assigned to it and used. Also, // it looks like 10646 will be a 31 bit standard. This means that if your // ints cannot hold 32 bits, you will be in trouble. The reason an int was @@ -763,7 +766,6 @@ type Wint_t = X__wint_t /* wctype.h:52:18 */ // SPDX-License-Identifier: BSD-2-Clause-FreeBSD // // Copyright (c) 2011 The FreeBSD Foundation -// All rights reserved. // // This software was developed by David Chisnall under sponsorship from // the FreeBSD Foundation. @@ -791,6 +793,6 @@ type Wint_t = X__wint_t /* wctype.h:52:18 */ // // $FreeBSD$ -type Locale_t = uintptr /* _ctype.h:46:25 */ +type Locale_t = uintptr /* _ctype.h:45:25 */ var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_freebsd_arm.go b/vendor/modernc.org/libc/wctype/wctype_freebsd_arm.go new file mode 100644 index 00000000..a7ff790f --- /dev/null +++ b/vendor/modernc.org/libc/wctype/wctype_freebsd_arm.go @@ -0,0 +1,735 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_freebsd_arm.go -pkgname wctype', DO NOT EDIT. + +package wctype + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_CACHED_RUNES = 256 // runetype.h:44:1: + X_CRMASK = -256 // runetype.h:45:1: + X_CTYPE_A = 0x00000100 // _ctype.h:50:1: + X_CTYPE_B = 0x00020000 // _ctype.h:59:1: + X_CTYPE_C = 0x00000200 // _ctype.h:51:1: + X_CTYPE_D = 0x00000400 // _ctype.h:52:1: + X_CTYPE_G = 0x00000800 // _ctype.h:53:1: + X_CTYPE_I = 0x00080000 // _ctype.h:61:1: + X_CTYPE_L = 0x00001000 // _ctype.h:54:1: + X_CTYPE_N = 0x00400000 // _ctype.h:64:1: + X_CTYPE_P = 0x00002000 // _ctype.h:55:1: + X_CTYPE_Q = 0x00200000 // _ctype.h:63:1: + X_CTYPE_R = 0x00040000 // _ctype.h:60:1: + X_CTYPE_S = 0x00004000 // _ctype.h:56:1: + X_CTYPE_SW0 = 0x20000000 // _ctype.h:65:1: + X_CTYPE_SW1 = 0x40000000 // _ctype.h:66:1: + X_CTYPE_SW2 = 0x80000000 // _ctype.h:67:1: + X_CTYPE_SW3 = 0xc0000000 // _ctype.h:68:1: + X_CTYPE_SWM = 0xe0000000 // _ctype.h:69:1: + X_CTYPE_SWS = 30 // _ctype.h:70:1: + X_CTYPE_T = 0x00100000 // _ctype.h:62:1: + X_CTYPE_U = 0x00008000 // _ctype.h:57:1: + X_CTYPE_X = 0x00010000 // _ctype.h:58:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LOCALE_T_DEFINED = 0 // _ctype.h:44:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_RUNETYPE_H_ = 0 // runetype.h:39:1: + X_RUNE_MAGIC_1 = "RuneMagi" // runetype.h:87:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_WCTRANS_T = 0 // wctype.h:43:1: + X_WCTYPE_H_ = 0 // wctype.h:34:1: + X_WCTYPE_T = 0 // wctype.h:48:1: + X_WINT_T_DECLARED = 0 // wctype.h:53:1: + X_XLOCALE_RUN_FUNCTIONS_DEFINED = 1 // _ctype.h:49:1: + X_XLOCALE_WCTYPE_H = 0 // _ctype.h:38:1: + Unix = 1 // <predefined>:367:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = uint32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause +// +// Copyright (c)1999 Citrus Project, +// 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. +// +// citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp +// $NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:51:22 */ +type X__uint8_t = uint8 /* _types.h:52:24 */ +type X__int16_t = int16 /* _types.h:53:17 */ +type X__uint16_t = uint16 /* _types.h:54:25 */ +type X__int32_t = int32 /* _types.h:55:15 */ +type X__uint32_t = uint32 /* _types.h:56:23 */ + +// LONGLONG +type X__int64_t = int64 /* _types.h:61:20 */ + +// LONGLONG +type X__uint64_t = uint64 /* _types.h:66:28 */ + +// Standard type definitions. +type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()... +type X__critical_t = X__int32_t /* _types.h:72:19 */ +type X__double_t = float64 /* _types.h:74:17 */ +type X__float_t = float32 /* _types.h:75:16 */ +type X__intfptr_t = X__int32_t /* _types.h:77:19 */ +type X__intmax_t = X__int64_t /* _types.h:78:19 */ +type X__intptr_t = X__int32_t /* _types.h:79:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:80:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:81:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:82:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:83:19 */ +type X__int_least8_t = X__int8_t /* _types.h:84:18 */ +type X__int_least16_t = X__int16_t /* _types.h:85:19 */ +type X__int_least32_t = X__int32_t /* _types.h:86:19 */ +type X__int_least64_t = X__int64_t /* _types.h:87:19 */ +type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2 +type X__register_t = X__int32_t /* _types.h:89:19 */ +type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages) +type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof() +type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:93:19 */ // time()... +type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:95:20 */ +type X__uintptr_t = X__uint32_t /* _types.h:96:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */ +type X__u_register_t = X__uint32_t /* _types.h:105:20 */ +type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */ +type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */ +type X__vm_size_t = X__uint32_t /* _types.h:108:20 */ + +type X___wchar_t = uint32 /* _types.h:110:22 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]uint8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ + +// Use inline functions if we are allowed to and the compiler supports them. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Paul Borman at Krystal Technologies. +// +// 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. +// +// @(#)runetype.h 8.1 (Berkeley) 6/2/93 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// The lower 8 bits of runetype[] contain the digit value of the rune. +type X_RuneEntry = struct { + F__min X__rune_t + F__max X__rune_t + F__map X__rune_t + F__types uintptr +} /* runetype.h:55:3 */ + +type X_RuneRange = struct { + F__nranges int32 + F__ranges uintptr +} /* runetype.h:60:3 */ + +type X_RuneLocale = struct { + F__magic [8]uint8 + F__encoding [32]uint8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune X__rune_t + F__runetype [256]uint32 + F__maplower [256]X__rune_t + F__mapupper [256]X__rune_t + F__runetype_ext X_RuneRange + F__maplower_ext X_RuneRange + F__mapupper_ext X_RuneRange + F__variable uintptr + F__variable_len int32 +} /* runetype.h:85:3 */ + +type Wctrans_t = int32 /* wctype.h:42:13 */ + +type Wctype_t = uint32 /* wctype.h:47:23 */ + +type Wint_t = X__wint_t /* wctype.h:52:18 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _ctype.h:45:25 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_freebsd_arm64.go b/vendor/modernc.org/libc/wctype/wctype_freebsd_arm64.go new file mode 100644 index 00000000..f0cc786e --- /dev/null +++ b/vendor/modernc.org/libc/wctype/wctype_freebsd_arm64.go @@ -0,0 +1,798 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_freebsd_amd64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_CACHED_RUNES = 256 // runetype.h:44:1: + X_CRMASK = -256 // runetype.h:45:1: + X_CTYPE_A = 0x00000100 // _ctype.h:50:1: + X_CTYPE_B = 0x00020000 // _ctype.h:59:1: + X_CTYPE_C = 0x00000200 // _ctype.h:51:1: + X_CTYPE_D = 0x00000400 // _ctype.h:52:1: + X_CTYPE_G = 0x00000800 // _ctype.h:53:1: + X_CTYPE_I = 0x00080000 // _ctype.h:61:1: + X_CTYPE_L = 0x00001000 // _ctype.h:54:1: + X_CTYPE_N = 0x00400000 // _ctype.h:64:1: + X_CTYPE_P = 0x00002000 // _ctype.h:55:1: + X_CTYPE_Q = 0x00200000 // _ctype.h:63:1: + X_CTYPE_R = 0x00040000 // _ctype.h:60:1: + X_CTYPE_S = 0x00004000 // _ctype.h:56:1: + X_CTYPE_SW0 = 0x20000000 // _ctype.h:65:1: + X_CTYPE_SW1 = 0x40000000 // _ctype.h:66:1: + X_CTYPE_SW2 = 0x80000000 // _ctype.h:67:1: + X_CTYPE_SW3 = 0xc0000000 // _ctype.h:68:1: + X_CTYPE_SWM = 0xe0000000 // _ctype.h:69:1: + X_CTYPE_SWS = 30 // _ctype.h:70:1: + X_CTYPE_T = 0x00100000 // _ctype.h:62:1: + X_CTYPE_U = 0x00008000 // _ctype.h:57:1: + X_CTYPE_X = 0x00010000 // _ctype.h:58:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LOCALE_T_DEFINED = 0 // _ctype.h:44:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:42:1: + X_Nonnull = 0 // cdefs.h:790:1: + X_Null_unspecified = 0 // cdefs.h:792:1: + X_Nullable = 0 // cdefs.h:791:1: + X_RUNETYPE_H_ = 0 // runetype.h:39:1: + X_RUNE_MAGIC_1 = "RuneMagi" // runetype.h:87:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_SYS__TYPES_H_ = 0 // _types.h:32:1: + X_WCTRANS_T = 0 // wctype.h:43:1: + X_WCTYPE_H_ = 0 // wctype.h:34:1: + X_WCTYPE_T = 0 // wctype.h:48:1: + X_WINT_T_DECLARED = 0 // wctype.h:53:1: + X_XLOCALE_RUN_FUNCTIONS_DEFINED = 1 // _ctype.h:49:1: + X_XLOCALE_WCTYPE_H = 0 // _ctype.h:38:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause +// +// Copyright (c)1999 Citrus Project, +// 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. +// +// citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp +// $NetBSD: wctype.h,v 1.3 2000/12/22 14:16:16 itojun Exp $ +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// Testing against Clang-specific extensions. + +// This code has been put in place to help reduce the addition of +// compiler specific defines in FreeBSD code. It helps to aid in +// having a compiler-agnostic source tree. + +// Compiler memory barriers, specific to gcc and clang. + +// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced + +// Macro to test if we're using a specific version of gcc or later. + +// The __CONCAT macro is used to concatenate parts of symbol names, e.g. +// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. +// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI +// mode -- there must be no spaces between its arguments, and for nested +// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also +// concatenate double-quoted strings produced by the __STRING macro, but +// this only works with ANSI C. +// +// __XSTRING is like __STRING, but it expands any macros in its argument +// first. It is only available with ANSI C. + +// Compiler-dependent macros to help declare dead (non-returning) and +// pure (no side effects) functions, and unused variables. They are +// null except for versions of gcc that are known to support the features +// properly (old versions of gcc-2 supported the dead and pure features +// in a different (wrong) way). If we do not provide an implementation +// for a given compiler, let the compile fail if it is told to use +// a feature that we cannot live without. + +// Keywords added in C11. + +// Emulation of C11 _Generic(). Unlike the previously defined C11 +// keywords, it is not possible to implement this using exactly the same +// syntax. Therefore implement something similar under the name +// __generic(). Unlike _Generic(), this macro can only distinguish +// between a single type, so it requires nested invocations to +// distinguish multiple cases. + +// C99 Static array indices in function parameter declarations. Syntax such as: +// void bar(int myArray[static 10]); +// is allowed in C99 but not in C++. Define __min_size appropriately so +// headers using it can be compiled in either language. Use like this: +// void bar(int myArray[__min_size(10)]); + +// XXX: should use `#if __STDC_VERSION__ < 199901'. + +// C++11 exposes a load of C99 stuff + +// GCC 2.95 provides `__restrict' as an extension to C90 to support the +// C99-specific `restrict' type qualifier. We happen to use `__restrict' as +// a way to define the `restrict' type qualifier without disturbing older +// software that is unaware of C99 keywords. + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> +// require it. + +// Given the pointer x to the member m of the struct s, return +// a pointer to the containing structure. When using GCC, we first +// assign pointer x to a local variable, to check that its type is +// compatible with member m. + +// 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). + +// Compiler-dependent macros that rely on FreeBSD-specific extensions. + +// Embed the rcs id of a source file in the resulting library. Note that in +// more recent ELF binutils, we use .ident allowing the ID to be stripped. +// Usage: +// __FBSDID("$FreeBSD$"); + +// - +// The following definitions are an extension of the behavior originally +// implemented in <sys/_posix.h>, but with a different level of granularity. +// POSIX.1 requires that the macros we test be defined before any standard +// header file is included. +// +// Here's a quick run-down of the versions: +// defined(_POSIX_SOURCE) 1003.1-1988 +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option +// _POSIX_C_SOURCE == 199309 1003.1b-1993 +// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1: 1996 +// _POSIX_C_SOURCE == 200112 1003.1-2001 +// _POSIX_C_SOURCE == 200809 1003.1-2008 +// +// In addition, the X/Open Portability Guide, which is now the Single UNIX +// Specification, defines a feature-test macro which indicates the version of +// that specification, and which subsumes _POSIX_C_SOURCE. +// +// Our macros begin with two underscores to avoid namespace screwage. + +// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. + +// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. + +// Deal with various X/Open Portability Guides and Single UNIX Spec. + +// Deal with all versions of POSIX. The ordering relative to the tests above is +// important. +// - +// Deal with _ANSI_SOURCE: +// If it is defined, and no other compilation environment is explicitly +// requested, then define our internal feature-test macros to zero. This +// makes no difference to the preprocessor (undefined symbols in preprocessing +// expressions are defined to have value zero), but makes it more convenient for +// a test program to print out the values. +// +// If a program mistakenly defines _ANSI_SOURCE and some other macro such as +// _POSIX_C_SOURCE, we will assume that it wants the broader compilation +// environment (and in fact we will never get here). + +// User override __EXT1_VISIBLE + +// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h +// translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + +// Nullability qualifiers: currently only supported by Clang. + +// Type Safety Checking +// +// Clang provides additional attributes to enable checking type safety +// properties that cannot be enforced by the C type system. + +// Lock annotations. +// +// Clang provides support for doing basic thread-safety tests at +// compile-time, by marking which locks will/should be held when +// entering/leaving a functions. +// +// Furthermore, it is also possible to annotate variables and structure +// members to enforce that they are only accessed when certain locks are +// held. + +// Structure implements a lock. + +// Function acquires an exclusive or shared lock. + +// Function attempts to acquire an exclusive or shared lock. + +// Function releases a lock. + +// Function asserts that an exclusive or shared lock is held. + +// Function requires that an exclusive or shared lock is or is not held. + +// Function should not be analyzed. + +// Function or variable should not be sanitized, e.g., by AddressSanitizer. +// GCC has the nosanitize attribute, but as a function attribute only, and +// warns on use as a variable attribute. + +// Guard variables and structure members by lock. + +// Alignment builtins for better type checking and improved code generation. +// Provide fallback versions for other compilers (GCC/Clang < 10): + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-4-Clause +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// Copyright (c) 1990, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. All advertising materials mentioning features or use of this software +// must display the following acknowledgement: +// This product includes software developed by the University of +// California, Berkeley and its contributors. +// 4. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 +// From: @(#)types.h 8.3 (Berkeley) 1/5/94 +// $FreeBSD$ + +// - +// This file is in the public domain. +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1988, 1993 +// The Regents of the University of California. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)limits.h 8.3 (Berkeley) 1/4/94 +// $FreeBSD$ + +// According to ANSI (section 2.2.4.2), the values below must be usable by +// #if preprocessing directives. Additionally, the expression must have the +// same type as would an expression that is an object of the corresponding +// type converted according to the integral promotions. The subtraction for +// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an +// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + +// max value for an unsigned long long + +// Quads and longs are the same on the amd64. Ensure they stay in sync. + +// Minimum signal stack size. + +// Basic types upon which most other types are built. +type X__int8_t = int8 /* _types.h:55:22 */ +type X__uint8_t = uint8 /* _types.h:56:24 */ +type X__int16_t = int16 /* _types.h:57:17 */ +type X__uint16_t = uint16 /* _types.h:58:25 */ +type X__int32_t = int32 /* _types.h:59:15 */ +type X__uint32_t = uint32 /* _types.h:60:23 */ +type X__int64_t = int64 /* _types.h:62:16 */ +type X__uint64_t = uint64 /* _types.h:63:24 */ + +// Standard type definitions. +type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()... +type X__critical_t = X__int64_t /* _types.h:76:19 */ +type X__double_t = float64 /* _types.h:78:17 */ +type X__float_t = float32 /* _types.h:79:16 */ +type X__intfptr_t = X__int64_t /* _types.h:81:19 */ +type X__intptr_t = X__int64_t /* _types.h:82:19 */ +type X__intmax_t = X__int64_t /* _types.h:93:19 */ +type X__int_fast8_t = X__int32_t /* _types.h:94:19 */ +type X__int_fast16_t = X__int32_t /* _types.h:95:19 */ +type X__int_fast32_t = X__int32_t /* _types.h:96:19 */ +type X__int_fast64_t = X__int64_t /* _types.h:97:19 */ +type X__int_least8_t = X__int8_t /* _types.h:98:18 */ +type X__int_least16_t = X__int16_t /* _types.h:99:19 */ +type X__int_least32_t = X__int32_t /* _types.h:100:19 */ +type X__int_least64_t = X__int64_t /* _types.h:101:19 */ +type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2 +type X__register_t = X__int64_t /* _types.h:104:19 */ +type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages) +type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof() +type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error +type X__time_t = X__int64_t /* _types.h:108:19 */ // time()... +type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */ +type X__uintptr_t = X__uint64_t /* _types.h:110:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:121:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */ +type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */ +type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */ +type X__u_register_t = X__uint64_t /* _types.h:131:20 */ +type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */ +type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */ +type X__vm_size_t = X__uint64_t /* _types.h:134:20 */ +type X___wchar_t = int32 /* _types.h:141:14 */ + +// Standard type definitions. +type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size +type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count +type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()... +type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags +type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */ +type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */ +type X__gid_t = X__uint32_t /* _types.h:46:20 */ +type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t +type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number +type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC) +type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP) +type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions +type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions +type X__nl_item = int32 /* _types.h:53:14 */ +type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count +type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset +type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias) +type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group] +type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally +// signed, because of legacy code +// that uses -1 for RLIM_INFINITY +type X__sa_family_t = X__uint8_t /* _types.h:61:19 */ +type X__socklen_t = X__uint32_t /* _types.h:62:20 */ +type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed) +type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()... +type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()... +type X__uid_t = X__uint32_t /* _types.h:66:20 */ +type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned) +type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset. +type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset. +type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier. +type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc + +// Unusual type definitions. +// rune_t is declared to be an “int” instead of the more natural +// “unsigned long” or “long”. Two things are happening here. It is not +// unsigned so that EOF (-1) can be naturally assigned to it and used. Also, +// it looks like 10646 will be a 31 bit standard. This means that if your +// ints cannot hold 32 bits, you will be in trouble. The reason an int was +// chosen over a long is that the is*() and to*() routines take ints (says +// ANSI C), but they use __ct_rune_t instead of int. +// +// NOTE: rune_t is not covered by ANSI nor other standards, and should not +// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and +// rune_t must be the same type. Also, wint_t should be able to hold all +// members of the largest character set plus one extra value (WEOF), and +// must be at least 16 bits. +type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs +type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above) +type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above) + +// Clang already provides these types as built-ins, but only in C++ mode. +type X__char16_t = X__uint_least16_t /* _types.h:97:26 */ +type X__char32_t = X__uint_least32_t /* _types.h:98:26 */ +// In C++11, char16_t and char32_t are built-in types. + +type X__max_align_t = struct { + F__max_align1 int64 + F__max_align2 float64 +} /* _types.h:111:3 */ + +type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number + +type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number + +// mbstate_t is an opaque object to keep conversion state during multibyte +// stream conversions. +type X__mbstate_t = struct { + F__ccgo_pad1 [0]uint64 + F__mbstate8 [128]int8 +} /* _types.h:124:3 */ + +type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */ + +// Types for varargs. These are all provided by builtin types these +// days, so centralize their definition. +type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc +type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ + +// Use inline functions if we are allowed to and the compiler supports them. + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Paul Borman at Krystal Technologies. +// +// 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. +// +// @(#)runetype.h 8.1 (Berkeley) 6/2/93 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright (c) 1991, 1993 +// The Regents of the University of California. All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Berkeley Software Design, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// @(#)cdefs.h 8.8 (Berkeley) 1/9/95 +// $FreeBSD$ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +// The lower 8 bits of runetype[] contain the digit value of the rune. +type X_RuneEntry = struct { + F__min X__rune_t + F__max X__rune_t + F__map X__rune_t + F__ccgo_pad1 [4]byte + F__types uintptr +} /* runetype.h:55:3 */ + +type X_RuneRange = struct { + F__nranges int32 + F__ccgo_pad1 [4]byte + F__ranges uintptr +} /* runetype.h:60:3 */ + +type X_RuneLocale = struct { + F__magic [8]int8 + F__encoding [32]int8 + F__sgetrune uintptr + F__sputrune uintptr + F__invalid_rune X__rune_t + F__ccgo_pad1 [4]byte + F__runetype [256]uint64 + F__maplower [256]X__rune_t + F__mapupper [256]X__rune_t + F__runetype_ext X_RuneRange + F__maplower_ext X_RuneRange + F__mapupper_ext X_RuneRange + F__variable uintptr + F__variable_len int32 + F__ccgo_pad2 [4]byte +} /* runetype.h:85:3 */ + +type Wctrans_t = int32 /* wctype.h:42:13 */ + +type Wctype_t = uint64 /* wctype.h:47:23 */ + +type Wint_t = X__wint_t /* wctype.h:52:18 */ + +// - +// SPDX-License-Identifier: BSD-2-Clause-FreeBSD +// +// Copyright (c) 2011 The FreeBSD Foundation +// +// This software was developed by David Chisnall under sponsorship from +// the FreeBSD Foundation. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// $FreeBSD$ + +type Locale_t = uintptr /* _ctype.h:45:25 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_386.go b/vendor/modernc.org/libc/wctype/wctype_linux_386.go index 574e2a3c..c256f739 100644 --- a/vendor/modernc.org/libc/wctype/wctype_linux_386.go +++ b/vendor/modernc.org/libc/wctype/wctype_linux_386.go @@ -782,7 +782,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -793,13 +794,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Some versions of stddef.h provide wint_t, even though neither the @@ -864,13 +867,15 @@ type Wint_t = uint32 /* wint_t.h:20:23 */ // in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. // Scalar type that can hold values which represent locale-specific -// character classifications. +// +// character classifications. type Wctype_t = uint32 /* wctype-wchar.h:38:27 */ // Extensible wide-character mapping functions: 7.15.3.2. // Scalar type that can hold values which represent locale-specific -// character mappings. +// +// character mappings. type Wctrans_t = uintptr /* wctype.h:48:25 */ // POSIX.1-2008 extended locale interface (see locale.h). diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_amd64.go b/vendor/modernc.org/libc/wctype/wctype_linux_amd64.go index fb6e00d7..a36ea7c5 100644 --- a/vendor/modernc.org/libc/wctype/wctype_linux_amd64.go +++ b/vendor/modernc.org/libc/wctype/wctype_linux_amd64.go @@ -801,7 +801,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -812,8 +813,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -882,13 +884,15 @@ type Wint_t = uint32 /* wint_t.h:20:23 */ // in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. // Scalar type that can hold values which represent locale-specific -// character classifications. +// +// character classifications. type Wctype_t = uint64 /* wctype-wchar.h:38:27 */ // Extensible wide-character mapping functions: 7.15.3.2. // Scalar type that can hold values which represent locale-specific -// character mappings. +// +// character mappings. type Wctrans_t = uintptr /* wctype.h:48:25 */ // POSIX.1-2008 extended locale interface (see locale.h). diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_arm.go b/vendor/modernc.org/libc/wctype/wctype_linux_arm.go index 4b1d88a1..97f0f132 100644 --- a/vendor/modernc.org/libc/wctype/wctype_linux_arm.go +++ b/vendor/modernc.org/libc/wctype/wctype_linux_arm.go @@ -841,7 +841,8 @@ type X__syscall_slong_t = int32 /* types.h:196:33 */ type X__syscall_ulong_t = uint32 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -852,13 +853,15 @@ type X__intptr_t = int32 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too -// narrow only for consistency with the old way of widening too-narrow -// types. User code should never use __time64_t. +// +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. type X__time64_t = X__int64_t /* types.h:222:28 */ // Some versions of stddef.h provide wint_t, even though neither the @@ -923,13 +926,15 @@ type Wint_t = uint32 /* wint_t.h:20:23 */ // in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. // Scalar type that can hold values which represent locale-specific -// character classifications. +// +// character classifications. type Wctype_t = uint32 /* wctype-wchar.h:38:27 */ // Extensible wide-character mapping functions: 7.15.3.2. // Scalar type that can hold values which represent locale-specific -// character mappings. +// +// character mappings. type Wctrans_t = uintptr /* wctype.h:48:25 */ // POSIX.1-2008 extended locale interface (see locale.h). diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_arm64.go b/vendor/modernc.org/libc/wctype/wctype_linux_arm64.go index 02f8f8ee..442784cf 100644 --- a/vendor/modernc.org/libc/wctype/wctype_linux_arm64.go +++ b/vendor/modernc.org/libc/wctype/wctype_linux_arm64.go @@ -869,7 +869,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -880,8 +881,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -950,13 +952,15 @@ type Wint_t = uint32 /* wint_t.h:20:23 */ // in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. // Scalar type that can hold values which represent locale-specific -// character classifications. +// +// character classifications. type Wctype_t = uint64 /* wctype-wchar.h:38:27 */ // Extensible wide-character mapping functions: 7.15.3.2. // Scalar type that can hold values which represent locale-specific -// character mappings. +// +// character mappings. type Wctrans_t = uintptr /* wctype.h:48:25 */ // POSIX.1-2008 extended locale interface (see locale.h). diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_ppc64le.go b/vendor/modernc.org/libc/wctype/wctype_linux_ppc64le.go index 61ef69b0..093b9f3c 100644 --- a/vendor/modernc.org/libc/wctype/wctype_linux_ppc64le.go +++ b/vendor/modernc.org/libc/wctype/wctype_linux_ppc64le.go @@ -811,7 +811,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -822,8 +823,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -892,13 +894,15 @@ type Wint_t = uint32 /* wint_t.h:20:23 */ // in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. // Scalar type that can hold values which represent locale-specific -// character classifications. +// +// character classifications. type Wctype_t = uint64 /* wctype-wchar.h:38:27 */ // Extensible wide-character mapping functions: 7.15.3.2. // Scalar type that can hold values which represent locale-specific -// character mappings. +// +// character mappings. type Wctrans_t = uintptr /* wctype.h:48:25 */ // POSIX.1-2008 extended locale interface (see locale.h). diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go b/vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go index c6785405..dcaf7c1f 100644 --- a/vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go +++ b/vendor/modernc.org/libc/wctype/wctype_linux_riscv64.go @@ -973,7 +973,8 @@ type X__syscall_slong_t = int64 /* types.h:197:33 */ type X__syscall_ulong_t = uint64 /* types.h:199:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:203:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:204:14 */ @@ -984,8 +985,9 @@ type X__intptr_t = int64 /* types.h:207:25 */ type X__socklen_t = uint32 /* types.h:210:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:215:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -1054,13 +1056,15 @@ type Wint_t = uint32 /* wint_t.h:20:23 */ // in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. // Scalar type that can hold values which represent locale-specific -// character classifications. +// +// character classifications. type Wctype_t = uint64 /* wctype-wchar.h:38:27 */ // Extensible wide-character mapping functions: 7.15.3.2. // Scalar type that can hold values which represent locale-specific -// character mappings. +// +// character mappings. type Wctrans_t = uintptr /* wctype.h:48:25 */ // POSIX.1-2008 extended locale interface (see locale.h). diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_s390x.go b/vendor/modernc.org/libc/wctype/wctype_linux_s390x.go index 4b007cb4..0734a791 100644 --- a/vendor/modernc.org/libc/wctype/wctype_linux_s390x.go +++ b/vendor/modernc.org/libc/wctype/wctype_linux_s390x.go @@ -800,7 +800,8 @@ type X__syscall_slong_t = int64 /* types.h:196:33 */ type X__syscall_ulong_t = uint64 /* types.h:198:33 */ // These few don't really vary by system, they always correspond -// to one of the other defined types. +// +// to one of the other defined types. type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). type X__caddr_t = uintptr /* types.h:203:14 */ @@ -811,8 +812,9 @@ type X__intptr_t = int64 /* types.h:206:25 */ type X__socklen_t = uint32 /* types.h:209:23 */ // C99: An integer type that can be accessed as an atomic entity, -// even in the presence of asynchronous interrupts. -// It is not currently necessary for this to be machine-specific. +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. type X__sig_atomic_t = int32 /* types.h:214:13 */ // Seconds since the Epoch, visible to user code when time_t is too @@ -881,13 +883,15 @@ type Wint_t = uint32 /* wint_t.h:20:23 */ // in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. // Scalar type that can hold values which represent locale-specific -// character classifications. +// +// character classifications. type Wctype_t = uint64 /* wctype-wchar.h:38:27 */ // Extensible wide-character mapping functions: 7.15.3.2. // Scalar type that can hold values which represent locale-specific -// character mappings. +// +// character mappings. type Wctrans_t = uintptr /* wctype.h:48:25 */ // POSIX.1-2008 extended locale interface (see locale.h). diff --git a/vendor/modernc.org/libc/wctype/wctype_netbsd_arm.go b/vendor/modernc.org/libc/wctype/wctype_netbsd_arm.go new file mode 100644 index 00000000..dcb28b9a --- /dev/null +++ b/vendor/modernc.org/libc/wctype/wctype_netbsd_arm.go @@ -0,0 +1,321 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_netbsd_arm.go -pkgname wctype', DO NOT EDIT. + +package wctype + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_ARM_ARCH_4T = 0 // cdefs.h:44:1: + X_ARM_ARCH_5 = 0 // cdefs.h:40:1: + X_ARM_ARCH_5T = 0 // cdefs.h:36:1: + X_ARM_ARCH_6 = 0 // cdefs.h:31:1: + X_ARM_ARCH_7 = 0 // cdefs.h:20:1: + X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1: + X_ARM_ARCH_T2 = 0 // cdefs.h:24:1: + X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1: + X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_NETBSD_SOURCE = 1 // featuretest.h:70:1: + X_SYS_ANSI_H_ = 0 // ansi.h:33:1: + X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1: + X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1: + X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1: + X_WCTYPE_H_ = 0 // wctype.h:32:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// return true if value 'a' fits in type 't' + +// $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ + +// Written by Klaus Klein <kleink@NetBSD.org>, 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 +// <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html> + +// $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. + +// $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ + +// $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $ + +// - +// Copyright (c) 2014 The NetBSD Foundation, Inc. +// All rights reserved. +// +// This code is derived from software contributed to The NetBSD Foundation +// by Matt Thomas of 3am Software Foundry. +// +// 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. + +// $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 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 + +// $NetBSD: int_types.h,v 1.17 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 Matt Thomas of 3am Software Foundry. +// +// 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. + +// $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. + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +type X__int8_t = int8 /* common_int_types.h:45:27 */ +type X__uint8_t = uint8 /* common_int_types.h:46:27 */ +type X__int16_t = int16 /* common_int_types.h:47:27 */ +type X__uint16_t = uint16 /* common_int_types.h:48:27 */ +type X__int32_t = int32 /* common_int_types.h:49:27 */ +type X__uint32_t = uint32 /* common_int_types.h:50:27 */ +type X__int64_t = int64 /* common_int_types.h:51:27 */ +type X__uint64_t = uint64 /* common_int_types.h:52:27 */ + +// 7.18.1.4 Integer types capable of holding object pointers + +type X__intptr_t = int32 /* common_int_types.h:58:27 */ +type X__uintptr_t = uint32 /* common_int_types.h:59:26 */ + +// 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 + +type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address +type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id +type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address +type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number +type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions +type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset +type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id +type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family +type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length +type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id +type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs) +type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */ +type X__wctrans_t = uintptr /* ansi.h:51:32 */ +type X__wctype_t = uintptr /* ansi.h:54:31 */ + +// mbstate_t is an opaque object to keep conversion state, during multibyte +// stream conversions. The content must not be referenced by user programs. +type X__mbstate_t = struct { + F__mbstateL X__int64_t + F__ccgo_pad1 [120]byte +} /* ansi.h:63:3 */ + +type X__va_list = X__builtin_va_list /* ansi.h:72:27 */ + +type Wint_t = int32 /* wctype.h:39:25 */ + +type Wctrans_t = X__wctrans_t /* wctype.h:44:25 */ + +type Wctype_t = X__wctype_t /* wctype.h:49:24 */ + +type Locale_t = uintptr /* wctype.h:79:25 */ + +var _ uint8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_openbsd_386.go b/vendor/modernc.org/libc/wctype/wctype_openbsd_386.go new file mode 100644 index 00000000..5fbaa138 --- /dev/null +++ b/vendor/modernc.org/libc/wctype/wctype_openbsd_386.go @@ -0,0 +1,347 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_openbsd_386.go -pkgname wctype', DO NOT EDIT. + +package wctype + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_ILP32 = 1 // <predefined>:1:1: + X_LOCALE_T_DEFINED_ = 0 // wctype.h:59:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:36:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:52:1: + X_STACKALIGNBYTES = 15 // _types.h:49:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_WCTRANS_T_DEFINED_ = 0 // wctype.h:44:1: + X_WCTYPE_H_ = 0 // wctype.h:33:1: + X_WCTYPE_T_DEFINED_ = 0 // wctype.h:49:1: + X_WINT_T_DEFINED_ = 0 // wctype.h:39:1: + I386 = 1 // <predefined>:339:1: + Unix = 1 // <predefined>:340:1: +) + +type Ptrdiff_t = int32 /* <builtin>:3:26 */ + +type Size_t = uint32 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: wctype.h,v 1.6 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ + +// - +// Copyright (c)1999 Citrus Project, +// 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. +// +// citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $ + +// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. +// Public domain. + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:61:22 */ +type X__uint8_t = uint8 /* _types.h:62:24 */ +type X__int16_t = int16 /* _types.h:63:17 */ +type X__uint16_t = uint16 /* _types.h:64:25 */ +type X__int32_t = int32 /* _types.h:65:15 */ +type X__uint32_t = uint32 /* _types.h:66:23 */ +type X__int64_t = int64 /* _types.h:67:20 */ +type X__uint64_t = uint64 /* _types.h:68:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:71:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */ +type X__int_least16_t = X__int16_t /* _types.h:73:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */ +type X__int_least32_t = X__int32_t /* _types.h:75:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */ +type X__int_least64_t = X__int64_t /* _types.h:77:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:81:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:83:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:85:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:87:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int32 /* _types.h:103:16 */ +type X__uintptr_t = uint32 /* _types.h:104:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:107:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:108:21 */ + +// Register size +type X__register_t = int32 /* _types.h:111:16 */ + +// VM system types +type X__vaddr_t = uint32 /* _types.h:114:24 */ +type X__paddr_t = uint32 /* _types.h:115:24 */ +type X__vsize_t = uint32 /* _types.h:116:24 */ +type X__psize_t = uint32 /* _types.h:117:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:120:22 */ +type X__float_t = float64 /* _types.h:121:22 */ +type X__ptrdiff_t = int32 /* _types.h:122:16 */ +type X__size_t = uint32 /* _types.h:123:24 */ +type X__ssize_t = int32 /* _types.h:124:16 */ +type X__va_list = X__builtin_va_list /* _types.h:126:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:133:15 */ +type X__wint_t = int32 /* _types.h:135:15 */ +type X__rune_t = int32 /* _types.h:136:15 */ +type X__wctrans_t = uintptr /* _types.h:137:14 */ +type X__wctype_t = uintptr /* _types.h:138:14 */ + +type Wint_t = X__wint_t /* wctype.h:40:21 */ + +type Wctrans_t = X__wctrans_t /* wctype.h:45:21 */ + +type Wctype_t = X__wctype_t /* wctype.h:50:20 */ + +type Locale_t = uintptr /* wctype.h:60:14 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go b/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go index 1343f815..7beb74ec 100644 --- a/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go +++ b/vendor/modernc.org/libc/wctype/wctype_openbsd_amd64.go @@ -28,7 +28,7 @@ const ( X_WCTYPE_H_ = 0 // wctype.h:33:1: X_WCTYPE_T_DEFINED_ = 0 // wctype.h:49:1: X_WINT_T_DEFINED_ = 0 // wctype.h:39:1: - Unix = 1 // <predefined>:340:1: + Unix = 1 // <predefined>:344:1: ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ diff --git a/vendor/modernc.org/libc/wctype/wctype_openbsd_arm64.go b/vendor/modernc.org/libc/wctype/wctype_openbsd_arm64.go new file mode 100644 index 00000000..3a3a6fae --- /dev/null +++ b/vendor/modernc.org/libc/wctype/wctype_openbsd_arm64.go @@ -0,0 +1,354 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_openbsd_arm64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LOCALE_T_DEFINED_ = 0 // wctype.h:59:1: + X_LP64 = 1 // <predefined>:1:1: + X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: + X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: + X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: + X_RET_PROTECTOR = 1 // <predefined>:2:1: + X_STACKALIGNBYTES = 15 // _types.h:54:1: + X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: + X_WCTRANS_T_DEFINED_ = 0 // wctype.h:44:1: + X_WCTYPE_H_ = 0 // wctype.h:33:1: + X_WCTYPE_T_DEFINED_ = 0 // wctype.h:49:1: + X_WINT_T_DEFINED_ = 0 // wctype.h:39:1: + Unix = 1 // <predefined>:360:1: +) + +type Ptrdiff_t = int64 /* <builtin>:3:26 */ + +type Size_t = uint64 /* <builtin>:9:23 */ + +type Wchar_t = int32 /* <builtin>:15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* <builtin>:46:14 */ +type X__float128 = float64 /* <builtin>:47:21 */ + +// $OpenBSD: wctype.h,v 1.6 2017/09/05 03:16:13 schwarze Exp $ +// $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ + +// - +// Copyright (c)1999 Citrus Project, +// 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. +// +// citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp + +// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ +// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 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.7 (Berkeley) 1/21/94 + +// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ + +// Macro to test if we're using a specific version of gcc or later. + +// 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. Do not use __CONCAT on double-quoted strings, +// such as those from the __STRING macro: to concatenate strings just put +// them next to each other. + +// 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". +// GCC >= 2.5 uses the __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). + +// __returns_twice makes the compiler not assume the function +// only returns once. This affects registerisation of variables: +// even local variables need to be in memory across such a call. +// Example: setjmp() + +// __only_inline makes the compiler only use this function definition +// for inlining; references that can't be inlined will be left as +// external references instead of generating a local copy. The +// matching library should include a simple extern definition for +// the function to handle those references. c.f. ctype.h + +// GNU C version 2.96 adds explicit branch prediction so that +// the CPU back-end can hint the processor and also so that +// code blocks can be reordered such that the predicted path +// sees a more linear flow, thus improving cache behavior, etc. +// +// The following two macros provide us with a way to utilize this +// compiler feature. Use __predict_true() if you expect the expression +// to evaluate to true, and __predict_false() if you expect the +// expression to evaluate to false. +// +// A few notes about usage: +// +// * Generally, __predict_false() error condition checks (unless +// you have some _strong_ reason to do otherwise, in which case +// document it), and/or __predict_true() `no-error' condition +// checks, assuming you want to optimize for the no-error case. +// +// * Other than that, if you don't know the likelihood of a test +// succeeding from empirical or other `hard' evidence, don't +// make predictions. +// +// * These are meant to be used in places that are run `a lot'. +// It is wasteful to make predictions in code that is run +// seldomly (e.g. at subsystem initialization time) as the +// basic block reordering that this affects can often generate +// larger code. + +// Delete pseudo-keywords wherever they are not available or needed. + +// The __packed macro indicates that a variable or structure members +// should have the smallest possible alignment, despite any host CPU +// alignment requirements. +// +// The __aligned(x) macro specifies the minimum alignment of a +// variable or structure. +// +// These macros together are useful for describing the layout and +// alignment of messages exchanged with hardware or other systems. + +// "The nice thing about standards is that there are so many to choose from." +// There are a number of "feature test macros" specified by (different) +// standards that determine which interfaces and types the header files +// should expose. +// +// Because of inconsistencies in these macros, we define our own +// set in the private name space that end in _VISIBLE. These are +// always defined and so headers can test their values easily. +// Things can get tricky when multiple feature macros are defined. +// We try to take the union of all the features requested. +// +// The following macros are guaranteed to have a value after cdefs.h +// has been included: +// __POSIX_VISIBLE +// __XPG_VISIBLE +// __ISO_C_VISIBLE +// __BSD_VISIBLE + +// X/Open Portability Guides and Single Unix Specifications. +// _XOPEN_SOURCE XPG3 +// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 +// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 +// _XOPEN_SOURCE == 500 XPG5 +// _XOPEN_SOURCE == 520 XPG5v2 +// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI +// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI +// +// The XPG spec implies a specific value for _POSIX_C_SOURCE. + +// POSIX macros, these checks must follow the XOPEN ones above. +// +// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) +// _POSIX_C_SOURCE == 1 1003.1-1990 +// _POSIX_C_SOURCE == 2 1003.2-1992 +// _POSIX_C_SOURCE == 199309L 1003.1b-1993 +// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, +// and the omnibus ISO/IEC 9945-1:1996 +// _POSIX_C_SOURCE == 200112L 1003.1-2001 +// _POSIX_C_SOURCE == 200809L 1003.1-2008 +// +// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though +// this may be overridden by the _ISOC99_SOURCE macro later. + +// _ANSI_SOURCE means to expose ANSI C89 interfaces only. +// If the user defines it in addition to one of the POSIX or XOPEN +// macros, assume the POSIX/XOPEN macro(s) should take precedence. + +// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus +// override any of the other macros since they are non-exclusive. + +// Finally deal with BSD-specific interfaces that are not covered +// by any standards. We expose these when none of the POSIX or XPG +// macros is defined or if the user explicitly asks for them. + +// Default values. + +// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt 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. +// +// @(#)types.h 8.3 (Berkeley) 1/5/94 +// @(#)ansi.h 8.2 (Berkeley) 1/4/94 + +// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned +// value for all data types (int, long, ...). The result is an +// unsigned long 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). + +// 7.18.1.1 Exact-width integer types +type X__int8_t = int8 /* _types.h:60:22 */ +type X__uint8_t = uint8 /* _types.h:61:24 */ +type X__int16_t = int16 /* _types.h:62:17 */ +type X__uint16_t = uint16 /* _types.h:63:25 */ +type X__int32_t = int32 /* _types.h:64:15 */ +type X__uint32_t = uint32 /* _types.h:65:23 */ +// LONGLONG +type X__int64_t = int64 /* _types.h:67:20 */ +// LONGLONG +type X__uint64_t = uint64 /* _types.h:69:28 */ + +// 7.18.1.2 Minimum-width integer types +type X__int_least8_t = X__int8_t /* _types.h:72:19 */ +type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ +type X__int_least16_t = X__int16_t /* _types.h:74:20 */ +type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ +type X__int_least32_t = X__int32_t /* _types.h:76:20 */ +type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ +type X__int_least64_t = X__int64_t /* _types.h:78:20 */ +type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ + +// 7.18.1.3 Fastest minimum-width integer types +type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ +type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ +type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ +type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ +type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ +type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ +type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ +type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ + +// 7.18.1.4 Integer types capable of holding object pointers +type X__intptr_t = int64 /* _types.h:104:16 */ +type X__uintptr_t = uint64 /* _types.h:105:24 */ + +// 7.18.1.5 Greatest-width integer types +type X__intmax_t = X__int64_t /* _types.h:108:20 */ +type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ + +// Register size +type X__register_t = int64 /* _types.h:112:16 */ + +// VM system types +type X__vaddr_t = uint64 /* _types.h:115:24 */ +type X__paddr_t = uint64 /* _types.h:116:24 */ +type X__vsize_t = uint64 /* _types.h:117:24 */ +type X__psize_t = uint64 /* _types.h:118:24 */ + +// Standard system types +type X__double_t = float64 /* _types.h:121:18 */ +type X__float_t = float32 /* _types.h:122:17 */ +type X__ptrdiff_t = int64 /* _types.h:123:16 */ +type X__size_t = uint64 /* _types.h:124:24 */ +type X__ssize_t = int64 /* _types.h:125:16 */ +type X__va_list = X__builtin_va_list /* _types.h:127:27 */ + +// Wide character support types +type X__wchar_t = int32 /* _types.h:137:15 */ +type X__wint_t = int32 /* _types.h:140:15 */ +type X__rune_t = int32 /* _types.h:141:15 */ +type X__wctrans_t = uintptr /* _types.h:142:14 */ +type X__wctype_t = uintptr /* _types.h:143:14 */ + +type Wint_t = X__wint_t /* wctype.h:40:21 */ + +type Wctrans_t = X__wctrans_t /* wctype.h:45:21 */ + +type Wctype_t = X__wctype_t /* wctype.h:50:20 */ + +type Locale_t = uintptr /* wctype.h:60:14 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/wctype_windows_386.go b/vendor/modernc.org/libc/wctype/wctype_windows_386.go index 2bc052df..f6ad2e73 100644 --- a/vendor/modernc.org/libc/wctype/wctype_windows_386.go +++ b/vendor/modernc.org/libc/wctype/wctype_windows_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo wctype\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o wctype\wctype_windows_386.go -pkgname wctype', DO NOT EDIT. +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_windows_386.go -pkgname wctype', DO NOT EDIT. package wctype @@ -15,99 +15,99 @@ var _ atomic.Value var _ unsafe.Pointer const ( - DUMMYSTRUCTNAME = 0 - DUMMYSTRUCTNAME1 = 0 - DUMMYSTRUCTNAME2 = 0 - DUMMYSTRUCTNAME3 = 0 - DUMMYSTRUCTNAME4 = 0 - DUMMYSTRUCTNAME5 = 0 - DUMMYUNIONNAME = 0 - DUMMYUNIONNAME1 = 0 - DUMMYUNIONNAME2 = 0 - DUMMYUNIONNAME3 = 0 - DUMMYUNIONNAME4 = 0 - DUMMYUNIONNAME5 = 0 - DUMMYUNIONNAME6 = 0 - DUMMYUNIONNAME7 = 0 - DUMMYUNIONNAME8 = 0 - DUMMYUNIONNAME9 = 0 - MINGW_DDK_H = 0 - MINGW_DDRAW_VERSION = 7 - MINGW_HAS_DDK_H = 1 - MINGW_HAS_DDRAW_H = 1 - MINGW_HAS_SECURE_API = 1 - MINGW_SDK_INIT = 0 - UNALIGNED = 0 - USE___UUIDOF = 0 - WIN32 = 1 - WINNT = 1 - X_AGLOBAL = 0 - X_ALPHA = 259 - X_ANONYMOUS_STRUCT = 0 - X_ANONYMOUS_UNION = 0 - X_ARGMAX = 100 - X_BLANK = 0x40 - X_CONST_RETURN = 0 - X_CONTROL = 0x20 - X_CRTNOALIAS = 0 - X_CRTRESTRICT = 0 - X_CRT_ALTERNATIVE_IMPORTED = 0 - X_CRT_CTYPEDATA_DEFINED = 0 - X_CRT_MANAGED_HEAP_DEPRECATE = 0 - X_CRT_PACKING = 8 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 - X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 - X_CRT_WCTYPEDATA_DEFINED = 0 - X_DIGIT = 0x4 - X_DLL = 0 - X_ERRCODE_DEFINED = 0 - X_FILE_OFFSET_BITS = 64 - X_HEX = 0x80 - X_INC_CRTDEFS = 0 - X_INC_CRTDEFS_MACRO = 0 - X_INC_MINGW_SECAPI = 0 - X_INC_VADEFS = 0 - X_INC_WCTYPE = 0 - X_INC__MINGW_H = 0 - X_INT128_DEFINED = 0 - X_INTEGRAL_MAX_BITS = 64 - X_INTPTR_T_DEFINED = 0 - X_LEADBYTE = 0x8000 - X_LOWER = 0x2 - X_MT = 0 - X_M_IX86 = 600 - X_PGLOBAL = 0 - X_PTRDIFF_T_ = 0 - X_PTRDIFF_T_DEFINED = 0 - X_PUNCT = 0x10 - X_REENTRANT = 1 - X_RSIZE_T_DEFINED = 0 - X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD - X_SIZE_T_DEFINED = 0 - X_SPACE = 0x8 - X_SSIZE_T_DEFINED = 0 - X_TAGLC_ID_DEFINED = 0 - X_THREADLOCALEINFO = 0 - X_TIME32_T_DEFINED = 0 - X_TIME64_T_DEFINED = 0 - X_TIME_T_DEFINED = 0 - X_UINTPTR_T_DEFINED = 0 - X_UPPER = 0x1 - X_USE_32BIT_TIME_T = 0 - X_VA_LIST_DEFINED = 0 - X_W64 = 0 - X_WCHAR_T_DEFINED = 0 - X_WCTYPE_DEFINED = 0 - X_WCTYPE_INLINE_DEFINED = 0 - X_WCTYPE_T_DEFINED = 0 - X_WIN32 = 1 - X_WIN32_WINNT = 0x502 - X_WINT_T = 0 - X_X86_ = 1 - I386 = 1 + DUMMYSTRUCTNAME = 0 // _mingw.h:519:1: + DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1: + DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1: + DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1: + DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1: + DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1: + DUMMYUNIONNAME = 0 // _mingw.h:497:1: + DUMMYUNIONNAME1 = 0 // _mingw.h:498:1: + DUMMYUNIONNAME2 = 0 // _mingw.h:499:1: + DUMMYUNIONNAME3 = 0 // _mingw.h:500:1: + DUMMYUNIONNAME4 = 0 // _mingw.h:501:1: + DUMMYUNIONNAME5 = 0 // _mingw.h:502:1: + DUMMYUNIONNAME6 = 0 // _mingw.h:503:1: + DUMMYUNIONNAME7 = 0 // _mingw.h:504:1: + DUMMYUNIONNAME8 = 0 // _mingw.h:505:1: + DUMMYUNIONNAME9 = 0 // _mingw.h:506:1: + MINGW_DDK_H = 0 // _mingw_ddk.h:2:1: + MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1: + MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1: + MINGW_SDK_INIT = 0 // _mingw.h:598:1: + UNALIGNED = 0 // _mingw.h:384:1: + USE___UUIDOF = 0 // _mingw.h:77:1: + WIN32 = 1 // <predefined>:258:1: + WINNT = 1 // <predefined>:306:1: + X_AGLOBAL = 0 // _mingw.h:346:1: + X_ALPHA = 259 // wctype.h:110:1: + X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1: + X_ANONYMOUS_UNION = 0 // _mingw.h:473:1: + X_ARGMAX = 100 // _mingw.h:402:1: + X_BLANK = 0x40 // wctype.h:106:1: + X_CONST_RETURN = 0 // _mingw.h:377:1: + X_CONTROL = 0x20 // wctype.h:105:1: + X_CRTNOALIAS = 0 // corecrt.h:29:1: + X_CRTRESTRICT = 0 // corecrt.h:33:1: + X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1: + X_CRT_CTYPEDATA_DEFINED = 0 // wctype.h:43:1: + X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1: + X_CRT_PACKING = 8 // corecrt.h:14:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1: + X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1: + X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1: + X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1: + X_CRT_WCTYPEDATA_DEFINED = 0 // wctype.h:76:1: + X_DIGIT = 0x4 // wctype.h:101:1: + X_DLL = 0 // _mingw.h:326:1: + X_ERRCODE_DEFINED = 0 // corecrt.h:117:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_HEX = 0x80 // wctype.h:107:1: + X_ILP32 = 1 // <predefined>:211:1: + X_INC_CORECRT = 0 // corecrt.h:8:1: + X_INC_CRTDEFS = 0 // crtdefs.h:8:1: + X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1: + X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1: + X_INC_VADEFS = 0 // vadefs.h:7:1: + X_INC_WCTYPE = 0 // wctype.h:7:1: + X_INC__MINGW_H = 0 // _mingw.h:8:1: + X_INT128_DEFINED = 0 // _mingw.h:237:1: + X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1: + X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1: + X_LEADBYTE = 0x8000 // wctype.h:109:1: + X_LOWER = 0x2 // wctype.h:100:1: + X_MT = 0 // _mingw.h:330:1: + X_M_IX86 = 600 // _mingw_mac.h:54:1: + X_PGLOBAL = 0 // _mingw.h:342:1: + X_PTRDIFF_T_ = 0 // corecrt.h:90:1: + X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1: + X_PUNCT = 0x10 // wctype.h:104:1: + X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1: + X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1: + X_SIZE_T_DEFINED = 0 // corecrt.h:37:1: + X_SPACE = 0x8 // wctype.h:102:1: + X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1: + X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1: + X_THREADLOCALEINFO = 0 // corecrt.h:456:1: + X_TIME32_T_DEFINED = 0 // corecrt.h:122:1: + X_TIME64_T_DEFINED = 0 // corecrt.h:127:1: + X_TIME_T_DEFINED = 0 // corecrt.h:139:1: + X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1: + X_UPPER = 0x1 // wctype.h:99:1: + X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1: + X_VA_LIST_DEFINED = 0 // <builtin>:55:1: + X_W64 = 0 // _mingw.h:296:1: + X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1: + X_WCTYPE_DEFINED = 0 // wctype.h:113:1: + X_WCTYPE_INLINE_DEFINED = 0 // wctype.h:140:1: + X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1: + X_WIN32 = 1 // <predefined>:164:1: + X_WIN32_WINNT = 0x502 // _mingw.h:233:1: + X_WINT_T = 0 // corecrt.h:110:1: + X_X86_ = 1 // <predefined>:169:1: + I386 = 1 // <predefined>:171:1: ) type Ptrdiff_t = int32 /* <builtin>:3:26 */ @@ -141,6 +141,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// * +// This file has no copyright assigned and is placed in the Public Domain. +// This file is part of the mingw-w64 runtime package. +// No warranty is given; refer to the file DISCLAIMER.PD within this package. + // This macro holds an monotonic increasing value, which indicates // a specific fix/patch is present on trunk. This value isn't related to // minor/major version-macros. It is increased on demand, if a big @@ -161,6 +166,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // MinGW-w64 has some additional C99 printf/scanf feature support. // So we add some helper macros to ease recognition of them. +// If _FORTIFY_SOURCE is enabled, some inline functions may use +// __builtin_va_arg_pack(). GCC may report an error if the address +// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case. + +// Enable workaround for ABI incompatibility on affected platforms + // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. @@ -201,26 +212,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. +// for backward compatibility + type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */ -type Ssize_t = int32 /* crtdefs.h:47:13 */ +type Ssize_t = int32 /* corecrt.h:52:13 */ -type Rsize_t = Size_t /* crtdefs.h:52:16 */ +type Rsize_t = Size_t /* corecrt.h:57:16 */ -type Intptr_t = int32 /* crtdefs.h:64:13 */ +type Intptr_t = int32 /* corecrt.h:69:13 */ -type Uintptr_t = uint32 /* crtdefs.h:77:22 */ +type Uintptr_t = uint32 /* corecrt.h:82:22 */ -type Wint_t = uint16 /* crtdefs.h:106:24 */ -type Wctype_t = uint16 /* crtdefs.h:107:24 */ +type Wint_t = uint16 /* corecrt.h:111:24 */ +type Wctype_t = uint16 /* corecrt.h:112:24 */ -type Errno_t = int32 /* crtdefs.h:113:13 */ +type Errno_t = int32 /* corecrt.h:118:13 */ -type X__time32_t = int32 /* crtdefs.h:118:14 */ +type X__time32_t = int32 /* corecrt.h:123:14 */ -type X__time64_t = int64 /* crtdefs.h:123:35 */ +type X__time64_t = int64 /* corecrt.h:128:35 */ -type Time_t = X__time32_t /* crtdefs.h:136:20 */ +type Time_t = X__time32_t /* corecrt.h:141:20 */ type Threadlocaleinfostruct = struct { Frefcount int32 @@ -246,29 +259,29 @@ type Threadlocaleinfostruct = struct { Fpclmap uintptr Fpcumap uintptr Flc_time_curr uintptr -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */ -type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */ +type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */ +type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */ type Localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo -} /* crtdefs.h:428:9 */ +} /* corecrt.h:441:9 */ -type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */ -type X_locale_t = uintptr /* crtdefs.h:431:19 */ +type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */ +type X_locale_t = uintptr /* corecrt.h:444:19 */ type TagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 -} /* crtdefs.h:422:1 */ +} /* corecrt.h:435:1 */ -type LC_ID = TagLC_ID /* crtdefs.h:439:3 */ -type LPLC_ID = uintptr /* crtdefs.h:439:9 */ +type LC_ID = TagLC_ID /* corecrt.h:452:3 */ +type LPLC_ID = uintptr /* corecrt.h:452:9 */ -type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */ +type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */ type Wctrans_t = Wchar_t /* wctype.h:174:19 */ |